Turns street addresses and place names into coordinates: the best match for each, up to 25 in one call.
https://api.opensolr.com/solr_manager/api/address_geoemail and api_key of your account, as GET or POST parameters: Authentication.01 · Parameters
addressOne of the twoOne address or place name.
addressesOne of the twoUp to 25: an array, a JSON array, or separated by ; or new lines.
countryOptionalA two-letter country code, to search in one country only.
02 · Example
curl -s "https://api.opensolr.com/solr_manager/api/address_geo?email=YOUR_EMAIL&api_key=YOUR_API_KEY" --data-urlencode "addresses=Pariser Platz 1, Berlin;Zalau"
03 · Answer
{ "status": true, "contract_version": 1, "count": 2, "results": { "Pariser Platz 1, Berlin": { "found": true, "place": "Pariser Platz 1", "country_code": "DE", "lat": 52.51627, "lon": 13.37769, "kind": "address", "locality": "Berlin", "country": "Germany" }, "Zalau": { "found": true, "place": "Zalau", "country_code": "RO", "lat": 47.2, "lon": 23.05, "kind": "city" } } }
results is keyed by each item as you sent it. kind is address, city, region, country, or coordinates for an item written as lat,lon.
An item not found answers {"found": false, "msg": "ERROR_GEO_NO_DATA"}.
Values shown are an example.
04 · Errors
ERROR_NO_ADDRESS_SUPPLIEDHTTP 200No address. The answer carries max_addresses.
ERROR_GEO_NO_DATA, ERROR_GEO_LOOKUP_UNAVAILABLEHTTP 200In one entry: not found, or the lookup failed.
WRONG_API_HOSTHTTP 404Called on opensolr.com. The answer carries the right URL.
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.
Each call counts once toward your per-minute and per-hour limits, whatever the number of items: Rate limits. Lookups never use the AI allowance.
05 · Related
One name, with several matches to choose from: place_search. Distances: geo_distance.
Every error code and HTTP status of the API: API errors. Calls per minute and per hour: Rate limits.