API - Geolocate IP Addresses on the API servers (ip_geo)

Geolocation

Tells you where public IP addresses are, with the same answer as geo_lookup, on the API servers where the other lookups and the AI live.

Endpointhttps://api.opensolr.com/solr_manager/api/ip_geo
MethodGET or POST, a JSON body works too
Authemail and api_key of your account, as GET or POST parameters: Authentication.

01 · Parameters

ipOne of the two

One address.

ipsOne of the two

Several, up to 50: an array, a JSON array, or separated by commas, semicolons or spaces.

02 · Example

curl -s "https://api.opensolr.com/solr_manager/api/ip_geo?email=YOUR_EMAIL&api_key=YOUR_API_KEY&ip=8.8.8.8"

03 · Answer

The envelope and the entries of geo_lookup: status, contract_version, count, submitted, max_ips, capped and results keyed by each address as you sent it.

Unlike geo_lookup, this endpoint always answers HTTP 200: read status and the msg of each entry.

04 · Errors

ERROR_NO_IP_SUPPLIEDHTTP 200

No usable address. The answer carries max_ips.

ERROR_NOT_A_PUBLIC_IP, ERROR_GEO_NO_DATA, ERROR_GEO_LOOKUP_UNAVAILABLEHTTP 200

In one entry. The other entries are answered.

WRONG_API_HOSTHTTP 404

Called on opensolr.com. The answer carries the right URL.

ERROR_AUTHENTICATION_FAILEDHTTP 403

The email and API key do not match.

ERROR_RATE_LIMIT_PER_MINUTEHTTP 429

Too 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

The local time at an address: local_time.

Every error code and HTTP status of the API: API errors. Calls per minute and per hour: Rate limits.