# 2s.io Reverse Geocoding

> 2s.io Reverse Geocoding is a paid API for AI agents from 2s.io, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-16).

Converts a latitude/longitude coordinate pair into a nearest formatted street address with structured address components, powered by OpenStreetMap data.

## Facts

- Endpoint: GET https://2s.io/api/geocode/reverse
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-2f8f7683
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2B0vXC-Yr0IkppFWdmrN7

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-2f8f7683
```

Example prompt: What's the nearest street address for the coordinates 40.7128, -74.0060? I need the full address broken down into house number, road, city, state, and zip code.

## When to prefer this

Use this endpoint when you need to convert raw GPS or map coordinates into a human-readable address or structured postal components. Ideal for enriching location data in pipelines, labeling map pins, or resolving device GPS output into actionable addresses. Prefer over forward geocoding when you already have coordinates and need the address, not vice versa.

## Known failure modes

- Coordinates out of range (-90..90 for lat, -180..180 for lon) return a 400 error
- Remote or ocean coordinates may return no address if no OSM data exists nearby
- Missing required lat or lon parameter returns a 400 validation error
- Payment not provided or insufficient returns a 402 Payment Required
- OpenStreetMap data may be outdated or incomplete for rural/newly developed areas

## How this service works

Reverse geocoding — latitude/longitude → nearest formatted address plus structured components (houseNumber, road, suburb, city, county, state, postcode, country, countryCode). Query: lat (-90..90), lon (-180..180). Underlying data is OpenStreetMap (ODbL). Sister: /api/geocode/address.

## Output

Returns the nearest formatted street address plus structured components including houseNumber, road, suburb, city, county, state, postcode, country, and countryCode for the given latitude/longitude coordinate.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "lat": 40.7128,
   "lon": -74.006
  }
 }
}
```

## 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": [
      "lat",
      "lon"
     ],
     "properties": {
      "lat": {
       "type": "number",
       "maximum": 90,
       "minimum": -90
      },
      "lon": {
       "type": "number",
       "maximum": 180,
       "minimum": -180
      }
     },
     "additionalProperties": false
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-2f8f7683/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)
