# Yelp Business Review Scraper (`beatanalytics/yelp-business-review-scraper`) Actor

Scrape ratings and reviews from Yelp using business IDs, aliases, or URLs. Download scraped data as JSON or CSV, run the scraper via API, schedule and monitor runs or integrate with other tools.

- **URL**: https://apify.com/beatanalytics/yelp-business-review-scraper.md
- **Developed by:** [Beat Analytics](https://apify.com/beatanalytics) (community)
- **Categories:** Automation, Developer tools, Social media
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 reviews

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

### 🌟 Yelp Business Review Scraper

Yelp Business Review Scraper is an easy-to-use tool that allows fetching **ratings and reviews** for any business listed on Yelp - simply provide one or more **Yelp business URLs, business IDs, or aliases**. Reviews are stored as **both CSV and JSON**.

For each review, the scraper extracts:

* Star rating (1-5)
* Full review text
* Review date and language
* Images attached to the review
* Feedback counts (useful, funny, cool)
* Business owner reply (if any)
* Reviewer information (name, location, profile URL, review count, etc.) when sensitive data is enabled

Additional features:

* **Filter by language** - retrieve reviews in a specific language (24 languages supported)
* **Sort reviews** - by newest, oldest, highest rated, lowest rated, Yelp default, or elite reviews
* **Limit results** - set a maximum number of reviews per business
* **Automatic pagination** - fetches all available review pages automatically

### Custom plans

Looking to retrieve a lot of reviews or business details? Reach out to <sales@beatanalytics.org> for Enterprise plans.

### Input fields

#### Required

* `urls`: List of Yelp URLs, business IDs, or business aliases for the businesses you want to retrieve reviews for, e.g. `https://www.yelp.com/biz/the-old-fashioned-madison`.

#### Optional

* `language`: Filter reviews by language (ISO 639-1 code). Supported languages: English, Spanish, French, German, Italian, Dutch, Portuguese, Russian, Japanese, Chinese (Simplified), Chinese (Traditional), Korean, Turkish, Arabic, Danish, Finnish, Norwegian, Swedish, Hebrew, Thai, Polish, Czech, Hungarian, Greek. Defaults to `en`.
* `sortBy`: How to order the reviews. Options: `newest`, `oldest`, `yelp` (Yelp default), `highestRated`, `lowestRated`, `elites`. Defaults to `newest`.
* `maxReviews`: Maximum number of reviews to fetch per business. Defaults to `100`.
* `includeSensitiveData`: Include reviewer personal information (name, location, profile URL, friend count, photo count, review count, elite year) in the output. Defaults to `false`.

### Output format

#### CSV file

Scraped reviews are stored in a CSV file named `reviews.csv`. The file contains the following columns:

* `business_id`: Yelp business ID
* `business_alias`: Yelp business alias (URL slug)
* `business_url`: Link to the Yelp business page
* `review_id`: Unique review identifier
* `review_url`: Link to the review on Yelp
* `rating`: Star rating (1-5)
* `text`: Full review text
* `language`: Review language (ISO 639-1 code)
* `date`: Review date
* `image_count`: Number of images attached to the review
* `feedback_useful`: Number of "useful" votes
* `feedback_funny`: Number of "funny" votes
* `feedback_cool`: Number of "cool" votes
* `reply_id`: Business owner reply ID (if any)
* `reply_text`: Business owner reply text (if any)
* `reply_date`: Business owner reply date (if any)

When `includeSensitiveData` is enabled, the following columns are also included:

* `reply_user_name`: Name of the business owner who replied
* `reply_user_role`: Role of the replying user (e.g. "Business Owner")
* `user_id`: Reviewer's Yelp user ID
* `user_url`: Link to the reviewer's Yelp profile
* `user_name`: Reviewer's display name
* `user_location`: Reviewer's location
* `user_friend_count`: Number of friends the reviewer has
* `user_photo_count`: Number of photos the reviewer has posted
* `user_review_count`: Number of reviews the reviewer has written
* `user_elite_year`: Year the reviewer achieved Yelp Elite status (if applicable)

##### Example CSV output

```csv
business_id,business_alias,business_url,review_id,review_url,rating,text,language,date,image_count,feedback_useful,feedback_funny,feedback_cool,reply_id,reply_text,reply_date
RJNAeNA-209sctUO0dmwuA,the-old-fashioned-madison,https://www.yelp.com/biz/the-old-fashioned-madison,abc123,https://www.yelp.com/biz/the-old-fashioned-madison?hrid=abc123,5,"Absolutely loved this place! The cheese curds were perfectly crispy and the Old Fashioned cocktail was top-notch. Great atmosphere right on the Capitol Square.",en,2024-08-12,2,4,1,2,,,
RJNAeNA-209sctUO0dmwuA,the-old-fashioned-madison,https://www.yelp.com/biz/the-old-fashioned-madison,def456,https://www.yelp.com/biz/the-old-fashioned-madison?hrid=def456,4,"Solid Wisconsin comfort food. The Friday fish fry is a must-try. Only downside is the long wait times on weekends - get there early!",en,2024-07-28,0,2,0,1,reply789,"Thanks for the kind words! We're glad you enjoyed the fish fry. Pro tip: reservations help with the weekend rush!",2024-07-30
````

#### Apify Dataset

The results are stored in a dataset which you can find in the Storage tab. Each item in the dataset represents a single review.

##### Example JSON output

```json
{
  "business_id": "RJNAeNA-209sctUO0dmwuA",
  "business_alias": "the-old-fashioned-madison",
  "business_url": "https://www.yelp.com/biz/the-old-fashioned-madison",
  "review_id": "abc123",
  "review_url": "https://www.yelp.com/biz/the-old-fashioned-madison?hrid=abc123",
  "rating": 5,
  "text": "Absolutely loved this place! The cheese curds were perfectly crispy and the Old Fashioned cocktail was top-notch. Great atmosphere right on the Capitol Square.",
  "language": "en",
  "date": "2024-08-12",
  "images": [
    {
      "url": "https://s3-media0.fl.yelpcdn.com/bphoto/example1/o.jpg",
      "caption": "Wisconsin cheese curds"
    },
    {
      "url": "https://s3-media0.fl.yelpcdn.com/bphoto/example2/o.jpg",
      "caption": null
    }
  ],
  "feedback": {
    "useful": 4,
    "funny": 1,
    "cool": 2
  },
  "businessOwnerReply": null,
  "user": null
}
```

##### Example JSON output with sensitive data enabled

When `includeSensitiveData` is set to `true`, the `user` field is populated with reviewer information:

```json
{
  "business_id": "RJNAeNA-209sctUO0dmwuA",
  "business_alias": "the-old-fashioned-madison",
  "business_url": "https://www.yelp.com/biz/the-old-fashioned-madison",
  "review_id": "def456",
  "review_url": "https://www.yelp.com/biz/the-old-fashioned-madison?hrid=def456",
  "rating": 4,
  "text": "Solid Wisconsin comfort food. The Friday fish fry is a must-try. Only downside is the long wait times on weekends - get there early!",
  "language": "en",
  "date": "2024-07-28",
  "images": [],
  "feedback": {
    "useful": 2,
    "funny": 0,
    "cool": 1
  },
  "businessOwnerReply": {
    "id": "reply789",
    "text": "Thanks for the kind words! We're glad you enjoyed the fish fry. Pro tip: reservations help with the weekend rush!",
    "date": "2024-07-30",
    "user": {
      "id": "owner123",
      "name": "The Old Fashioned",
      "role": "Business Owner",
      "image": "https://s3-media0.fl.yelpcdn.com/bphoto/owner/ms.jpg"
    }
  },
  "user": {
    "id": "user456",
    "url": "https://www.yelp.com/user_details?userid=user456",
    "name": "Sarah M.",
    "location": "Madison, WI",
    "image": "https://s3-media0.fl.yelpcdn.com/photo/user456/ms.jpg",
    "friendCount": 42,
    "photoCount": 15,
    "reviewCount": 87,
    "eliteYear": 2023
  }
}
```

# Actor input Schema

## `urls` (type: `array`):

Yelp URLs of businesses you wish to retrieve reviews for.

## `language` (type: `string`):

Filter reviews by language (ISO 639-1 code).

## `sortBy` (type: `string`):

How to order the reviews.

## `maxReviews` (type: `integer`):

Maximum number of reviews to fetch per business.

## `includeSensitiveData` (type: `boolean`):

Include reviewer personal information (name, location, profile URL, etc.) in the output.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://www.yelp.com/biz/the-old-fashioned-madison"
    }
  ],
  "language": "en",
  "sortBy": "newest",
  "maxReviews": 100,
  "includeSensitiveData": false
}
```

# Actor output Schema

## `reviews` (type: `string`):

All scraped reviews with ratings, text, and metadata.

## `csv` (type: `string`):

Reviews exported as a CSV file.

# 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 = {
    "urls": [
        {
            "url": "https://www.yelp.com/biz/the-old-fashioned-madison"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("beatanalytics/yelp-business-review-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 = { "urls": [{ "url": "https://www.yelp.com/biz/the-old-fashioned-madison" }] }

# Run the Actor and wait for it to finish
run = client.actor("beatanalytics/yelp-business-review-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "urls": [
    {
      "url": "https://www.yelp.com/biz/the-old-fashioned-madison"
    }
  ]
}' |
apify call beatanalytics/yelp-business-review-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=beatanalytics/yelp-business-review-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Yelp Business Review Scraper",
        "description": "Scrape ratings and reviews from Yelp using business IDs, aliases, or URLs. Download scraped data as JSON or CSV, run the scraper via API, schedule and monitor runs or integrate with other tools.",
        "version": "1.0",
        "x-build-id": "VjTz2ibYQERE5fQ2M"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/beatanalytics~yelp-business-review-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-beatanalytics-yelp-business-review-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/beatanalytics~yelp-business-review-scraper/runs": {
            "post": {
                "operationId": "runs-sync-beatanalytics-yelp-business-review-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/beatanalytics~yelp-business-review-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-beatanalytics-yelp-business-review-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "urls",
                    "includeSensitiveData"
                ],
                "properties": {
                    "urls": {
                        "title": "URLs",
                        "type": "array",
                        "description": "Yelp URLs of businesses you wish to retrieve reviews for.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "language": {
                        "title": "Review language",
                        "enum": [
                            "en",
                            "es",
                            "fr",
                            "de",
                            "it",
                            "nl",
                            "pt",
                            "ru",
                            "ja",
                            "zh",
                            "zh_TW",
                            "ko",
                            "tr",
                            "ar",
                            "da",
                            "fi",
                            "no",
                            "sv",
                            "he",
                            "th",
                            "pl",
                            "cs",
                            "hu",
                            "el"
                        ],
                        "type": "string",
                        "description": "Filter reviews by language (ISO 639-1 code).",
                        "default": "en"
                    },
                    "sortBy": {
                        "title": "Sort reviews by",
                        "enum": [
                            "newest",
                            "oldest",
                            "yelp",
                            "highestRated",
                            "lowestRated",
                            "elites"
                        ],
                        "type": "string",
                        "description": "How to order the reviews.",
                        "default": "newest"
                    },
                    "maxReviews": {
                        "title": "Max reviews per business",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of reviews to fetch per business.",
                        "default": 100
                    },
                    "includeSensitiveData": {
                        "title": "Include sensitive data",
                        "type": "boolean",
                        "description": "Include reviewer personal information (name, location, profile URL, etc.) in the output.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
