# Open Brewery DB API

> Returns breweries by list, search, id, city or state, with address, coordinates, phone and website.

Category: Commerce & Marketplaces. Region: US. 8 endpoints at `https://api.hoshime.com/v1/openbrewerydb/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/openbrewerydb
## GET /v1/openbrewerydb/list

A page of breweries, optionally of one type such as micro or brewpub.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `limit` | integer | no | Items per page, 1 to 50. (default 20) |
| `type` | string | no | Only breweries of this type: micro, nano, regional, brewpub, large, planning, bar, contract, proprietor or closed. (one of micro, nano, regional, brewpub, large, planning, bar, contract, proprietor, closed; e.g. micro) |
| `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: `city` (string), `country` (string), `id` (string), `latitude` (number (double)), `longitude` (number (double)), `name` (string), `phone` (string), `postalCode` (string), `state` (string), `street` (string), `type` (string), `website` (string)

```bash
curl "https://api.hoshime.com/v1/openbrewerydb/list?type=micro" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/openbrewerydb/search

Breweries whose name, city or type matches the query.

Scope: `social:read` · Units: 1 · Cached: 360 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Words to search for, such as sierra nevada or portland. (e.g. sierra nevada) |
| `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: `city` (string), `country` (string), `id` (string), `latitude` (number (double)), `longitude` (number (double)), `name` (string), `phone` (string), `postalCode` (string), `state` (string), `street` (string), `type` (string), `website` (string)

```bash
curl "https://api.hoshime.com/v1/openbrewerydb/search?query=sierra+nevada" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/openbrewerydb/brewery

One brewery by its id: address, coordinates, phone and website.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Brewery id (a UUID), such as 70e66be3-fd92-4db0-86f3-0f05807cc4e2. (e.g. 70e66be3-fd92-4db0-86f3-0f05807cc4e2) |
| `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: `city` (string), `country` (string), `id` (string), `latitude` (number (double)), `longitude` (number (double)), `name` (string), `phone` (string), `postalCode` (string), `state` (string), `street` (string), `type` (string), `website` (string)

```bash
curl "https://api.hoshime.com/v1/openbrewerydb/brewery?id=70e66be3-fd92-4db0-86f3-0f05807cc4e2" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/openbrewerydb/random

Random breweries from the whole database, one to fifty of them.

Scope: `social:read` · Units: 1 · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `limit` | integer | no | Items per page, 1 to 50. (default 5; e.g. 2) |
| `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: `city` (string), `country` (string), `id` (string), `latitude` (number (double)), `longitude` (number (double)), `name` (string), `phone` (string), `postalCode` (string), `state` (string), `street` (string), `type` (string), `website` (string)

```bash
curl "https://api.hoshime.com/v1/openbrewerydb/random?limit=2" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/openbrewerydb/byCity

Breweries of one city, paged.

Scope: `social:read` · Units: 1 · Cached: 360 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `city` | string | yes | City name, such as San Diego. (e.g. san diego) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `limit` | integer | no | Items per page, 1 to 50. (default 20; e.g. 2) |
| `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: `city` (string), `country` (string), `id` (string), `latitude` (number (double)), `longitude` (number (double)), `name` (string), `phone` (string), `postalCode` (string), `state` (string), `street` (string), `type` (string), `website` (string)

```bash
curl "https://api.hoshime.com/v1/openbrewerydb/byCity?city=san+diego&limit=2" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/openbrewerydb/byState

Breweries of one state or province, paged.

Scope: `social:read` · Units: 1 · Cached: 360 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `state` | string | yes | State or province name, such as Ohio. (e.g. ohio) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `limit` | integer | no | Items per page, 1 to 50. (default 20; e.g. 2) |
| `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: `city` (string), `country` (string), `id` (string), `latitude` (number (double)), `longitude` (number (double)), `name` (string), `phone` (string), `postalCode` (string), `state` (string), `street` (string), `type` (string), `website` (string)

```bash
curl "https://api.hoshime.com/v1/openbrewerydb/byState?state=ohio&limit=2" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/openbrewerydb/byCountry

Breweries of one country, paged.

Scope: `social:read` · Units: 1 · Cached: 360 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `country` | string | yes | Country name, such as ireland. (e.g. ireland) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `limit` | integer | no | Items per page, 1 to 50. (default 20; e.g. 2) |
| `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: `city` (string), `country` (string), `id` (string), `latitude` (number (double)), `longitude` (number (double)), `name` (string), `phone` (string), `postalCode` (string), `state` (string), `street` (string), `type` (string), `website` (string)

```bash
curl "https://api.hoshime.com/v1/openbrewerydb/byCountry?country=ireland&limit=2" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/openbrewerydb/meta

How many breweries the database holds, overall and by type, state and country.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `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: `countries` (Count[]), `countries[].count` (integer (int64)), `countries[].name` (string), `states` (Count[]), `states[].count` (integer (int64)), `states[].name` (string), `total` (integer (int64)), `types` (Count[]), `types[].count` (integer (int64)), `types[].name` (string)

```bash
curl "https://api.hoshime.com/v1/openbrewerydb/meta" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
