# 2s.io IP Geolocation

> 2s.io IP Geolocation is a paid API for AI agents from 2s.io, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-20, last successful call 2026-08-12).

Geolocate an IPv4 or IPv6 address to country, region, city, and coordinates.

## Facts

- Endpoint: GET https://2s.io/api/geo/ip?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Last successful call: 2026-08-12
- Success rate: 90% of calls made through Zero
- Rating: 4.9 / 5 from 9 reviews
- Activations on Zero: 30
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-c1ed7c45
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_amyaiqVZH_BSpUlg8Q-sY

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 2s-io-c1ed7c45
```

Example prompt: What country and city is the IP address 203.0.113.42 located in?

## When to prefer this

Use this endpoint when you need to resolve an IP address to a geographic location (country, region, city, coordinates) quickly and cheaply at $0.001 per call. Prefer it over heavier identity or threat-intelligence services when all you need is basic geolocation data.

## Known failure modes

- Invalid or malformed IP address returns an error
- Private/reserved IP ranges (e.g. 192.168.x.x, 127.0.0.1) may return no location or null fields
- IPv6 addresses with limited coverage may return partial results
- Missing 'ip' query parameter causes a 400-level error

## How this service works

Geolocate a single IPv4 or IPv6 address. Returns country (name + ISO code), region (name + code), city, ZIP, lat/lon, timezone, ISP, organization, and AS number + name. For bulk lookups (up to 100 IPs in one call) use /api/ipinfo/bulk instead. Lat/lon precision is city-level, not GPS.

## Output

Returns the country, region, city, and geographic coordinates (latitude/longitude) associated with the given IPv4 or IPv6 address.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "ip": "8.8.8.8"
  }
 }
}
```

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "ip"
     ],
     "properties": {
      "ip": {
       "type": "string",
       "maxLength": 45,
       "minLength": 2
      }
     },
     "additionalProperties": false
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-c1ed7c45/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
