Complete an address into coordinates for Sonic Drive-In store search
Completes a partial address, place, city, state or ZIP into ranked matches, each already carrying the latitude and longitude that GET /sonic/nearby takes -- so a caller can run a Sonic restaurant search from free text instead of coordinates. Each suggestion's layer describes its granularity and is one of address, locality, state, postalCode or place, and confidence is one of exact, interpolated or fallback. Results are restricted to one country (default US). A query that matches nothing returns an empty suggestions array with count 0, not an error.
Request
- Base URL: https://api.crawlora.net/api/v1
- URL: https://api.crawlora.net/api/v1/sonic/location-suggest
- Auth: API key in header x-api-key
Query parameters
Partial address, place, city, state or ZIP to complete
Maximum suggestions, 1-25. Defaults to 5. Upstream may return fewer.
ISO 3166-1 alpha-2 country code to restrict results to. Defaults to US.
Headers
API key required
Response
OK
Example response
{
"data": {
"count": 5,
"country": "US",
"limit": 5,
"query": "cheyenne wy",
"suggestions": [
{
"city": "Cheyenne",
"confidence": "exact",
"country": "United States",
"country_code": "US",
"county": "Laramie",
"formatted_address": "2540 Dell Range Blvd, Cheyenne, WY 82009 US",
"label": "2540 Dell Range Blvd",
"latitude": 41.160549,
"layer": "address",
"longitude": -104.777671,
"number": "2540",
"postal_code": "82009",
"state": "Wyoming",
"state_code": "WY",
"street": "Dell Range Blvd"
}
]
}
}Changes
No recorded changes to this operation across all 2 revisions of this API.