IP geolocation lookup: city, region, country, coordinates
No account. Pay by card from $1 and your key appears right after payment. Get a key by card
IP geolocation for any public IPv4 or IPv6 address: city, region, country, continent and approximate latitude and longitude, with the address range the record covers, from DB-IP City Lite data. Use to locate a visitor, flag a surprising login or add regional context to an agent task. No API key.
Inputs
| Name | Type | Description |
|---|---|---|
ip | string | Public 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://glyphtools.com/ip/geolocation?ip=8.8.8.8"
Node.js
const r = await fetch("https://glyphtools.com/ip/geolocation?ip=8.8.8.8", {
headers: { Authorization: "Bearer adt_…" },
});
const data = await r.json(); // 402 until the key is in the header
Python
import requests
r = requests.get("https://glyphtools.com/ip/geolocation?ip=8.8.8.8", headers={"Authorization": "Bearer adt_…"}, timeout=60)
data = r.json()
Or one of your 3 free calls, no key — the same request with &trial=1 on the end:
curl "https://glyphtools.com/ip/geolocation?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_geolocation, and the first 10 successful calls are free:
https://glyphtools.com/mcp