# IP Geolocation

> IP Geolocation is a paid API for AI agents from data.tollkit.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-11).

Resolves an IPv4 or IPv6 address to its geographic location including city, region, country, continent, and coordinates

## Facts

- Endpoint: POST https://data.tollkit.dev/ip?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ip-geolocation-4e62ef88
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dVmGcjBppjWFyKSl7lAoN

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability ip-geolocation-4e62ef88 -d '<json body>'
```

Example prompt: Can you tell me what city and country the IP address 203.0.113.45 is located in?

## When to prefer this

Choose this endpoint when you need fast, pay-per-call IP geolocation without an account or API key, paid inline with USDC via x402. It is backed by the DB-IP City Lite dataset and returns structured city, region, country, and coordinate data. Prefer it for lightweight enrichment use cases such as fraud detection, content personalization, or GDPR region checks where street-level precision is not required.

## Known failure modes

- Private or reserved IP ranges (e.g. 10.x.x.x, 192.168.x.x) may return no location data
- Malformed IP address strings will likely return an error or empty result
- VPN or proxy IPs may resolve to the VPN server location rather than the true user location
- Geolocation precision is city-level only — street-level accuracy is not available
- Database may lag slightly behind IP reassignments due to monthly update cadence

## How this service works

SEC filings and financials, IP lookup, US weather, airport delays, address geocoding and exchange rates. Other Tollkit tools are described at: https://extract.tollkit.dev/openapi.json, https://attest.tollkit.dev/openapi.json, https://web.tollkit.dev/openapi.json, https://chain.tollkit.dev/openapi.json.

## Output

A JSON object containing the IP address, resolved city, region, country (code, name, and EU membership flag), continent (code and name), latitude, longitude, precision note (city-level approximate), and attribution to DB-IP City Lite dataset.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ip": {
   "type": "string",
   "description": "IPv4 or IPv6 address."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ip": "8.8.8.8",
  "city": "Mountain View",
  "region": "California",
  "country": {
   "code": "US",
   "name": "United States",
   "in_eu": false
  },
  "database": "DB-IP City Lite 2026-10",
  "latitude": 37.422,
  "continent": {
   "code": "NA",
   "name": "North America"
  },
  "longitude": -122.085,
  "precision": "City-level and approximate. Not a street address.",
  "attribution": "IP Geolocation by DB-IP (https://db-ip.com), licensed CC BY 4.0"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ip-geolocation-4e62ef88/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from data.tollkit.dev](https://www.zero.xyz/host/data.tollkit.dev/llms.txt)
