# Beer Scraper 🍺 (`shahidirfan/beer-scraper`) Actor

Extract structured beer data at scale, including beer names, breweries, styles, ABV, ratings, reviews, prices, descriptions, and product details. Ideal for beer market research, brewery analysis, price monitoring, datasets, and competitive intelligence.

- **URL**: https://apify.com/shahidirfan/beer-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Categories:** Developer tools, Other, Automation
- **Stats:** 10 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Beer Scraper - Open Brewery DB Data Extractor

Extract comprehensive brewery data from Open Brewery DB with ease. Collect detailed information including names, types, addresses, and contact details for thousands of breweries worldwide. This powerful tool is perfect for beer enthusiasts, market researchers, and business analysts looking to explore the craft beer industry.

***

### Features

- **Global Coverage** — Access data from over 8,000 breweries across multiple countries.
- **Detailed Metadata** — Collect brewery names, types, physical addresses, and website URLs.
- **Configurable Extraction** — Filter by city, state, and country to target specific regions.
- **High-Volume Scaling** — Automatically handles pagination to retrieve up to thousands of records in a single run.
- **Ready-to-Use Data** — Get clean, structured JSON output that integrates perfectly with your existing tools.

***

### Use Cases

#### Market Research

Analyze the density and distribution of microbreweries and brewpubs across different states and countries to identify market trends and opportunities in the craft beer sector.

#### Beer Tourism

Build a comprehensive database of breweries for travel apps or personalized tours, including addresses and website links for easy navigation and trip planning.

#### Business Intelligence

Track the evolving craft beer landscape, monitoring new openings and brewery types for competitive analysis, location intelligence, and industry reporting.

***

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `search` | String | No | `"brew"` | Search query for brewery names |
| `by_city` | String | No | — | Filter breweries by city name |
| `by_country` | String | No | `"United States"` | Filter breweries by country |
| `by_state` | String | No | — | Filter breweries by state (full name) |
| `results_wanted` | Integer | No | `20` | Maximum number of results to collect |
| `max_pages` | Integer | No | `10` | Maximum number of API pages to fetch |

***

### Output Data

Each brewery record contains:

| Field | Type | Description |
|-------|------|-------------|
| `id` | String | Unique brewery identifier |
| `name` | String | Name of the brewery |
| `brewery_type` | String | Category (micro, regional, brewpub, etc.) |
| `city` | String | City where the brewery is located |
| `state` | String | State or province |
| `country` | String | Country name |
| `website_url` | String | Official brewery website |
| `phone` | String | Contact phone number |

***

### Usage Examples

#### Basic Search

Find breweries matching a specific name or keyword:

```json
{
    "search": "Sierra Nevada",
    "results_wanted": 10
}
```

#### Region-Specific Extraction

Collect breweries in a specific city and state:

```json
{
    "by_city": "Portland",
    "by_state": "Oregon",
    "results_wanted": 50
}
```

#### International Discovery

Extract brewery data from a specific country:

```json
{
    "by_country": "United Kingdom",
    "results_wanted": 100
}
```

***

### Sample Output

```json
{
  "id": "5128df48-79fc-4f0f-8b52-d06be54d0cec",
  "name": "Sierra Nevada Brewing Co",
  "brewery_type": "regional",
  "city": "Chico",
  "state": "California",
  "country": "United States",
  "website_url": "http://www.sierranevada.com/",
  "phone": "5308933520"
}
```

***

### Tips for Best Results

#### Accurate Geographic Filtering

- Use full names for states (e.g., "California" instead of "CA") to ensure the API matches the location correctly.
- Combine city and country for more precise results in international searches.

#### Optimize Search Queries

- For broad searches, use simple keywords in the `search` parameter.
- If you know the exact brewery name, use it as the search query for the most relevant results.

#### Performance Balancing

- Adjust `results_wanted` to balance speed and data quantity. For testing, start with small numbers (e.g., 20).

***

### Integrations

Connect your brewery data with your favorite tools:

- **Google Sheets** — Export data directly for easy sharing and collaborative analysis.
- **Airtable** — Build a searchable and customizable brewery database.
- **Zapier** — Create automated workflows to trigger actions based on new brewery data.
- **Make** — Connect with hundreds of apps for advanced data processing.

#### Export Formats

- **JSON** — Best for developers and system integrations.
- **CSV** — Ideal for spreadsheet analysis and business reporting.
- **Excel** — Convenient for offline data management.

***

### Frequently Asked Questions

#### How many breweries can I scrape?

The scraper can collect as many breweries as are available in the Open Brewery DB database, subject to the `results_wanted` and `max_pages` limits you configure.

#### Is the data updated regularly?

The source database is community-driven and frequently updated with new brewery information, location changes, and closures to maintain accuracy.

#### Can I filter by multiple states?

Currently, the actor supports filtering by one state at a time. To collect data from multiple states, you can run separate tasks or use different input configurations.

***

### Support

For issues or feature requests, contact support through the Apify Console.

#### Resources

- [Apify Documentation](https://docs.apify.com/)
- [API Reference](https://docs.apify.com/api/v2)

***

### Legal Notice

This actor is designed for legitimate data collection purposes. Users are responsible for ensuring compliance with website terms of service and applicable laws. Use data responsibly and respect rate limits.

# Actor input Schema

## `search` (type: `string`):

Search query for brewery names.

## `by_city` (type: `string`):

Filter breweries by city.

## `by_country` (type: `string`):

Filter breweries by country.

## `by_state` (type: `string`):

Filter breweries by state (full name).

## `results_wanted` (type: `integer`):

The maximum number of results to collect.

## `max_pages` (type: `integer`):

Maximum number of API pages to fetch.

## Actor input object example

```json
{
  "search": "brew",
  "by_country": "United States",
  "results_wanted": 20,
  "max_pages": 10
}
```

# Actor output Schema

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

No description

# 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 = {
    "search": "brew",
    "by_country": "United States",
    "results_wanted": 20,
    "max_pages": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/beer-scraper").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 = {
    "search": "brew",
    "by_country": "United States",
    "results_wanted": 20,
    "max_pages": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/beer-scraper").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 '{
  "search": "brew",
  "by_country": "United States",
  "results_wanted": 20,
  "max_pages": 10
}' |
apify call shahidirfan/beer-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,shahidirfan/beer-scraper"
        }
    }
}

```

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/eUfZjmHG1Fz6se3XK/builds/uXEbHnIMNey3Ht3qV/openapi.json
