# IP Geo API – My IP Geolocation

> IP Geo API – My IP Geolocation is a paid API for AI agents from ip-geo-api-production.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Geolocates the caller's own IP address (auto-detected from request headers), returning country, region, city, coordinates, timezone, ISP, ASN, VPN/proxy/datacenter flags, and more.

## Facts

- Endpoint: POST https://ip-geo-api-production.up.railway.app/lookup/myip
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ip-geo-api-my-ip-geolocation-7632d890
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_R2Ifuke1Lan_YkPIuQE2I

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-geo-api-my-ip-geolocation-7632d890 -d '<json body>'
```

Example prompt: What's my current IP address and where is it located — give me the country, city, timezone, and whether it's flagged as a VPN or proxy.

## When to prefer this

Use this endpoint when you need to geolocate the current caller/agent making the request without supplying an explicit IP address. It is ideal for self-identification scenarios, personalization pipelines, or security checks where the goal is to locate 'myself' rather than an arbitrary IP. Prefer the sibling /lookup/ip endpoint when you have a specific IP to query, or /lookup/batch for multiple IPs.

## Known failure modes

- IP cannot be determined from headers (e.g. missing forwarding headers) — may return found: false
- IP is from a private/reserved range and cannot be geolocated — returns partial or empty geo fields
- VPN/proxy detection fields may be null if detection data is unavailable for the IP
- Service unavailable or payment failure — HTTP 402 or 5xx error

## How this service works

Geolocate the caller's own IP (derived from request headers); same fields as /lookup/ip.

## Output

Returns a JSON object with the auto-detected IP address, country, country code, region, region code, city, postal code, latitude, longitude, timezone, ISP, organization, ASN, boolean flags for VPN/proxy/datacenter detection, the source of the geo data, and a 'caller_ip_source' field indicating how the IP was extracted from request headers.

## 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": [],
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "ip": {
       "type": "string"
      },
      "asn": {
       "type": "string"
      },
      "isp": {
       "type": "string"
      },
      "org": {
       "type": "string"
      },
      "city": {
       "type": "string"
      },
      "found": {
       "type": "boolean"
      },
      "is_vpn": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "region": {
       "type": "string"
      },
      "source": {
       "type": "string"
      },
      "country": {
       "type": "string"
      },
      "is_proxy": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "latitude": {
       "type": "number"
      },
      "timezone": {
       "type": "string"
      },
      "longitude": {
       "type": "number"
      },
      "postal_code": {
       "type": "string"
      },
      "region_code": {
       "type": "string"
      },
      "country_code": {
       "type": "string"
      },
      "is_datacenter": {
       "type": "boolean"
      },
      "caller_ip_source": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ip-geo-api-my-ip-geolocation-7632d890/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ip-geo-api-production.up.railway.app](https://www.zero.xyz/host/ip-geo-api-production.up.railway.app/llms.txt)
