IP geolocation: city, region, country and coordinates

$0.01 per call · failed calls are never charged · no account needed: a card key or USDC

Geolocate an IPv4 or IPv6 address to its city, region, country (code and name), continent and approximate latitude and longitude, with the range the record covers, from DB-IP's City Lite data (CC BY 4.0, monthly; attributed in every answer). An HTTP call without ip answers for the caller's own address. City level at best; private addresses are refused. Use to localise a visitor or caller, or enrich logs; for the network owner use ip_lookup.

Run it free (3 free calls) Buy credits by card (from $1) Example result (JSON)

Try it with your own inputs

Public IPv4 or IPv6 address (over HTTP, left out: the caller's own address)

Uses one of your 3 free calls. Nothing is charged, and a call that fails is not counted.

Inputs

NameTypeDescription
ipstringPublic IPv4 or IPv6 address (over HTTP, left out: the caller's own address)

Request

Over HTTP, with a card key from /credits:

curl -H "Authorization: Bearer adt_…" "https://glyphcall.com/ip/geolocate?ip=8.8.8.8"

Or one of your 3 free calls, no key:

curl "https://glyphcall.com/ip/geolocate?ip=8.8.8.8&trial=1"

Without a key, the same URL answers 402 Payment Required with x402 and MPP terms, so an agent with a wallet pays per call in USDC (Base, Polygon, Arbitrum or Solana over x402; Base or Tempo over MPP) and retries.

Example result

{
  "ip": "8.8.8.8",
  "version": 4,
  "country": "US",
  "countryName": "United States",
  "region": "California",
  "city": "Mountain View",
  "latitude": 37.4056,
  "longitude": -122.0775,
  "continent": "NA",
  "continentName": "North America",
  "range": "8.8.8.0-8.8.8.255",
  "accuracy": "city level at best; the free Lite data set, updated monthly",
  "dataMonth": "2026-10",
  "attribution": "IP Geolocation by DB-IP (https://db-ip.com), IP to City Lite, CC BY 4.0",
  "attributionUrl": "https://db-ip.com"
}

From an AI agent (MCP)

Add the MCP server to Claude, Cursor or any MCP client. This tool is ip_geolocate, and the first 25 successful calls are free:

https://glyphcall.com/mcp

Related tools