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/ip/:ip and get back a full location object.
Request
GET https://api.apogeoapi.com/v1/ip/8.8.8.8
X-API-Key: your_api_keyResponse
{
"ip": "81.2.69.142",
"countryCode": "GB",
"country": "United Kingdom",
"region": "ENG",
"city": "St Albans",
"latitude": 51.753,
"longitude": -0.3256,
"timezone": "Europe/London",
"accuracyRadius": 100,
"isEU": false,
"isPrivate": false
}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 |
countryCode | string | ISO 3166-1 alpha-2 country code |
country | string | Full country name |
region | string | Region/state code (e.g. ENG, CA) |
city | string | City name (when known for the IP) |
latitude | number | Approximate latitude coordinate |
longitude | number | Approximate longitude coordinate |
timezone | string | IANA timezone identifier |
accuracyRadius | number | Approximate accuracy radius in km |
isEU | boolean | Whether the IP is in an EU country |
isPrivate | boolean | True for private/reserved IPs (loopback, RFC1918, etc.) |
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 country from their IP, then map it to a currency and live rate via the countries endpoint — all under the same API key.
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. Geolocate an IP to get its country, then resolve full country data and live currency rates from the same key — no second vendor.
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.