# Yelp business reviews scraper (`data_dino/yelp-reviews-scraper`) Actor

Collect structured Yelp business reviews with ratings, review text, dates, feedback/helpful counts, photos, and reviewer metadata (anonymized by default).

- **URL**: https://apify.com/data_dino/yelp-reviews-scraper.md
- **Developed by:** [Data Dino](https://apify.com/data_dino) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 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.

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

## Yelp Reviews Scraper

Collect structured Yelp **business reviews** with ratings, review text, dates, feedback/helpful counts, photos, and reviewer metadata. Reviewer identity is anonymized by default so the actor respects GDPR/CCPA out of the box — flip **Include reviewer personal data** to keep names and profiles.

### What you get

One dataset row per review with fields like:

- business info: `alias`, `businessUrl`, `business_name`, `businessRating`, `primaryPhoto`
- review core: `rating`, `text`, `language`, `translatedText`, `reviewDate`, `reviewUrl`, `publicReply`
- engagement: `feedback`, `checkInCount`, `isFirstReviewer`, `reviewOfTheDay`, `expertRecognition`
- author (when enabled): name, photo, review/friend counts, elite status
- `scrapedAt` timestamp

### How to run

Pick at least one input source:

- **Business encids** — the most reliable path. Paste 22-character Yelp business IDs (e.g. `_GCdHSPxqgjGlJFHwea6sw`). This talks directly to the review feed with no cookie/session needed.
- **Business URLs** — e.g. `https://www.yelp.com/biz/mcgrath-elmhurst-toyota-elmhurst-2`. Alias resolution uses Yelp's gated `props` endpoint, so a fresh anti-bot session is required.
- **Search URLs** — e.g. `https://www.yelp.com/search?find_desc=pizza&find_loc=New+York,+NY`. Search URLs are expanded into businesses first, then their reviews are scraped.

#### Useful options

| Option | What it does |
|---|---|
| Reviews per business | Cap how many reviews to collect (empty = all). |
| Sort reviews by | recommended / newest / oldest / rating desc/asc / elites. |
| Keyword filters | Keep only reviews matching up to 5 keywords. |
| Language filter | Only reviews in a given language code. |
| Translate to | Machine-translate each review into a target language. |
| Star ratings | Only keep selected star ratings. |
| Include reviewer personal data | Keep reviewer names/photos (off by default for privacy). |

### Proxy & rate-limiting

The actor throttles requests by default and supports **managed proxy** via the Proxy configuration input. If you hit rate limits, raise the **Delay (seconds)** input.

### Notes & limitations

- Yelp's per-request review cap is **49**; the actor enforces it.
- Some businesses report a `totalReviews` slightly higher than what Yelp actually serves; the actor stops at the last available page.
- Search result pagination beyond page 1 is captcha-gated; the Search pages input is capped at page 1 in practice.

# Actor input Schema

## `bizUrls` (type: `array`):

Yelp business URLs, e.g. https://www.yelp.com/biz/mcgrath-elmhurst-toyota-elmhurst-2 . Alias resolution uses the site's gated props endpoint, which needs a fresh cookie session.

## `bizIds` (type: `array`):

Yelp business encids (22-character IDs, e.g. \_GCdHSPxqgjGlJFHwea6sw). This path calls the internal review feed directly and needs no cookies — the most reliable option.

## `searchUrls` (type: `array`):

Yelp search URLs expanded into businesses first, e.g. https://www.yelp.com/search?find_desc=pizza\&find_loc=New+York,+NY

## `searchLocation` (type: `string`):

Default location used when a search URL has no find_loc.

## `maxBusinesses` (type: `integer`):

Cap on how many businesses are expanded from search URLs.

## `searchLimit` (type: `integer`):

Number of search result pages to walk (page 1 is the only reliably free one; deeper pages are captcha-gated).

## `reviewsLimit` (type: `integer`):

Maximum reviews to collect per business. Leave empty to collect all available reviews.

## `reviewsSort` (type: `string`):

Order of the reviews within each business (recommended is Yelp's own ranking).

## `reviewsLanguage` (type: `string`):

Only keep reviews in this language code, e.g. en, fr, de.

## `reviewsKeywords` (type: `array`):

Only keep reviews matching these keywords (max 5). Each keyword fans out over the same business.

## `reviewsTranslate` (type: `string`):

Machine-translate each review into this language, e.g. en. Adds a translatedText field per review.

## `reviewsRatings` (type: `array`):

Only keep reviews with these star ratings.

## `domain` (type: `string`):

Yelp host to scrape, e.g. www.yelp.ca for Canada, www.yelp.co.uk for the UK.

## `pageSize` (type: `integer`):

Reviews fetched per server request (the API maximum is 49).

## `delay` (type: `number`):

Seconds between requests. Raise this if you get rate-limited.

## `includePersonalData` (type: `boolean`):

When enabled, keeps reviewer name, photo, and activity counts. Disabled by default to respect GDPR/CCPA.

## `harvestIfBlocked` (type: `boolean`):

When enabled, opens a headless browser to re-harvest an anti-bot session if a request is blocked. Keep disabled in the cloud (harvested sessions are bound to the exit IP).

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

Optional proxy for the crawl. Leave default (Apify proxy) or provide your own.

## Actor input object example

```json
{
  "bizIds": [
    "V7lXZKBDzScDeGB8JmnzSA"
  ],
  "searchLimit": 1,
  "reviewsLimit": 10,
  "reviewsSort": "recommended",
  "domain": "www.yelp.com",
  "pageSize": 40,
  "delay": 0.35,
  "includePersonalData": false,
  "harvestIfBlocked": false
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped Yelp reviews, one item per row. Field shape (see apify-output-schema.json): review_position, encid, alias, businessUrl, business_name (primaryPhoto, businessRating, reviewEncid, reviewUrl, text, language, translatedText, rating, reviewDate, userSpecifiedTimeOfExperience, checkInCount, isFirstReviewer, reviewOfTheDay, expertRecognition, hasPaidThroughYelp, hasPurchasedDeal, hasPlacedReservation, reservationProvider, publicReply, author{...}, photos, videos, feedback, totalReviews, ratingDetail, reviewsCountByLanguage, scrapedAt. Reviewer identity (author.name, photos, counts) is nulled unless includePersonalData is enabled.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("data_dino/yelp-reviews-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("data_dino/yelp-reviews-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 '{}' |
apify call data_dino/yelp-reviews-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,data_dino/yelp-reviews-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/CTTChW5OFDWCtPB5N/builds/9RtWT0eKwt7WJhDUa/openapi.json
