IP geolocation API

Look up the country, region, and city of any public IPv4 or IPv6 address. On the map: where 12 public DNS resolvers' addresses are registered.

Try a lookup

Enter any public IP address, or look up your own. The answer comes from the live API. Mapricot doesn't log the addresses you look up.

Country
Region
City
Location
Data release

Where public DNS resolvers are registered

These are the addresses of four well-known public DNS resolvers. They answer from data centers worldwide, but the database records one location per network: where it's registered.

That's why IP geolocation is best for defaults, like a country or a currency, and not for anything that needs a precise position.

ResolverIP addressCountryRegion and city
Google Public DNS 8.8.8.8 United States Mountain View, California
Google Public DNS (IPv6) 2001:4860:4860::8888 Canada Montreal, Quebec
Cloudflare 1.1.1.1 Australia Sydney, New South Wales
Quad9 9.9.9.9 United States Berkeley (North Berkeley), California

Request and response

Put the address in the path. Fields the data doesn't have are left out rather than guessed, and an address with no known location returns "found": false.

  • IPv4 and IPv6
  • Private and malformed addresses return 400 and aren't billed
  • Looked-up addresses aren't written to logs or usage records
IP geolocation docs
Request
curl "https://api.mapricot.com/v1/ip/8.8.8.8" \
  -H "Authorization: Bearer $MAPRICOT_KEY"
Response
{  "ip": "8.8.8.8",  "found": true,  "continentCode": "NA",  "countryCode": "US",  "countryName": "United States",  "regionName": "California",  "city": "Mountain View",  "location": {    "lat": 37.422,    "lon": -122.085  },  "source": "DB-IP City Lite",  "attributionUrl": "https://db-ip.com",  "licenseUrl": "https://creativecommons.org/licenses/by/4.0/",  "datasetRelease": "2026-10"}

DB-IP City Lite, updated monthly

Locations come from DB-IP City Lite, licensed under CC BY 4.0. Each response names the release in use, currently 2026-10. If you show locations to people, credit DB-IP with a link.

Other APIs

One account and one API key cover every Mapricot API, and the free allowance is shared between them.

Start with 250,000 free requests

Sign in with your email, create an API key, and make your first request in a few minutes. No credit card required.