IP Geolocation API
4 endpoints for IP geolocation: single IP lookup (country, region, city, ISP, ASN, lat/lng, timezone, datacenter heuristic), batch lookup of up to 20 IPs in parallel, caller's-IP introspection (via x-forwarded-for chain), and great-circle distance between two IPs in km/miles. Backed by ip-api.com (primary) with ipapi.co fallback.
x402 verified · $0.001 USDC/request · 4 endpoints / 4 tools · Data · base network · x402 protocol
Turn an IP address into country, city, ASN, ISP and timezone. Single, bulk, caller-IP and distance lookups.
Endpoints
POST /lookup/ip: Geolocate a single IP: country, city, ASN, ISP, timezone. ($0.001)POST /lookup/bulk: Geolocate many IPs in one call. ($0.001)POST /lookup/myip: Geolocate the caller's own IP. ($0.001)POST /lookup/distance: Distance between two IP locations. ($0.001)
Example request
curl -X POST https://ip-geo-api-production.up.railway.app/lookup/ip \
-H 'content-type: application/json' \
-d '{"ip":"8.8.8.8"}'
Example response
{
"ip": "8.8.8.8",
"country": "United States",
"country_code": "US",
"city": "Mountain View",
"asn": "AS15169",
"isp": "Google LLC",
"timezone": "America/Los_Angeles"
}
How an agent calls this
Where is IP 8.8.8.8 located and which network operator owns it?
An MCP-connected agent discovers this API, picks it for the task, and pays per call in USDC. No keys, no account.
How to call this API
Every protected route returns HTTP 402 with x402 payment requirements. An agent pays the stated USDC amount on Base and retries with the payment header. No API keys, no accounts. Browse the marketplace or list your own API.