Address Autocomplete
GEThttps://api.uber.com/v1/guests/address/autocomplete
¶ Use Case
The Address Autocomplete endpoint offers well-formatted addresses for updated endpoints. It supports partial address resolution to internally match the pickup address with high confidence.
If the request is from a third party (3P) app, please add x-uber-organizationuuid header and the Organization UUID as the value or the request will be denied.
¶ Authorization
OAuth 2.0 Bearer token with the guests.trips
scope.
¶ Request Parameters
Name | Type | Description | Required? |
---|---|---|---|
query |
string | URL Encoded text string on which to search, for example “1455%203rd%20St”. The input query must be at least 4 characters long. Queries shorter than 4 characters will result in an error." |
Yes |
locale |
string | The requested language for the result subject to support in Uber’s data set and Google’s. | No |
latitude |
float | The latitude around which to retrieve results - effectively geobiasing the results. | No |
longitude |
float | The longitude around which to retrieve results - effectively geobiasing the results. | No |
¶ Example Request with query parameter
curl -X GET \
-H "authorization: Bearer $UBER_TOKEN" \
-H 'content-type: application/json' \
'https://api.uber.com/v1/guests/address/autocomplete?query=1455%203rd%20St'
¶ Example Request with locale
curl -X GET \
-H "authorization: Bearer $UBER_TOKEN" \
-H 'content-type: application/json' \
'https://api.uber.com/v1/guests/address/autocomplete?query=Fundación%20Canal&locale=es-ES'
¶ Example Request with latitude & longitude
curl -X GET \
-H "authorization: Bearer $UBER_TOKEN" \
-H 'content-type: application/json' \
'https://api.uber.com/v1/guests/address/autocomplete?query=Fundación%20Canal&locale=es-ES&latitude=40.448489&longitude=-3.681879'
¶ Response body parameters
Name | Type | Description | Required? |
---|---|---|---|
addresses[i].name |
string | The name of the address | Yes |
addresses[i].address_line_1 |
string | The first address line of the address | Yes |
addresses[i].address_line_2 |
string | The second address line of the address | No |
addresses[i].full_address |
string | The full address of the address | Yes |
addresses[i].latitude |
float | The latitude of the address | Yes |
addresses[i].longitude |
float | The longitude of the address | Yes |
Status-code: 200 OK
{
"addresses": [
{
"name": "1455 3rd St",
"address_line_1": "1455 3rd Street",
"address_line_2": "San Francisco, CA, USA",
"full_address": "1455 3rd St, San Francisco, CA 94158, USA",
"latitude": 37.7700784,
"longitude": -122.3890176
},
{
"name": "1455 3rd Street Promenade",
"address_line_1": "1455 3rd Street Promenade",
"address_line_2": "Santa Monica, CA",
"full_address": "1455 3rd Street Promenade, Santa Monica, CA 90401, USA",
"latitude": 34.0151509,
"longitude": -118.4949605
},
{
"name": "1455 3rd St",
"address_line_1": "1455 3rd St",
"address_line_2": "Santa Monica, CA",
"full_address": "1455 3rd St, Santa Monica, CA 90401, USA",
"latitude": 34.0151509,
"longitude": -118.4949605
}
]
}
¶ Expected Errors
{
"code": "validation_failed",
"message": "Request.Query is required"
}
¶ Endpoint Possible Errors
HTTP Status | Code | Description |
---|---|---|
400 | validation_failed | This error occurs when the mandatory query parameter is missing in the request URL. The query parameter is required for processing the request, the absence of this filed will result in a validation failure. Ensure that the query parameter is properly included in the request to avoid this error. |
400 | invalid_request_parameters | This error occurs when the value of the query parameter is less than the minimum required length (4 characters). Ensure that the query parameter contains at least 4 characters to avoid this error. |
401 | unauthorized | Authentication failed. The client lacks valid authentication credentials for the requested resource. |
403 | forbidden | The client does not have permission to access the requested resource. |
404 | not_found | The requested resource or entity could not be found on the server or in the database. |
500 | internal_server_error | An unexpected error occurred on the server while processing the request. |