The IP Geolocation API for Building Location-Aware Applications

Look up any IPv4 or IPv6 address. Get country, city, coordinates, timezone, currency, ISP, and threat signals back as JSON. Try it on your own IP, then start free.

  • 100 free requests/mo
  • No credit card
  • Setup in 60 seconds
GET ipwho.is/<ip>LIVE
ip…
type…
country…
region…
city / zip…
lat / long…
time_zone.id…
currency…
connection…
Try: ···
99.9%
Uptime
2M+
Locations
200,000+
Cities
100+
Fields per lookup

Trusted by Developers Worldwide

MicrosoftAirbnbSamsungActivisionHubSpot

What Is an IP Geolocation API?

An IP geolocation API is a web service that takes an IP address and returns its real-world location: country, region, city, and coordinates, plus network context like ISP, timezone, and currency. Your application sends one HTTP request and gets structured JSON back in milliseconds.

What apps do with it

Decide before the page renders: which currency to show, which consent banner to serve, whether a login looks suspicious. The lookup runs server-side, so it works on every request with no permission prompt and no client code.

What separates providers

The differences come down to accuracy, refresh frequency, coverage, and latency. A geolocation API is only as good as its data: ipstack covers 2M+ locations across 200,000+ cities, refreshed continuously through ISP partnerships.

Other names, same contract

You will also see this called a geolocation web service or an ip to geolocation API. The contract is identical: send an address, get back a structured answer your code can branch on.

IP Geolocation API vs. Browser Geolocation API (GPS)

An IP geolocation API tells your server where a request comes from. The browser Geolocation API asks the user’s device where it is. One is permissionless and city-level, the other is consent-gated and meter-level.

IP geolocation APIBrowser Geolocation API
How it locatesMaps the IP to ISP service areasGPS, Wi-Fi, and cell signals on the device
Permission requiredNoneExplicit user consent, per site
Works server-sideYes: APIs, webhooks, logs, edgeNo: browser JavaScript only
Typical accuracyCountry to city levelMeters, when the user allows it
Best forLocalization, fraud checks, analytics, geo-blockingNavigation, store finders, ride hailing

Reach for IP-based geolocation when

  • Every request needs an answer: localization, analytics, fraud screening, geo-blocking
  • The caller is an API, webhook, or edge function, not a browser
  • A permission prompt would hurt conversion, like currency defaults at checkout

Reach for browser GPS when

  • The feature needs the device's position: turn-by-turn navigation, ride hailing
  • "Stores near you" is exactly what the permission prompt promises
  • Meter precision is worth a consent dialog and a browser-only code path
Use both: resolve the IP server-side as the instant default, then offer browser GPS as an upgrade where precision earns it. If the user declines the prompt, the IP result is already on screen.

How IP Geolocation Works (and How Accurate It Is)

IP geolocation maps the address ranges that internet registries allocate to ISPs onto the physical areas where those ranges serve customers. GPS plays no part: the location comes from knowing who operates an address and where they route it.

Where the data comes from

  1. 1
    Registry allocationsARIN, RIPE, APNIC and peer registries record which organization holds each IP range.
  2. 2
    ISP partnershipsPartner ISPs continuously supply updated ranges and the real service areas they map to.
  3. 3
    Continuous refreshRanges are re-allocated constantly. Stale data is the top cause of wrong answers, so updates never stop.

The IP geolocation glossary defines registry, ASN, CGNAT, and the rest of the vocabulary.

Accuracy you can expect

Country level~99% across the industry
City levelVaries by connection type
Fixed broadbandResolves most precisely
Mobile (CGNAT)Can resolve to the carrier gateway
CoordinatesArea centroid, not a street address

VPNs and proxies resolve to the exit server, and the security fields flag them for you. IPv4 and IPv6 resolve with the same fields and the same precision.

100+ Data Fields in Every Response

Every lookup draws on five field groups: location, time zone, currency, connection, and security. Location fields come with the free plan, paid plans add time zone, currency, and connection, and Professional+ adds security. The JSON IP API page documents the full response format field by field.

FieldExampleWhat it tells you
Location
country_code / country_nameUS · United StatesISO 3166-1 country of the address
region_code / region_nameVA · VirginiaState, province, or region
city / zipAshburn · 20149Resolved city and postal code
latitude / longitude39.0438 · -77.4879Coordinates of the area centroid
location.country_flag_emoji🇺🇸Flag ready for UI display
location.is_eufalseEU membership, the GDPR consent trigger
Time zone
time_zone.idAmerica/New_YorkIANA timezone identifier
time_zone.current_time2026-08-18T09:13:13-04:00Local time at the address right now
time_zone.gmt_offset-14400Offset from GMT in seconds
Currency
currency.code / symbolUSD · $ISO 4217 currency for price display
currency.name / pluralUS Dollar · US dollarsNames for checkout copy
Connection
connection.asn14618Autonomous system number
connection.ispamazon.com Inc.Operator serving the address
Security  PROFESSIONAL+
security.is_proxy / proxy_typefalse · nullProxy detection and classification
security.is_torfalseTor exit node flag
security.is_crawler / crawler_namefalse · nullBot and crawler identification
security.threat_level / threat_typeslow · nullAggregated risk scoring
GET https://api.ipstack.com/3.95.197.167?access_key=YOUR_KEYSAMPLE
{
  "ip": "3.95.197.167",
  "type": "ipv4",
  "continent_name": "North America",
  "country_code": "US",
  "country_name": "United States",
  "region_name": "Virginia",
  "city": "Ashburn",
  "zip": "20149",
  "latitude": 39.0438,
  "longitude": -77.4879,
  "location": { "country_flag_emoji": "🇺🇸", "calling_code": "1", "is_eu": false },
  "time_zone": { "id": "America/New_York", "code": "EDT" },
  "currency": { "code": "USD", "symbol": "$" },
  "connection": { "asn": 14618, "isp": "amazon.com Inc." },
  "security": { "is_proxy": false, "is_tor": false, "threat_level": "low" }
}

What You Can Build: Geolocation Use Cases by Industry

Each of these patterns runs on a single lookup per request.

E-commerce: localization, currency display & regional pricing

Render the right currency and shipping terms on first paint using currency.code and country_code. The lookup runs during server-side rendering, so a shopper in Berlin sees € prices immediately. Match country_code to your price book for regional pricing, and use location.is_eu for tax wording.

Delivery & logistics apps: routing, serviceability & ETA context

A geolocation API for delivery apps answers the first operational question: do we serve this area? Resolve city and zip on arrival to pre-fill the coverage check, quote an ETA window from the regional depot, and keep delivery times in the customer's local clock with time_zone.id.

SaaS: onboarding, personalization & language defaults

Default country, language, and timezone at signup from the IP so new users confirm instead of typing. Segment trials by region_name for your CRM, and schedule onboarding emails inside the user's working hours with time_zone.id.

Fraud prevention & compliance: geo-blocking, licensing, GDPR

Compare country_code against the billing country at checkout and route mismatches to review. Enforce licensing windows and embargo rules at the edge, and trigger consent flows when is_eu is true. For continuous IP checks in security and ops workflows, use our real-time IP lookup API.

2M+ Locations. One API Key.

Coverage across 200,000+ cities, free to start with no credit card.

The Best IP Geolocation API for Developers Building Location-Based Features? Here's Our Case

One call returns location, timezone, currency, connection, and security data together. Most alternatives sell those as separate products or price tiers. With ipstack they are fields in the same JSON response.

The same endpoint serves your prototype and your production traffic, behind 99.9% uptime. When you need to enrich logs or backfill events, the bulk endpoint takes up to 50 IPs per request instead of 50 round trips.

Integrate in minutes: official SDKs, a maintained Postman collection, and copy-paste samples in every major language. Start on the free plan, 100 requests a month with no credit card, and verify the location data against your own traffic before paying anything.

Why developers pick ipstack
  • One GET request returns all 100+ fields
  • Security signals in the same call: is_proxy, is_tor, threat_level
  • Bulk endpoint: up to 50 IPs per request