# OnchainExpat IP Lookup API

> OnchainExpat IP Lookup API is a paid API for AI agents from x402.onchainexpat.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Looks up geolocation and metadata for an IP address using a pay-per-request x402 protocol endpoint

## Facts

- Endpoint: POST https://x402.onchainexpat.com/api/x402-tools/ip/lookup
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onchainexpat-ip-lookup-api-4ce43a3e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_grrlEZspxFD8kf8tz4oa1

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 onchainexpat-ip-lookup-api-4ce43a3e -d '<json body>'
```

Example prompt: Can you look up the geolocation and ISP info for IP address 203.0.113.45?

## When to prefer this

Use this endpoint when you need pay-per-request IP geolocation lookups with no subscription required, paying only $0.01 USDC per call via the x402 protocol. Ideal for crypto-native workflows or agents operating with on-chain micropayments.

## Known failure modes

- Invalid or malformed IP address returns an error
- Private or reserved IP ranges may return no location data
- Payment failure via x402 protocol blocks the request
- Empty or missing IP input returns a validation error
- Rate limiting or quota errors if payment is not processed correctly

## How this service works

Pay-per-request AI, crypto, proxy, and utility APIs using x402 protocol

## Output

A JSON object containing geolocation details for the queried IP address, likely including country, city, region, ISP, latitude, longitude, and other IP metadata.

## Example request

```json
{
 "pokemon": "pikachu"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ip": {
   "type": "string",
   "description": "IPv4 or IPv6 address. Alias: 'address'. If omitted, looks up the requester's IP"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ip": {
   "type": "string"
  },
  "isp": {
   "type": "string"
  },
  "lat": {
   "type": "number"
  },
  "lon": {
   "type": "number"
  },
  "city": {
   "type": "string"
  },
  "cached": {
   "type": "boolean"
  },
  "region": {
   "type": "string"
  },
  "country": {
   "type": "string"
  },
  "timezone": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onchainexpat-ip-lookup-api-4ce43a3e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.onchainexpat.com](https://www.zero.xyz/host/x402.onchainexpat.com/llms.txt)
