# X Pay IP Lookup

> X Pay IP Lookup is a paid API for AI agents from www.api-xpay.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-02).

Returns the public IP address of the calling client, paid per-request via x402 USDC on Base.

## Facts

- Endpoint: GET https://www.api-xpay.com/x402/ip?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x-pay-ip-lookup-e5be80bc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RTbD2IkZ2OBBUNtBkV8RK

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 x-pay-ip-lookup-e5be80bc
```

Example prompt: What's the public IP address this request is coming from? Use the X Pay pay-per-request IP lookup.

## When to prefer this

Choose this endpoint when you need a simple, programmatic public IP lookup and are already operating in a web3 / x402 micropayment context with USDC on Base. It is ideal for agents that need to self-identify their outbound IP without managing API keys, relying instead on per-call USDC payments. Prefer alternatives if you need geolocation data beyond raw IP, bulk lookups, or if you are not set up for x402 payments.

## Known failure modes

- Payment not received or insufficient USDC balance — returns HTTP 402 Payment Required
- Invalid HTTP method (only GET, HEAD, DELETE are accepted) — returns 405 or schema validation error
- Network or server error — returns 5xx with no IP data
- Malformed request headers — may result in failed schema validation

## How this service works

Return the requester IP address

## Output

Returns a JSON object containing the detected public IP address of the caller ('ip'), the payment asset used ('asset', e.g. 'USDC'), the network ('base'), and a boolean success flag. Example: {"ip":"203.0.113.10","asset":"USDC","network":"base","success":true}.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ip": "203.0.113.10",
  "asset": "USDC",
  "network": "base",
  "success": true
 }
}
```

## More

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