# Zippopotam.us API

> Returns places, states and coordinates for a postal code, and postal codes with positions for a city in a state.

Category: Utilities. Region: global. 2 endpoints at `https://api.hoshime.com/v1/zippopotam/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/zippopotam
## GET /v1/zippopotam/lookup

The places of one postal code in one country, with their state and position.

Scope: `social:read` · Units: 1 · Cached: 1440 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `country` | string | yes | ISO 3166 country code, such as us or de. (e.g. us) |
| `postcode` | string | yes | Postal code, such as 90210. (e.g. 90210) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `country` (string), `countryCode` (string), `places` (Place[]), `places[].latitude` (number (double)), `places[].longitude` (number (double)), `places[].name` (string), `places[].state` (string), `places[].stateCode` (string), `postcode` (string)

```bash
curl "https://api.hoshime.com/v1/zippopotam/lookup?country=us&postcode=90210" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/zippopotam/city

The postal codes of one city or town in a state or province, with the position of each.

Scope: `social:read` · Units: 1 · Cached: 1440 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `country` | string | yes | ISO 3166 country code, such as us. (e.g. us) |
| `state` | string | yes | State or province code, such as ca. (e.g. ca) |
| `city` | string | yes | City or town name, such as beverly hills. (e.g. beverly hills) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `country` (string), `countryCode` (string), `placeName` (string), `places` (CityPlace[]), `places[].latitude` (number (double)), `places[].longitude` (number (double)), `places[].placeName` (string), `places[].postCode` (string), `state` (string), `stateCode` (string)

```bash
curl "https://api.hoshime.com/v1/zippopotam/city?country=us&state=ca&city=beverly+hills" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
