# geo402 IP Geolocation

> geo402 IP Geolocation is a paid API for AI agents from geo402.alogos.xyz, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Looks up geolocation data (country, city, coordinates, timezone) for a given IPv4 or IPv6 address, or the caller's own IP if none is provided.

## Facts

- Endpoint: GET https://geo402.alogos.xyz/v1/ip
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/geo402-ip-geolocation-64b4f9ec
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_CRqdF75SldDViVVsfrE1F

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 geo402-ip-geolocation-64b4f9ec
```

Example prompt: What city and country is the IP address 203.0.113.42 located in, and what timezone is it in?

## When to prefer this

Use this endpoint when you need pay-per-call IP geolocation with no API key or subscription required, especially in agent workflows where payment is handled via x402 (Base/USDC) or MPP (Tempo/pathUSD). Ideal for one-off lookups or agentic pipelines where per-request billing is preferable to a subscription.

## Known failure modes

- Invalid IP format returns an error response
- Private/reserved IP ranges (e.g. 192.168.x.x, 10.x.x.x) may return no geolocation data or limited results
- Payment failure via x402/MPP results in 402 Payment Required response before data is returned
- IPv6 addresses may have lower geolocation accuracy than IPv4

## How this service works

Pay-per-call geolocation utility for AI agents: geocoding, reverse geocoding, timezone lookup, and great-circle distance. No API key, no subscription — agents pay per request via x402 (Base/USDC) or MPP (Tempo/pathUSD).

## Output

Returns geolocation data for the queried IP address, including country, city, region, latitude/longitude coordinates, and timezone. If no IP is provided, defaults to geolocating the caller's own IP address.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ip": {
   "type": "string",
   "description": "IPv4 or IPv6 address. Defaults to the caller's IP if omitted."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ip": {
   "type": "string"
  },
  "lat": {
   "type": "number"
  },
  "lon": {
   "type": "number"
  },
  "timezone": {
   "type": "string"
  },
  "countryCode": {
   "type": "string"
  },
  "countryName": {
   "type": "string"
  }
 },
 "additionalProperties": true
}
```

## More

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