Finds places by name, or by the first letters someone types: coordinates, region and country of each match, best first.
https://opensolr.com/solr_manager/api/place_searchemail and api_key of your account, as GET or POST parameters: Authentication.01 · Parameters
qRequiredThe name or its beginning, up to 80 characters.
countryOptionalA two-letter country code, to search in one country only.
limitOptionalHow many places, 1 to 25. Default 10.
02 · Example
curl -s "https://opensolr.com/solr_manager/api/place_search?email=YOUR_EMAIL&api_key=YOUR_API_KEY&q=zala&country=RO&limit=3"
03 · Answer
{ "status": true, "contract_version": 1, "q": "zala", "country_code": "RO", "count": 1, "places": [ { "place": "Zalau", "country_code": "RO", "lat": 47.2, "lon": 23.05, "kind": "city", "region": "Salaj", "country": "Romania", "population": 52359 } ] }
kind is city, region, country or address.
Only place, country_code, lat and lon are sure; the other fields are left out when not known.
Values shown are an example.
04 · Errors
ERROR_NO_QUERY_SUPPLIEDHTTP 400q is empty.
ERROR_GEO_NO_DATAHTTP 404No place by that name.
ERROR_GEO_LOOKUP_UNAVAILABLEHTTP 503The place data could not be asked. Retry later.
ERROR_AUTHENTICATION_FAILEDHTTP 403The email and API key do not match.
ERROR_RATE_LIMIT_PER_MINUTEHTTP 429Too many calls. Wait for the Retry-After seconds.
It never uses the AI allowance.
05 · Related
Many addresses at once, on api.opensolr.com: address_geo. Postal codes: postal_codes.
Every error code and HTTP status of the API: API errors. Calls per minute and per hour: Rate limits.