Search for locations by name
Returns location suggestions with coordinates and timezone for typeahead search. Results are cached according to backend cache configuration.
Request
- Base URL: https://api.openephemeris.com
- URL: https://api.openephemeris.com/location/autocomplete
- Auth: HTTP bearer
Query parameters
Search query (city name, address, etc.)
Maximum number of suggestions to return
Optional ISO 3166-1 alpha-2 country code (e.g., US, GB) used to bias ranking toward that country. Boost, not filter: results in other countries remain reachable.
Optional admin1 (state/province/region) qualifier used to bias ranking. Accepts a full name ("Michigan", "Quebec"), an ASCII name, or a GeoNames admin1 code ("MI"). Boost, not filter.
Alias for region: admin1 (state/province) qualifier used to bias ranking. region takes precedence if both are supplied.
Optional "lat,lon" proximity hint (e.g., "37.77,-122.42") used to bias ranking toward nearby places. Boost, not filter.
Headers
Response
Successful Response
Example response
{
"cached": false,
"query": "san fran",
"suggestions": [
{
"confidence": 0.97,
"country_code": "US",
"display_name": "San Francisco, California, United States",
"latitude": 37.7749,
"longitude": -122.4194,
"place_id": "place.12345",
"short_name": "San Francisco",
"timezone": "America/Los_Angeles"
}
],
"total_results": 1
}Changes
No recorded changes to this operation across all 1 revision of this API.