ipinfo.io APIipinfo.io ↗
Look up city, region, country, coordinates, org/ASN, postal code, timezone, and hostname for any IP address via the IPinfo API.
curl -X GET 'https://api.parse.bot/scraper/2843baf5-37f1-4ec6-bbc0-557e9fec585d/geolocate_ip?ip=8.8.8.8' \ -H 'X-API-Key: $PARSE_API_KEY'
Look up geolocation and network data for a specific IP address. Returns city, region, country, coordinates, organization, postal code, timezone, hostname, and anycast status.
| Param | Type | Description |
|---|---|---|
| iprequired | string | IP address to look up (e.g., '8.8.8.8', '1.1.1.1'). |
{
"type": "object",
"fields": {
"ip": "string - The queried IP address",
"loc": "string - Latitude,longitude as comma-separated string",
"org": "string - Organization/ASN info",
"city": "string - City name",
"postal": "string - Postal/zip code",
"region": "string - Region/state name",
"anycast": "boolean - Whether the IP is an anycast address",
"country": "string - ISO 3166-1 alpha-2 country code",
"hostname": "string - Reverse DNS hostname",
"latitude": "number - Latitude coordinate parsed from loc",
"timezone": "string - IANA timezone identifier",
"longitude": "number - Longitude coordinate parsed from loc"
},
"sample": {
"data": {
"ip": "8.8.8.8",
"loc": "37.4056,-122.0775",
"org": "AS15169 Google LLC",
"city": "Mountain View",
"postal": "94043",
"region": "California",
"anycast": true,
"country": "US",
"hostname": "dns.google",
"latitude": 37.4056,
"timezone": "America/Los_Angeles",
"longitude": -122.0775
},
"status": "success"
}
}About the ipinfo.io API
The IPinfo API exposes 2 endpoints and 10 response fields per lookup, letting you retrieve geolocation and network data for any IPv4 or IPv6 address. The geolocate_ip endpoint accepts a single ip parameter and returns city, region, country code, coordinates, organization/ASN, postal code, hostname, and anycast status. A second endpoint, get_my_ip, returns the same field set for the outbound IP of the calling request.
Endpoints
The geolocate_ip endpoint takes one required input — ip (e.g. 8.8.8.8) — and returns a flat object covering geographic and network fields: city, region, country (ISO 3166-1 alpha-2), postal, loc (latitude and longitude as a comma-separated string), latitude (pre-parsed numeric value), org (ASN and organization name), hostname (reverse DNS), and anycast (boolean indicating whether the address is an anycast IP).
The get_my_ip endpoint takes no inputs and returns the identical field set for whichever IP address is making the request. This is useful for server-side environment checks, egress IP auditing, or confirming proxy/VPN exit node details at call time.
Response Fields
org combines the ASN number and the registered organization name in a single string (e.g. AS15169 Google LLC). loc is always returned as a "lat,lon" string; latitude is the numeric latitude parsed from that string. anycast is a boolean that is true only when the queried IP belongs to an anycast range — most residential and cloud IPs will return false. country is always a two-letter ISO code, not a full country name.
Coverage and Accuracy
IPinfo maintains its own IP-to-location database. City and region accuracy varies by IP type: datacenter and ISP gateway addresses tend to resolve more precisely than residential addresses, which are often mapped to a regional aggregate point. Postal codes are included where available but may be absent for some IP ranges outside densely-mapped geographies.
- Geoblock or restrict content by
countrycode at the application layer - Display a localized default currency or language using
countryandregionon page load - Identify datacenter vs. residential traffic by inspecting the
organdanycastfields - Log the ISP and ASN (
org) alongside user sessions for fraud or abuse analysis - Confirm egress IP and location for outbound API calls using
get_my_ip - Pre-fill shipping address city, region, and postal code from
city,region, andpostalfields - Detect VPN or proxy exit nodes by cross-referencing
orgwith known datacenter ASNs
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does IPinfo have an official developer API?+
What does `geolocate_ip` return for the `org` field?+
AS13335 Cloudflare, Inc.. This comes from WHOIS registration data for the IP range. It reflects the network operator, not necessarily the end user's employer or ISP brand name.Does the API return timezone data?+
How accurate is city-level geolocation for residential IPs?+
postal field may be absent for IP ranges in countries with less complete mapping coverage.Does the API support bulk lookups for multiple IPs in one call?+
geolocate_ip accepts a single ip parameter. There is no batch endpoint in the current API. You can fork it on Parse and revise to add a multi-IP endpoint that iterates a list of addresses.