{"openapi":"3.1.0","info":{"title":"APIBooth - IP geolocation and ASN API","description":"IP geolocation and ASN from DB-IP Lite (CC BY 4.0), updated monthly; nullable fields. DB-IP Lite has reduced coverage and accuracy; coordinates are approximate, not a street address. VPN/proxy detection is not included.","contact":{"email":"support@apibooth.com"},"version":"0.1.0","x-guidance":"Use GET /v1/ip/{ip} for a public IPv4 or IPv6 address; example: GET /v1/ip/8.8.8.8. Invalid or private IPs return 400 before payment. First request without payment and read the x402 v2 PAYMENT-REQUIRED header on HTTP 402 for the current USDC amount, network and recipient. Check these terms against your budget before authorizing a payment, then retry the same URL using an x402 client. No account or API key is required. DB-IP Lite fields may be null; responses include attribution and database build timestamps. Coordinates are approximate; VPN/proxy detection is not included. If payment outcome is uncertain, retry the original signed request rather than creating a new payment. See /terms for recovery and contact information."},"servers":[{"url":"https://api.apibooth.com"}],"paths":{"/healthz":{"get":{"summary":"Health","operationId":"health_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/readyz":{"get":{"summary":"Ready","operationId":"ready_readyz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Index","operationId":"index__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/terms":{"get":{"summary":"Terms","operationId":"terms_terms_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/ip/{ip}":{"get":{"summary":"IP geolocation and ASN","description":"IP geolocation and ASN from DB-IP Lite (CC BY 4.0), updated monthly; nullable fields. DB-IP Lite has reduced coverage and accuracy; coordinates are approximate, not a street address. VPN/proxy detection is not included.","operationId":"query_v1_ip__ip__get","parameters":[{"name":"ip","in":"path","required":true,"schema":{"type":"string","description":"Public IPv4 or IPv6 address","examples":["8.8.8.8"],"title":"Ip"},"description":"Public IPv4 or IPv6 address"}],"responses":{"200":{"description":"IP data returned after confirmed payment.","content":{"application/json":{"schema":{"type":"object","properties":{"ip":{"type":"string"},"country":{"type":"object","properties":{"code":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["code","name"]},"region":{"type":["string","null"]},"city":{"type":["string","null"]},"organization":{"type":["string","null"]},"coordinates":{"type":"object","properties":{"latitude":{"type":["number","null"]},"longitude":{"type":["number","null"]}},"required":["latitude","longitude"]},"asn":{"type":["integer","null"]},"database_version":{"type":"object","properties":{"city":{"type":"integer"},"asn":{"type":"integer"}},"required":["city","asn"]},"attribution":{"type":"object","properties":{"source":{"type":"string"},"license":{"type":"string"},"url":{"type":"string"},"license_url":{"type":"string"}},"required":["source","license","url","license_url"]}},"required":["ip","country","region","city","coordinates","asn","organization","database_version","attribution"]},"example":{"ip":"8.8.8.8","country":{"code":"US","name":"United States"},"region":"California","city":"Mountain View","coordinates":{"latitude":37.0,"longitude":-122.0},"asn":15169,"organization":"Google","database_version":{"city":1790812800,"asn":1790812800},"attribution":{"source":"DB-IP Lite","license":"CC BY 4.0","url":"https://db-ip.com","license_url":"https://creativecommons.org/licenses/by/4.0/"}}}},"headers":{"PAYMENT-RESPONSE":{"description":"Base64-encoded x402 settlement response.","schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment required, rejected or not yet confirmed. The JSON body may be empty; read PAYMENT-REQUIRED for a new offer. For an uncertain payment retry the original signed request.","content":{"application/json":{"schema":{"type":"object"}}},"headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 payment requirements when offering a new payment; amounts are in USDC atomic units.","schema":{"type":"string"}}}},"400":{"description":"Invalid or non-public IP; rejected before payment.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"404":{"description":"IP absent from both databases; no settlement.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"413":{"description":"Payment header too large; rejected before payment.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"429":{"description":"Request rate limit reached; rejected before payment.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"503":{"description":"Lookup unavailable or payments paused. If a submitted payment is uncertain, retry the original signed request; see /terms.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}