# Zippopotam.us API

> Zippopotam.us returns postal codes, places, regions, and coordinates as a workflow and API.

Zippopotam.us looks up places, regions, and coordinates for a postal code; provide a postal code and optionally a country. Search postal codes finds postal codes, place names, and coordinates for a town and state or region; provide both and optionally a country.

- Page: https://fous.com/tools/zippopotam-us
- Handle: `@zippopotam-us`
- Category: [Maps](https://fous.com/tools/category/maps)
- Source website: https://zippopotam.us
- Last verified: Sep 29, 2026

## Methods

### Get postal code

Operation `get_postal_code`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get places, regions, and coordinates for a postal code in a supported country. Some postal codes may list more than one place.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `country` | string | no | `"Germany"` | Country name or two-letter country code, such as Germany or DE. Defaults to United States. |
| `postal_code` | string | yes | `"90210"` | Postal code to look up, such as 90210 or 10115. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "postal_code"
  ],
  "properties": {
    "country": {
      "type": "string",
      "default": "United States",
      "description": "Country name or two-letter country code, such as Germany or DE. Defaults to United States.",
      "examples": [
        "Germany",
        "US"
      ]
    },
    "postal_code": {
      "type": "string",
      "description": "Postal code to look up, such as 90210 or 10115.",
      "examples": [
        "90210",
        "10115"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "postal_code": "90210"
    },
    {
      "country": "Germany",
      "postal_code": "10115"
    },
    {
      "country": "US",
      "postal_code": "90210"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `places` | array |  | Places using this postal code. |
| `places[].state` | string or null | `"California"` | State or region name. |
| `places[].latitude` | number or null | `34.0901` | Latitude in decimal degrees. |
| `places[].page_url` | string | `"https://api.zippopotam.us/us/90210"` | Link to this postal code on Zippopotam.us. |
| `places[].longitude` | number or null | `-118.4065` | Longitude in decimal degrees. |
| `places[].place_name` | string or null | `"Beverly Hills"` | Place name. |
| `places[].state_abbreviation` | string or null | `"CA"` | State or region abbreviation. |
| `country` | string | `"United States"` | Country name. |
| `postal_code` | string | `"90210"` | Postal code looked up. |

**Example input**

```json
{
  "postal_code": "90210"
}
```

**Example output**

```json
{
  "places": [
    {
      "state": "California",
      "latitude": 34.0901,
      "page_url": "https://api.zippopotam.us/us/90210",
      "longitude": -118.4065,
      "place_name": "Beverly Hills",
      "state_abbreviation": "CA"
    }
  ],
  "country": "United States",
  "postal_code": "90210"
}
```

### Search postal codes

Operation `search_postal_codes`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Find postal codes, place names and coordinates for a town and state or region in a supported country. Some region names outside the mapped countries may require an abbreviation.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `town` | string | yes | `"Beverly Hills"` | Town to search, for example Beverly Hills. |
| `state` | string | yes | `"California"` | State or region name or abbreviation, for example California or CA. |
| `country` | string | no | `"US"` | Country name or two-letter country code, for example United States or US. Defaults to United States. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "town",
    "state"
  ],
  "properties": {
    "town": {
      "type": "string",
      "description": "Town to search, for example Beverly Hills.",
      "examples": [
        "Beverly Hills",
        "Toronto",
        "Berlin"
      ]
    },
    "state": {
      "type": "string",
      "description": "State or region name or abbreviation, for example California or CA.",
      "examples": [
        "California",
        "CA",
        "Ontario"
      ]
    },
    "country": {
      "type": "string",
      "default": "United States",
      "description": "Country name or two-letter country code, for example United States or US. Defaults to United States.",
      "examples": [
        "US",
        "Canada",
        "Germany"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "town": "Beverly Hills",
      "state": "California"
    },
    {
      "town": "Beverly Hills",
      "state": "CA",
      "country": "US"
    },
    {
      "town": "Toronto",
      "state": "Ontario",
      "country": "Canada"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `postal_codes` | array |  | Postal codes in ascending order; empty if none match. |
| `postal_codes[].town` | string | `"Beverly Hills"` | Town searched. |
| `postal_codes[].state` | string | `"California"` | State or region name. |
| `postal_codes[].country` | string | `"United States"` | Country name. |
| `postal_codes[].latitude` | number or null | `33.7866` | Latitude, if available. |
| `postal_codes[].longitude` | number or null | `-118.2987` | Longitude, if available. |
| `postal_codes[].page_link` | string | `"https://zippopotam.us/us/90209"` | Link to the postal code details. |
| `postal_codes[].place_name` | string | `"Beverly Hills"` | Place name associated with the postal code. |
| `postal_codes[].postal_code` | string | `"90209"` | Postal code. |

**Example input**

```json
{
  "town": "Beverly Hills",
  "state": "California"
}
```

**Example output**

```json
{
  "postal_codes": [
    {
      "town": "Beverly Hills",
      "state": "California",
      "country": "United States",
      "latitude": 33.7866,
      "longitude": -118.2987,
      "page_link": "https://zippopotam.us/us/90209",
      "place_name": "Beverly Hills",
      "postal_code": "90209"
    },
    {
      "town": "Beverly Hills",
      "state": "California",
      "country": "United States",
      "latitude": 34.0901,
      "longitude": -118.4065,
      "page_link": "https://zippopotam.us/us/90210",
      "place_name": "Beverly Hills",
      "postal_code": "90210"
    },
    {
      "town": "Beverly Hills",
      "state": "California",
      "country": "United States",
      "latitude": 34.0652,
      "longitude": -118.383,
      "page_link": "https://zippopotam.us/us/90211",
      "place_name": "Beverly Hills",
      "postal_code": "90211"
    }
  ]
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@zippopotam-us",
  "visibility": "public",
  "operation": "get_postal_code",
  "version": 1,
  "input": {
    "postal_code": "90210"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@zippopotam-us\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_postal_code\",\n  \"version\": 1,\n  \"input\": {\n    \"postal_code\": \"90210\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=180) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@zippopotam-us",
  "visibility": "public",
  "operation": "get_postal_code",
  "version": 1,
  "input": {
    "postal_code": "90210"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/zippopotam-us`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `get_postal_code`: Get postal code. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `search_postal_codes`: Search postal codes. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-zippopotam-us https://api.fous.com/mcp/tools/zippopotam-us --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Find places associated with a postal code
- Look up a postal code’s region and coordinates
- Find postal codes for a town and state
- Compare postal code locations across towns

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this Zippopotam.us tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a Zippopotam.us account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from zippopotam.us when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Sep 29, 2026.

### What places use a postal code?

Get postal code returns places, regions, and coordinates for the postal code you provide.

### Which postal codes match a town and region?

Search postal codes returns matching postal codes, place names, and coordinates for the town and state or region you provide.

## Related

- [USPS API](https://fous.com/tools/usps.md): USPS provides latest available package tracking, standardized U.S. addresses with ZIP+4, recommended cities for five-digit ZIP Codes, and estimated domestic postage and delivery dates.
- [OpenStreetMap API](https://fous.com/tools/openstreetmap.md): OpenStreetMap returns place coordinates, address details, nearby readable place information, and ordered place search results from contributor-created data; results reflect mapped features and may be incomplete or differ from landmarks.
- [India Post PIN Codes API](https://fous.com/tools/india-post-pin-codes.md): India Post PIN Codes returns Indian six-digit PIN codes and matching post offices, with branch types, delivery status, postal areas, districts, and states.
- [Postcodes.io API](https://fous.com/tools/postcodes-io.md): Postcodes.io provides UK postcode, location and administrative information; nearby postcode results include distance and coordinates, while retired postcodes lack administrative details.
- [US Census Bureau API](https://fous.com/tools/us-census-bureau.md): US Census Bureau returns statistics from varying Census years, population estimates through July 1, and address geographies using Census vintages that may differ from representation.
- [AutoZone API](https://fous.com/tools/autozone.md): AutoZone finds parts and stores; engine fit may need confirmation, prices or warranties may be missing beyond 24 parts, and store listings cap at 25.
- [Zoopla API](https://fous.com/tools/zoopla.md): UK homes for sale and to rent.
- [Google Maps API](https://fous.com/tools/google-maps.md): Google Maps returns nearby places, public place details, up to 100 public reviews, and up to three routes; transit options vary by departure time.
- [All Maps tools](https://fous.com/tools/category/maps)
