IP Geolocation API
Detect country, city, region, timezone, and currency from any IP address. Works for IPv4 and IPv6. One endpoint, no SDK required.
One request, complete location data
Pass any IP to /v1/geolocate/:ip and get back a full location object.
Request
GET https://api.apogeoapi.com/v1/geolocate/8.8.8.8
X-API-Key: your_api_keyResponse
{
"ip": "8.8.8.8",
"country": "United States",
"country_code": "US",
"city": "Mountain View",
"region": "California",
"timezone": "America/Los_Angeles",
"currency": "USD",
"latitude": 37.3860517,
"longitude": -122.0838511
}Response fields
Every field returned in the geolocation response and what it contains.
| Field | Type | Description |
|---|---|---|
ip | string | The IP address that was looked up |
country | string | Full country name |
country_code | string | ISO 3166-1 alpha-2 country code |
city | string | City name (city-level accuracy) |
region | string | State or region name |
timezone | string | IANA timezone identifier |
currency | string | ISO 4217 currency code for the country |
latitude | number | Approximate latitude coordinate |
longitude | number | Approximate longitude coordinate |
What you can build with it
Common use cases developers solve with IP geolocation.
Block or allow by country
Enforce geographic access controls — restrict content, comply with regulations, or route users to the right experience.
Show local pricing in user currency
Detect the visitor's currency from their IP and display prices in their local denomination — no extra API call needed.
Timezone-aware features
Know exactly what timezone your user is in. Schedule emails, show correct local times, and avoid the "wrong hour" UX problem.
Fraud detection signals
Cross-reference the IP location against the billing address. Mismatches are a strong signal worth investigating.
IP Geo + Country Data + Exchange Rates — one subscription
Most developers juggle three separate APIs: one for IP lookup, one for country data, and one for currency rates. ApogeoAPI consolidates all three into a single integration, a single API key, and a single monthly bill. When you geolocate an IP, the country and currency are already there.
Frequently asked questions
Does it work for IPv6?
Yes. Both IPv4 and IPv6 are fully supported. Pass any valid IP address to the endpoint and the response format is identical.
Is IP geolocation available in the Free plan?
Available during the 14-day full trial every new account receives automatically. After the trial, it requires the Basic plan ($19/month) or above. No credit card is needed to start.
How accurate is the geolocation?
Country-level accuracy is guaranteed for all IPs. City-level accuracy is high for most residential and commercial IPs. VPNs, proxies, and data center IPs may show a less precise location.
Ready to detect location from IP?
14-day full trial. No credit card required. Works with any HTTP client.