# Reverse Geocoding API

> Reverse Geocoding API is a paid API for AI agents from x402-weather.onrender.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-12-03).

Converts a latitude/longitude coordinate pair into the nearest city or town, returning name, country, population, distance, IANA timezone, and GeoNames ID.

## Facts

- Endpoint: GET https://x402-weather.onrender.com/reverse-geocode?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-03
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/reverse-geocoding-api-dd33cc60
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_t8BKs6soJHCDjthfJClBS

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 reverse-geocoding-api-dd33cc60
```

Example prompt: What city is closest to coordinates 48.8566° N, 2.3522° E, and what timezone is it in?

## When to prefer this

Use this endpoint when you need a fast, affordable single-call reverse geocode that also returns the IANA timezone and GeoNames ID alongside the city name — especially useful when labelling GPS points, determining timezone offsets from coordinates, or enriching location data at $0.002 per call without being charged for invalid inputs.

## Known failure modes

- Latitude out of range (-90 to 90) returns an error and no charge
- Longitude out of range (-180 to 180) returns an error and no charge
- Coordinates in remote ocean areas with no nearby city may return an error or the nearest distant settlement
- Missing required lat or lon parameter returns an error

## How this service works

Find the nearest city or town to a latitude and longitude. Returns name, country, distance in km, population, IANA timezone and GeoNames ID. Useful for labelling GPS points, timezone lookup from coordinates and grouping locations by city. Invalid or unknown inputs return an error and are not charged.

## Output

Returns the nearest city or town name, its country, the distance in km from the queried coordinate, the city's population, the IANA timezone string (e.g. 'America/New_York'), and the GeoNames ID. Invalid or unrecognized coordinates return an error and are not billed.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "lat",
      "lon"
     ],
     "properties": {
      "lat": {
       "type": "number",
       "description": "Latitude, -90 to 90."
      },
      "lon": {
       "type": "number",
       "description": "Longitude, -180 to 180."
      }
     }
    }
   },
   "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/reverse-geocoding-api-dd33cc60/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-weather.onrender.com](https://www.zero.xyz/host/x402-weather.onrender.com/llms.txt)
