# Geocoding & Reverse Geocoding (OpenStreetMap)

> Geocoding & Reverse Geocoding (OpenStreetMap) is a paid API for AI agents from bess-x402.onrender.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-30).

Converts an address or place name into geographic coordinates (forward geocoding) or converts coordinates into a nearest address (reverse geocoding) using OpenStreetMap data.

## Facts

- Endpoint: GET https://bess-x402.onrender.com/v1/geo/geocode?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/geocoding-reverse-geocoding-openstreetmap-a51d3323
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cpnDzond4_ovUD9vtXzzG

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 geocoding-reverse-geocoding-openstreetmap-a51d3323
```

Example prompt: What are the GPS coordinates for 221B Baker Street, London? Give me the lat/lon and the full structured address.

## When to prefer this

Choose this endpoint when you need low-cost, OpenStreetMap-based geocoding or reverse geocoding without requiring a Google Maps or proprietary API key. It is well-suited for maps, delivery logistics, distance calculations, and location enrichment pipelines. It supports multilingual results and up to 20 results per call, making it flexible for disambiguation use cases.

## Known failure modes

- No results found for ambiguous or misspelled address — empty results array returned
- Missing required query parameter (either `q` for forward or `lat`/`lon` for reverse) — 400 error
- Rate limit or payment failure — 402 or 429 response
- Service unavailable on Render cold start — 503 or slow first response
- Non-existent or very rural location may return low-confidence or distant result

## How this service works

Turn an address, place or landmark into coordinates with a structured address, or coordinates into the nearest address (reverse), from OpenStreetMap. Use for maps, delivery, distance calculations or location lookups.

## Output

Returns one or more geocoding results, each containing latitude, longitude, a human-readable display name, a structured address broken into components (street, city, country, postcode, etc.), the place type, and a bounding box. For reverse geocoding, returns the nearest address to the provided coordinates.

## 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"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "q": {
       "type": "string",
       "description": "Address or place name (forward geocoding)"
      },
      "lat": {
       "type": "number",
       "description": "Latitude (reverse geocoding)"
      },
      "lon": {
       "type": "number",
       "description": "Longitude (reverse geocoding)"
      },
      "lang": {
       "type": "string",
       "description": "Result language, e.g. en"
      },
      "limit": {
       "type": "integer",
       "description": "Maximum number of results (1-20)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/geocoding-reverse-geocoding-openstreetmap-a51d3323/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from bess-x402.onrender.com](https://www.zero.xyz/host/bess-x402.onrender.com/llms.txt)
