IP Geolocation Country City ASN Coordinates API
Free tier included · LocationIP Geolocation API resolves any IPv4 or IPv6 address to a rich record: country and country name, continent, region, city, postal code, IANA timezone, latitude/longitude, EU flag, ASN number and organization, plus the country currency code and its main languages. Everything is answered from local DB-IP Lite mmdb databases — offline, stateless, no logging, no external calls at request time. It also includes a country reference card endpoint (name, currency, languages from Unicode CLDR), an endpoint for all country cards, and a batch endpoint that geolocates up to 100 addresses in one request.
This covers city-level geolocation, ASN, timezone, currency and language data. Use it for access-log enrichment, fraud-prevention pipelines, content localization, network monitoring, signup-table enrichment and traffic-report automation. A single HTTP call replaces library installs and version pinning; the batch endpoint is the cheapest way to enrich whole logs or tables.
Honest limits: this is best-effort estimation, not authoritative. City-level results are approximate. The DB-IP Lite snapshot is refreshed periodically (not live). The batch endpoint accepts 1–100 addresses per request and returns results in input order; private, loopback and reserved addresses are returned with `"private": true` rather than an error. The `/lookup` endpoint returns the core record (country, city, coordinates, continent, ASN); `/lookup/full` adds region, postal code, timezone, EU flag, currency and languages.
Endpoints
| Method | Path | What it does |
|---|---|---|
GET | / | API metadata: name, version, and paths to the interactive docs and health endpoint. |
GET | /health | Liveness probe; returns status "ok" while the process is up. |
GET | /lookup | Resolve one IPv4 or IPv6 address to the core geolocation record: country and country name, continent and continent name, region and region code, city, latitude/longitude, ASN number and organization. Private, loopback and reserved addresses are returned with "private": true instead of an error. ip is a required query parameter (max 64 chars). |
GET | /lookup/full | Resolve one IPv4 or IPv6 address to the complete record: country and country name, continent and continent name, region and region code, city, postal code, IANA timezone, latitude/longitude, EU flag, ASN number and organization, plus the country currency code and its main languages. Everything is answered from the local DB-IP Lite databases — offline, stateless, no logging. ip is a required query parameter (max 64 chars). |
POST | /lookup/batch | Geolocate up to 100 IPv4/IPv6 addresses in one request. Body: {"ips": ["8.8.8.8", "1.1.1.1"]}. Returns the same rich record as /lookup/full for every address, in input order. Private, loopback and reserved addresses are returned with "private": true instead of an error. One request against your quota covers the whole batch. |
GET | /countries | Return every ISO 3166-1 alpha-2 country with its English name, current currency code and main languages, sorted by country code. Ideal for building country/currency pickers, forms and locale defaults with a single cached call. Built offline from Unicode CLDR — free and open data. |
GET | /country/{code} | Look up an ISO 3166-1 alpha-2 country code and get its English name, current ISO 4217 currency code and the languages spoken there (ranked by speaker share, with the official ones flagged). Case-insensitive: us and US are the same card. Built offline from Unicode CLDR — free, open, no external calls at request time. |
Quick start
curl -X GET "https://ipgeo.p.rapidapi.com/lookup?ip=8.8.8.8" \
-H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
-H "X-RapidAPI-Host: ipgeo.p.rapidapi.com"
FAQ
Does the API make any external network calls?
No. All lookups are answered from local DB-IP Lite mmdb databases and Unicode CLDR data. There are no databases, no request logs and no cross-request state.
Are city-level results accurate?
City-level results are best-effort estimates from the DB-IP Lite snapshot, not authoritative. They are approximate and suitable for general localization, not precise location services.
How many IPs can I geolocate in one request?
Up to 100 addresses per `POST /lookup/batch` call. Results come back in the same order as the input. Private, loopback and reserved addresses are returned with `"private": true` rather than an error.
What's the difference between /lookup and /lookup/full?
`/lookup` returns the core record (country, city, coordinates, continent, ASN). `/lookup/full` adds region, postal code, IANA timezone, EU flag, currency code and main languages — the complete record.
Try IP Geolocation Country City ASN Coordinates free
Free tier on every plan. Get an API key and start calling in under a minute.
Open on RapidAPI