{"uid":"cap_BG6DNY1DmlqGBK4sj2VrW","slug":"onchainexpat-x402-geo-lookup-api-db9b52cc","name":"OnchainExpat x402 Geo Lookup API","description":"Pay-per-request AI, crypto, proxy, and utility APIs using x402 protocol","url":"https://x402.onchainexpat.com/api/x402-proxy/fetch/geo","method":"POST","headers":{},"bodySchema":{"type":"object","required":["url","country"],"properties":{"url":{"type":"string","description":"Target URL to fetch. Must start with http:// or https://"},"body":{"type":"string","description":"Request body (string or JSON-stringified)"},"method":{"type":"string","description":"HTTP method (default GET)"},"country":{"type":"string","description":"Required 2-letter ISO country code (US, GB, DE, JP, BR, ...)"},"headers":{"type":"object","description":"Custom request headers to forward"},"session_id":{"type":"string","description":"1-8 alphanumeric chars to keep the same exit IP across requests"}}},"responseSchema":{"type":"object","properties":{"body":{"type":"string"},"country":{"type":"string"},"headers":{"type":"object"},"status_code":{"type":"integer"},"response_size_bytes":{"type":"integer"}}},"example":{"request":{"url":"https://example.com","country":"US"},"response":{"body":"<!doctype html><html lang=\"en\"><head><title>Example Domain</title><link rel=\"icon\" href=\"data:,\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><style>body{background:#eee;width:60vw;margin:15vh auto;font-family:system-ui,sans-serif}h1{font-size:1.5em}div{opacity:0.8}a:link,a:visited{color:#348}</style></head><body><div><h1>Example Domain</h1><p>This domain is for use in documentation examples without needing permission. Avoid use in operations.</p><p><a href=\"https://iana.org/domains/example\">Learn more</a></p></div></body></html>\n","country":"US","headers":{"age":"4483","date":"Thu, 18 Jun 2026 06:14:07 GMT","allow":"GET, HEAD","cf-ray":"a0d826e6bd352adf-LAX","server":"cloudflare","content-type":"text/html","last-modified":"Wed, 17 Jun 2026 20:54:39 GMT","cf-cache-status":"HIT"},"elapsed_ms":1308,"status_code":200,"response_size_bytes":559}},"exampleRequest":{"url":"https://example.com","country":"US"},"tags":["x402"],"displayCostAmount":"0.03","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.03/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_zNY3YEIGaFHzQRajjpHyS","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.03","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns geolocation data for a given IP address or the requester's IP, paid per-request via x402 protocol","exampleAgentPrompt":"Can you look up the geolocation for the IP address 8.8.8.8 and tell me its country, city, and approximate coordinates?","exampleUseCases":[{"title":"Detect VPN usage for fraud prevention","prompt":"Check the geolocation for this IP address and let me know if it's coming from an unexpected country or if the coordinates suggest a VPN might be in use."},{"title":"Verify user location for compliance","prompt":"I need you to look up where this request is coming from geographically—can you tell me the country, region, and ISP so I can confirm it matches our service restrictions?"},{"title":"Route traffic based on user location","prompt":"Find out what country and city this IP address is located in, then help me decide which regional server to connect them to for the best performance."}],"resultDescription":"A JSON object containing geolocation details for the queried IP address, likely including country, region, city, latitude, longitude, and ISP information.","failureModes":["Invalid or malformed IP address returns an error","Private/reserved IP addresses may return no useful location data","Payment failure via x402 protocol blocks the request","Empty response schema suggests limited documentation — actual fields may vary","Rate limiting or quota exceeded may occur"],"whenToPreferThis":"Choose this endpoint when you need pay-per-use IP geolocation without a subscription, especially in agentic or crypto-native workflows using the x402 payment protocol. Useful when you want lightweight, on-demand geo lookups billed in USDC.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T06:58:38.752Z","isFirstParty":false}