# Yelp Business & Reviews Multi-Agent Scraper (`moving_beacon-owner1/yelp-business-reviews-multi-agent-scraper`) Actor

Introducing a powerhouse Apify Actor designed for effortlessly extracting vibrant Yelp business listings! Dive deep into comprehensive business details and uncover authentic customer reviews—all with high performance and efficiency at your fingertips. Unlock valuable insights today!

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

## Pricing

from $9.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.

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 Business & Reviews Multi-Agent Scraper

A high-performance Apify Actor for extracting Yelp business listings, detailed business information, and customer reviews.

The scraper supports keyword-based discovery, direct business URLs, concurrent workers, detailed business profiles, and paginated review extraction.

### Features

- **Business Discovery:** Search Yelp using multiple keywords and locations.
- **Business Details:** Extract 49+ business attributes, including names, ratings, phone numbers, websites, addresses, categories, opening hours, coordinates, amenities, and photos.
- **Customer Reviews:** Collect reviews with ratings, dates, text, author details, photos, and reactions.
- **Multi-Agent Processing:** Run discovery, business detail, review, and validation workers concurrently.
- **GraphQL Batching:** Uses Yelp GraphQL operations for efficient data retrieval.
- **Resilient Extraction:** Supports retry handling, structured validation, and offline fixture testing.
- **Provenance Tracking:** Records extraction source, artifact type, parser version, and timestamp.
- **Apify Integration:** Streams structured business and review records directly into the Apify dataset.

### Input Parameters

| Parameter | Description | Default |
|---|---|---|
| `searchTerms` | Business keywords or categories | `["coffee"]` |
| `locations` | Target cities or geographic locations | `["San Francisco, CA"]` |
| `startUrls` | Direct Yelp business URLs or aliases | `[]` |
| `maxItems` | Maximum businesses to extract | `20` |
| `includeBusinessDetails` | Extract detailed business attributes | `true` |
| `scrapeReviews` | Enable customer review extraction | `true` |
| `maxReviewsPerBusiness` | Maximum reviews per business | `10` |
| `sortReviewsBy` | Review sorting preference | `newest` |
| `agentCount` | Number of concurrent workers (1–20) | `5` |
| `mode` | Extraction mode: `auto`, `live`, or `offline_fixture` | `auto` |
| `proxyConfiguration` | Optional Apify proxy settings | `null` |

### Example Input

```json
{
    "searchTerms": ["coffee", "bakery"],
    "locations": ["San Francisco, CA"],
    "maxItems": 15,
    "includeBusinessDetails": true,
    "scrapeReviews": true,
    "maxReviewsPerBusiness": 5,
    "sortReviewsBy": "newest",
    "agentCount": 8,
    "mode": "auto"
}
```

### Output

The actor produces two types of structured dataset records:

**Business Records**

- Business name, ID, and Yelp URL
- Rating and review count
- Categories and price range
- Phone number and website
- Full address and coordinates
- Business hours and amenities
- Photos and additional attributes
- Extraction provenance

**Review Records**

- Review ID and business ID
- Review text and rating
- Publication date and language
- Reviewer name and profile information
- Reviewer statistics and Elite status
- Review photos and reactions
- Review URL and extraction provenance

### Extraction Modes

| Mode | Description |
|---|---|
| `auto` | Attempts live extraction with configured fallback behavior |
| `live` | Uses live Yelp extraction |
| `offline_fixture` | Uses local test fixtures for offline testing |

### Policy & Responsible Use

#### 1. Authorized Use

This actor is intended for legitimate research, business intelligence, market analysis, and publicly available business information collection. Users are responsible for ensuring that their use complies with applicable laws and regulations.

#### 2. Privacy & Personal Information

- Collect only information necessary for your intended purpose.
- Do not use extracted information for harassment, spam, discrimination, or unauthorized profiling.
- Handle reviewer names, profile information, and review content responsibly.
- Do not attempt to access private, restricted, or confidential information.

#### 3. Platform Compliance

- Users must respect Yelp's Terms of Service, applicable access restrictions, and robots or technical restrictions where applicable.
- This actor does not authorize users to violate platform policies or access controls.
- Do not use the actor to circumvent authentication, CAPTCHAs, access restrictions, or anti-bot security measures.

#### 4. Data Security

- Store collected datasets securely.
- Restrict access to authorized users.
- Avoid sharing personal information without an appropriate legal basis.
- Delete collected information when it is no longer required for its intended purpose.

#### 5. Rate Limits & Responsible Scraping

- Configure reasonable concurrency and request volumes.
- Avoid excessive requests that could affect platform availability

### Dataset Export

Apify dataset records can be exported in:

- JSON
- JSONL
- CSV
- Excel

### Important Notes

- Live extraction depends on Yelp's current internal GraphQL operations and response structures.
- GraphQL operation hashes and response schemas may change without notice.
- Browser TLS impersonation does not guarantee bypassing anti-bot protections.
- Offline fixtures are for testing and do not represent live Yelp data.
- Actual extraction speed and success rates depend on concurrency, network conditions, proxy quality, and platform restrictions.
- Use collected data in accordance with Yelp's terms, applicable privacy laws, and data protection requirements.

**Yelp Business & Reviews Multi-Agent Scraper** combines business discovery, detailed profile extraction, and customer review collection in one structured Apify Actor.

# Actor input Schema

## `searchTerms` (type: `array`):

Keywords or business categories to search (e.g. \['coffee', 'italian restaurant', 'plumber']).

## `locations` (type: `array`):

Target cities, zip codes, or neighborhoods (e.g. \['New York, NY', 'San Francisco, CA']).

## `startUrls` (type: `array`):

Direct Yelp business page URLs or aliases (e.g. https://www.yelp.com/biz/gary-danko-san-francisco or gary-danko-san-francisco).

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

Maximum total businesses to collect.

## `includeBusinessDetails` (type: `boolean`):

If enabled, extracts all 49+ attributes including hours, amenities, licenses, health scores, and geo-coordinates.

## `scrapeReviews` (type: `boolean`):

If enabled, extracts customer reviews for each discovered or targeted business.

## `maxReviewsPerBusiness` (type: `integer`):

Maximum number of reviews to scrape per business listing.

## `sortReviewsBy` (type: `string`):

Order in which customer reviews are fetched.

## `agentCount` (type: `integer`):

Number of concurrent agents working simultaneously to maximize speed.

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

Execution mode: 'auto' tests live GraphQL with fallback to offline fixture, 'live' enforces live network, 'offline_fixture' uses verified synthetic fixtures.

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

Proxy settings. Yelp GraphQL is generally accessible directly; proxies can be configured when scaling large volumes.

## Actor input object example

```json
{
  "searchTerms": [
    "coffee"
  ],
  "locations": [
    "San Francisco, CA"
  ],
  "maxItems": 20,
  "includeBusinessDetails": true,
  "scrapeReviews": true,
  "maxReviewsPerBusiness": 10,
  "sortReviewsBy": "newest",
  "agentCount": 5,
  "mode": "auto"
}
```

# Actor output Schema

## `results` (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 = {
    "searchTerms": [
        "coffee"
    ],
    "locations": [
        "San Francisco, CA"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("moving_beacon-owner1/yelp-business-reviews-multi-agent-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 = {
    "searchTerms": ["coffee"],
    "locations": ["San Francisco, CA"],
}

# Run the Actor and wait for it to finish
run = client.actor("moving_beacon-owner1/yelp-business-reviews-multi-agent-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 '{
  "searchTerms": [
    "coffee"
  ],
  "locations": [
    "San Francisco, CA"
  ]
}' |
apify call moving_beacon-owner1/yelp-business-reviews-multi-agent-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,moving_beacon-owner1/yelp-business-reviews-multi-agent-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/4cHfxcod09UC8uGdi/builds/FLdTgIuKK3R13gBTS/openapi.json
