# 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/workflows/zippopotam-us
- Handle: `@zippopotam-us`
- Category: [Maps](https://fous.com/workflows/category/maps)
- Source website: https://zippopotam.us
- Last verified: Sep 29, 2026
- Fous is not affiliated with Zippopotam.us.

## Methods

### Get postal code

Operation `get_postal_code`, version 1. 1 credit per call.

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 call.

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

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_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.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

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=120) 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.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_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);
```

Or describe the data in plain language: send `{"api":"@zippopotam-us","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## 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

### Is Fous affiliated with Zippopotam.us?

No. Fous is not affiliated with Zippopotam.us. This workflow reads the public zippopotam.us website and returns its data.

### How much does it cost?

Each run costs 1 credit. 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; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check 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/workflows/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/workflows/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/workflows/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/workflows/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/workflows/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/workflows/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/workflows/zoopla.md): UK homes for sale and to rent.
- [Google Maps API](https://fous.com/workflows/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 workflows](https://fous.com/workflows/category/maps)
