{"uid":"cap_TuS90VNYoobpLajUGypA4","slug":"ip-geolocation-distance-calculator-6eba4cbc","name":"IP Geolocation Distance Calculator","description":"IP geolocation, batch lookup, distance calculation, and caller-IP introspection with x402 payments.","url":"https://ipgeo.payapi.market/lookup/distance?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"ip1":{"type":"string","description":"First IP address, e.g. '8.8.8.8'."},"ip2":{"type":"string","description":"Second IP address, e.g. '1.1.1.1'."}}},"responseSchema":{"type":"json","example":{"ip1":{"ip":"8.8.8.8","lat":39.03,"lng":-77.5,"city":"Ashburn","country":"United States"},"ip2":{"ip":"1.1.1.1","lat":-33.87,"lng":151.21,"city":"Sydney","country":"Australia"},"distance_km":15987.34,"distance_miles":9934.12}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_t9L8crxXIf43yFqg_0cvQ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Given two IP addresses, geolocates each and returns the geographic distance between them in kilometers and miles.","exampleAgentPrompt":"How far apart are 8.8.8.8 and 1.1.1.1 in the real world — can you geolocate both IPs and give me the distance in kilometers and miles?","exampleUseCases":[{"title":"Server latency geography check","prompt":"I have two servers at 104.21.45.67 and 185.60.216.35 — geolocate both and tell me how many kilometers apart they are so I can estimate routing overhead."},{"title":"Detecting user-to-CDN proximity","prompt":"My user is coming from IP 203.0.113.42 and my CDN node is at 198.51.100.10 — how far apart are those two IPs geographically?"},{"title":"Fraud detection distance check","prompt":"A login came in from 91.108.4.1 but the account's usual IP is 17.253.144.10 — how many miles apart are those two IP addresses?"}],"resultDescription":"Returns a JSON object with the geolocated details (IP, latitude, longitude, city, country) for each of the two input IPs, plus the calculated distance between them in both kilometers and miles.","failureModes":["Invalid IP address format for ip1 or ip2 returns an error","Private or reserved IP ranges (e.g. 192.168.x.x, 10.x.x.x) may return no geolocation data","Payment failure via x402 returns 402 Payment Required","Missing required fields (ip1 or ip2) returns a validation error","Geolocation database may have low accuracy for some ISPs or regions"],"whenToPreferThis":"Choose this endpoint when you need to compute the physical geographic distance between two specific IP addresses in a single API call, receiving both geolocation details and distance simultaneously. Prefer this over separate geolocation lookups when distance computation is the primary goal and you want to avoid multiple round-trips.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T12:30:08.459Z","isFirstParty":false,"canonicalSlug":"ip-geolocation-distance-calculator-6eba4cbc"}