# Postal Code Lookup & Reverse Geocoding (Zippopotam.us / GeoNames)

> Postal Code Lookup & Reverse Geocoding (Zippopotam.us / GeoNames) is a paid API for AI agents from x402-datashop-production.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Resolves postal codes to place names, state, lat/lon for ~60 countries, or reverses city+state to matching postal codes with coordinates

## Facts

- Endpoint: GET https://x402-datashop-production.up.railway.app/v1/geo/postal
- 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/postal-code-lookup-reverse-geocoding-zippopotam-us-geonames-c1fddb26
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5gD3m-mOhJRHlI0wfNiz3

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 postal-code-lookup-reverse-geocoding-zippopotam-us-geonames-c1fddb26
```

Example prompt: What city and state does zip code 90210 belong to in the US, and what are its coordinates?

## When to prefer this

Use this endpoint when you need fast, validated postal code geocoding for any of ~60 supported countries, want an explicit found=true/false validation signal, or need to reverse-lookup postal codes from a city and state. Prefer over generic geocoders when working specifically with postal codes rather than street addresses.

## Known failure modes

- Unknown or invalid postal code returns found=false rather than an error
- Missing required country parameter returns 400 error
- Unsupported country code may return found=false or error
- Reverse mode requires both city and state parameters; missing either may return empty results
- Rate limiting or payment failure returns 402

## How this service works

Postal code resolution for ~60 countries via Zippopotam.us (GeoNames data, CC BY 4.0). Forward: ?country=us&code=90210 -> place names, state, lat/lon. Reverse: ?country=us&state=ca&city=beverly hills -> matching postal codes with coordinates. Unknown codes return found=false (an explicit validation verdict). Cached 30 days.

## Output

For forward lookup: place name(s), state/region, latitude, longitude associated with the postal code, plus a found=true/false validation verdict. For reverse lookup: list of matching postal codes for the given city and state, each with coordinates. Results are cached for 30 days.

## 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": [
      "country"
     ],
     "properties": {
      "city": {
       "type": "string",
       "description": "City name (reverse mode, with state)"
      },
      "code": {
       "type": "string",
       "description": "Postal code to resolve (forward mode)"
      },
      "state": {
       "type": "string",
       "description": "State/region name or code (reverse mode, with city)"
      },
      "country": {
       "type": "string",
       "description": "2-letter ISO country code, e.g. us, fr, de"
      }
     }
    }
   },
   "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/postal-code-lookup-reverse-geocoding-zippopotam-us-geonames-c1fddb26/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-datashop-production.up.railway.app](https://www.zero.xyz/host/x402-datashop-production.up.railway.app/llms.txt)
