Address Autocomplete
GEThttps://api.uber.com/v1/health/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.
¶ Authorization
OAuth 2.0 Bearer token with the health
scope.
¶ Request Parameters
Name | Type | Description | Required? |
---|---|---|---|
query |
string | URL Encoded text string on which to search, for example “1455%203rd%20St” | 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
curl -X GET \
-H "authorization: Bearer $UBER_TOKEN" \
-H 'content-type: application/json' \
https://$api_url/v1/health/address/autocomplete?query=1455%203rd%20St | jq .
¶ 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 field 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 | Authorization failed. The client lacks valid auth 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. |
500 | internal_server_error | An unexpected error occurred on the server while processing the request. |