Great-circle distance (km and miles) between two IP addresses, with each endpoint's city/c
Great-circle distance (km and miles) between two IP addresses, with each endpoint's city/country/lat/lng.
1000 (raw units)
price
3
calls / 30d
2
unique payers
2026-09-08
updated
Provider
ip-geo-api-production.up.railway.app · discovered, not yet claimed by its owner
Payment (x402 accepts[])
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0xFFc458dB291b4ABcE020fE3de4f91F2770E537b1",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "1000",
"maxTimeoutSeconds": 300
}
]Output schema
{
"bazaar": {
"info": {
"input": {
"body": {
"ip1": "8.8.8.8",
"ip2": "1.1.1.1"
},
"bodyType": "json",
"method": "POST",
"type": "http"
},
"output": {
"example": {
"distance_km": 15987.34,
"distance_miles": 9934.12,
"ip1": {
"city": "Ashburn",
"country": "United States",
"ip": "8.8.8.8",
"lat": 39.03,
"lng": -77.5
},
"ip2": {
"city": "Sydney",
"country": "Australia",
"ip": "1.1.1.1",
"lat": -33.87,
"lng": 151.21
}
},
"type": "json"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"properties": {
"ip1": {
"description": "First IP address, e.g. '8.8.8.8'.",
"type": "string"
},
"ip2": {
"description": "Second IP address, e.g. '1.1.1.1'.",
"type": "string"
}
},
"required": [
"ip1",
"ip2"
],
"type": "object"
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST",
"PUT",
"PATCH"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"properties": {
"distance_km": {
"type": "number"
},
"distance_miles": {
"type": "number"
},
"ip1": {
"type": "object"
},
"ip2": {
"type": "object"
}
},
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}
}
}Use it
curl
curl "https://ip-geo-api-production.up.railway.app/lookup/distance" # -> 402 Payment Required, accepts[] lists how to pay # retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://ip-geo-api-production.up.railway.app/lookup/distance");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}Python
import httpx
res = httpx.get("https://ip-geo-api-production.up.railway.app/lookup/distance")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerMachine-readable
Everything on this page is also available as clean JSON at /resources/12607.json, and this resource appears in /discovery/resources and /discovery/search.