# Open Brewery Db Scraper (`zerobreak/open-brewery-db-scraper-202610120341`) Actor

Open Brewery DB Scraper is a Python tool designed to query and extract craft brewery names, types, addresses, geographic coordinates, phone numbers, and website URLs from the Open Brewery DB API. It exports structured brewery datasets for location mapping and market research.

- **URL**: https://apify.com/zerobreak/open-brewery-db-scraper-202610120341.md
- **Developed by:** [ZeroBreak](https://apify.com/zerobreak) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### Open Brewery DB Scraper — Breweries by City and State

### Overview

Open Brewery DB Scraper collects brewery records and organizes them into a structured dataset. Filter breweries by city, state or province, brewery type, and postal code, search by brewery name, retrieve a random brewery, or collect brewery statistics by category.

Each brewery is saved as a flat dataset row, making it easier to analyze locations, build business directories, and refresh brewery lists. Export collected data as JSON, CSV, or Excel through the Apify dataset.

### Features

- **Location filtering:** Find breweries by city, state or province, and postal code.
- **Brewery type filtering:** Filter microbreweries, brewpubs, regional breweries, and other supported types.
- **Name search:** Find breweries using a search term.
- **Random brewery:** Retrieve a randomly selected brewery.
- **Metadata collection:** Gather total counts and breakdowns by state, country, and brewery type.
- **Structured records:** Collect brewery names, addresses, contact information, locations, and other available details.
- **Duplicate prevention:** Skip brewery IDs that have already been saved during the run.
- **Flexible exports:** Download results as JSON, CSV, or Excel.

### Use Cases

- **City-based directories:** Build lists of breweries in Austin or other cities.
- **State-level research:** Analyze brewery distribution across Texas or other states.
- **Business research:** Organize brewery addresses, phone numbers, and websites.
- **Name discovery:** Search for breweries using partial names or keywords.
- **Market analysis:** Compare brewery counts across locations and categories.
- **Recurring data collection:** Refresh brewery datasets periodically and compare changes over time.
- **International records:** Preserve original brewery names and address details, including non-English characters.

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `mode` | String | `breweries` | Collection mode: `breweries`, `search`, `single`, or `meta`. |
| `cities` | Array | `["austin"]` | City names used for brewery listings and metadata collection. |
| `states` | Array | `[]` | State or province names, such as `texas`. |
| `breweryType` | String | Empty | Filter by brewery type: `micro`, `nano`, `regional`, `brewpub`, `large`, `planning`, `bar`, `contract`, `proprietor`, or `closed`. |
| `searchQuery` | String | Empty | Name or keyword to search for when `mode` is `search`. |
| `postalCodes` | Array | `[]` | Postal or ZIP codes used for listings and metadata collection. |
| `maxItems` | Integer | `100` | Maximum number of dataset rows to save. Hard maximum: 1,000. |
| `requestDelaySecs` | Number | `0.5` | Minimum pause between requests; minimum supported value is 0.5 seconds. |
| `timeoutSecs` | Integer | `300` | Maximum run duration in seconds. Previously saved rows are retained when the run stops. |
| `requestTimeoutSecs` | Integer | `30` | Maximum wait for an individual response. |

#### Example Input

**1. Collect breweries in Austin**

```json
{
  "mode": "breweries",
  "cities": ["austin"],
  "states": [],
  "breweryType": "",
  "searchQuery": "",
  "postalCodes": [],
  "maxItems": 100,
  "requestDelaySecs": 0.5,
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30
}
```

**2. Search breweries by name**

```json
{
  "mode": "search",
  "searchQuery": "dog",
  "maxItems": 100,
  "requestDelaySecs": 0.5,
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30
}
```

**3. Collect Texas brewery statistics**

```json
{
  "mode": "meta",
  "cities": [],
  "states": ["texas"],
  "breweryType": "",
  "postalCodes": [],
  "maxItems": 100
}
```

For metadata collection across the state, clear the default city filter so results are not restricted to Austin.

**4. Filter by brewery type**

```json
{
  "mode": "breweries",
  "cities": ["austin"],
  "breweryType": "micro",
  "maxItems": 100
}
```

### What Data Does This Actor Extract?

Each brewery is represented by one structured dataset row. Metadata mode can also produce summary rows containing total counts and breakdowns by state, country, and brewery type.

The fields available depend on the selected mode and the information provided for each record.

#### Extracted Data Fields

| Field | Type | Description |
|---|---|---|
| `id` | String | Brewery identifier or generated identifier for a metadata row. |
| `name` | String | Brewery name. |
| `brewery_type` | String | Brewery classification, such as `micro`, `brewpub`, or `closed`. |
| `address_1` | String | Primary street address. |
| `address_2` | String or null | Additional address information. |
| `address_3` | String or null | Third address line, when available. |
| `city` | String | City where the brewery is located. |
| `state_province` | String | State or province. |
| `postal_code` | String | Postal or ZIP code. |
| `country` | String | Country. |
| `longitude` | Number or null | Geographic longitude, when available. |
| `latitude` | Number or null | Geographic latitude, when available. |
| `phone` | String | Brewery telephone number, when available. |
| `website_url` | String | Brewery website address, when available. |
| `state` | String | State name, when supplied in the record. |
| `street` | String | Street address, when available. |
| `mode` | String | Collection mode associated with the row. |
| `scraped_at` | String | Timestamp indicating when the row was saved, in UTC. |
| `meta_total` | Integer | Overall count included in a metadata summary. |
| `meta_bucket` | String | Metadata category: `total`, `by_state`, `by_country`, or `by_type`. |
| `meta_label` | String | State, country, brewery type, or other label associated with a count. |
| `meta_count` | Integer | Count associated with a metadata label. |

#### Example Output

```json
{
  "id": "9c5a66c8-cc13-416f-a5d9-0a769c87d318",
  "name": "(512) Brewing Co",
  "brewery_type": "micro",
  "address_1": "407 Radam Ln Ste F200",
  "address_2": null,
  "address_3": null,
  "city": "Austin",
  "state_province": "Texas",
  "postal_code": "78745-1197",
  "country": "United States",
  "longitude": null,
  "latitude": null,
  "phone": "5129211545",
  "website_url": "BREWERY_WEBSITE_URL",
  "state": "Texas",
  "street": "407 Radam Ln Ste F200",
  "mode": "breweries",
  "scraped_at": "2026-10-12T00:00:00+00:00"
}
```

The example illustrates the record structure. Actual values depend on the records available when the actor runs, and some fields may be null or absent.

### Working with Your Dataset

After a run completes, open the dataset in Apify to review and export the collected records.

- **JSON:** Use for programmatic processing and structured data storage.
- **CSV:** Use for spreadsheets, filtering, and business-directory workflows.
- **Excel:** Use for manual review, reporting, and analysis.

You can filter records by city, state, brewery type, or postal code in your downstream workflow. Metadata rows are useful for aggregate analysis, while brewery rows contain individual business details.

### Important Notes

- The default collection mode is `breweries`, with Austin as the default city.
- Supported modes are `breweries`, `search`, `single`, and `meta`.
- Search mode requires a non-empty `searchQuery`.
- Listing and search modes can paginate through available results until a page is short or empty, or the configured item limit is reached.
- The maximum number of saved rows is 1,000 per run.
- The default item limit is 100. Increase `maxItems` to collect a larger result set.
- A low item limit can restrict how many brewery records or metadata rows are saved.
- Some breweries may not have a phone number, website, complete address, or geographic coordinates.
- Brewery names and address fields are retained as provided by the source data.
- Results reflect the records available at collection time. Newly added breweries and changes to brewery status depend on source updates.
- Metadata mode produces aggregate count records rather than only individual brewery listings.
- The actor uses a minimum request delay of 0.5 seconds to moderate collection activity.

### FAQ

**What collection modes are available?**

The actor supports four modes: `breweries` for filtered listings, `search` for brewery-name searches, `single` for a random brewery, and `meta` for summary counts.

**Can I search by city and state?**

Yes. Provide city and state or province filters in the input. You can also filter by brewery type and postal code where supported.

**Can I collect only microbreweries or brewpubs?**

Yes. Set `breweryType` to a supported value, such as `micro` or `brewpub`.

**What does metadata mode return?**

Metadata mode collects aggregate information, including total counts and breakdowns by state, country, and brewery type, depending on the selected filters and available data.

**Why are some fields empty?**

Not every brewery record contains complete contact, address, or geographic information. Missing values may appear as null or may not be present in a particular record.

**Why did the actor collect only 100 rows?**

The default `maxItems` setting is 100. Increase this value to collect more rows, up to the hard maximum of 1,000 per run.

**Can I export the results to a spreadsheet?**

Yes. Download the dataset in CSV or Excel format for spreadsheet analysis, or choose JSON for structured data workflows.

**How current are the results?**

The dataset reflects the information available during the run. Updates to brewery names, locations, and operating status depend on when the underlying data is updated.

### Disclaimer

This actor is an independent data-collection tool and is not affiliated with, endorsed by, or officially associated with Open Brewery DB or its owners. Users are responsible for evaluating whether their intended collection, storage, and use of the resulting data comply with applicable requirements.

### Is Web Scraping Legal?

Collecting information that is already public is generally legal. Scraping is not the same thing as hacking, and there is no single law that bans it. The limits are the usual ones: do not break into accounts, do not take private or confidential data, and be careful with personal data and copyrighted works. A site's terms can also restrict how you access it. Facts such as a public name, price, or rating are not the same thing as republishing someone's article or photo.

This actor collects information from public pages. It does not log in and it does not bypass access controls.

For a longer explanation, see Apify's article [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

## `mode` (type: `string`):

breweries lists by city, state, type, or postal code. search looks up a name. single calls the random brewery endpoint. meta returns count breakdowns.

## `cities` (type: `array`):

City names for brewery list and metadata modes, one per line. Spaces become underscores. Austin is filled in so a run works immediately.

## `states` (type: `array`):

State or province full names, one per line, such as texas. Used with brewery list and metadata modes.

## `breweryType` (type: `string`):

Optional type filter: micro, nano, regional, brewpub, large, planning, bar, contract, proprietor, or closed. Leave blank to skip the filter.

## `searchQuery` (type: `string`):

Brewery name query used only when mode is search. A blank query saves nothing and logs a warning.

## `postalCodes` (type: `array`):

Postal or ZIP codes for brewery list and metadata modes, one per line.

## `maxItems` (type: `integer`):

Maximum dataset rows to save this run, including error rows. Free cap is 1000.

## `requestDelaySecs` (type: `number`):

Seconds to wait between Open Brewery DB requests. The floor is 0.5 so calls stay sequential.

## `timeoutSecs` (type: `integer`):

Stop the run after this many seconds and keep rows already saved.

## `requestTimeoutSecs` (type: `integer`):

How long to wait for a single Open Brewery DB response before retrying.

## `proxyConfiguration` (type: `object`):

Optional proxy for Open Brewery DB requests. Default is no proxy.

## Actor input object example

```json
{
  "mode": "breweries",
  "cities": [
    "austin"
  ],
  "states": [],
  "breweryType": "",
  "searchQuery": "",
  "postalCodes": [],
  "maxItems": 100,
  "requestDelaySecs": 0.5,
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Default dataset of brewery and metadata rows.

## `datasetItems` (type: `string`):

JSON items from the default dataset.

## `overview` (type: `string`):

Table of brewery name, place, website, and mode.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "cities": [
        "austin"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("zerobreak/open-brewery-db-scraper-202610120341").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "cities": ["austin"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("zerobreak/open-brewery-db-scraper-202610120341").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "cities": [
    "austin"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call zerobreak/open-brewery-db-scraper-202610120341 --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zerobreak/open-brewery-db-scraper-202610120341"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/noDdeUipzRKiIXFfw/builds/fHMnK2IIpnp6hZq3D/openapi.json
