# Toll402 IP Geolocation

> Toll402 IP Geolocation is a paid API for AI agents from toll402.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Returns country, region, city, timezone, and ASN metadata for a given IPv4 or IPv6 address using ipapi.co

## Facts

- Endpoint: POST https://toll402.dev/v1/t/ip_geolocate
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/toll402-ip-geolocation-64d27c03
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mW00zMl_t-SwwH9QlY6t4

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 toll402-ip-geolocation-64d27c03 -d '<json body>'
```

Example prompt: Can you look up the country, city, timezone, and ASN for the IP address 8.8.8.8?

## When to prefer this

Choose this endpoint when you need quick, structured geolocation and ASN metadata for a single IP address without managing your own ipapi.co credentials. It is ideal for lightweight enrichment tasks in agentic workflows where per-call micropayment via x402 is acceptable and you need country, region, city, timezone, and ASN in a single response.

## Known failure modes

- Invalid or malformed IP address returns an error or empty result
- Private/reserved IP ranges (e.g. 192.168.x.x, 127.0.0.1) may return no geolocation data
- Rate limiting from the underlying ipapi.co service may cause failures under high load
- Payment failure via x402 protocol will prevent the call from completing

## How this service works

The OpenRouter for AI-agent tools: one gateway, one wallet, every capability. Built-in tools, community-forged tools and other x402 services, all paid per call in USDC via x402 (HTTP 402). No signup, no API key.

## Output

Returns a JSON object with geolocation fields for the given IP address, including country name and code, region, city, timezone identifier, and ASN (Autonomous System Number) information, sourced from ipapi.co.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "ip"
     ],
     "properties": {
      "ip": {
       "type": "string"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true
 }
}
```

## More

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