# Yelp Scraper - Business Reviews & Ratings (`sweet_stickball/yelp-scraper`) Actor

Scrape Yelp reviews for a business URL or a search (e.g. pizza in New York): business name, address, rating, review count and coordinates, plus each review's rating, date, text and pseudonymized author. Yelp reviews scraper for local business research.

- **URL**: https://apify.com/sweet_stickball/yelp-scraper.md
- **Developed by:** [CrawlKit](https://apify.com/sweet_stickball) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.10 / 1,000 businesses

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

## Yelp Scraper - Business Reviews & Ratings

Scrapes business information and reviews from Yelp. Accepts either a direct business URL or a search query. Outputs structured business data (name, address, rating, review count, coordinates) and individual reviews with ratings, dates, and reaction counts.

### Input

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `businessUrl` | string | Yes\* | | Direct Yelp business page URL |
| `query` | string | No | | Search query (used if `businessUrl` is empty) |
| `location` | string | No | `""` | Location for search (e.g. "San Francisco, CA") |
| `maxReviews` | integer | No | `20` | Maximum reviews to collect (1-5000) |

\*Either `businessUrl` or `query` must be provided.

### Output

The dataset contains two record types distinguished by the `type` field.

#### Business record (`type: "business"`)

| Field | Description |
|---|---|
| `name` | Business name |
| `alias` | Yelp business alias (last part of the business URL) |
| `address` | Street address (city/area only for service-area businesses) |
| `rating` | Average star rating |
| `reviewCount` | Total number of reviews |
| `url` | Yelp business page URL |
| `latitude` | Geographic latitude |
| `longitude` | Geographic longitude |
| `phone`, `category`, `hours`, `priceRange` | Currently always `null` (see Limitations) |

Example:

```json
{
  "type": "business",
  "name": "Made In New York Pizza",
  "address": "421 Amsterdam Ave, New York, NY 10024",
  "phone": null,
  "category": null,
  "rating": 4.2,
  "reviewCount": 655,
  "hours": null,
  "priceRange": null,
  "url": "https://www.yelp.com/biz/made-in-new-york-pizza-new-york",
  "latitude": 40.783841,
  "longitude": -73.977569,
  "alias": "made-in-new-york-pizza-new-york",
  "scrapedAt": "2026-10-21T20:37:30+00:00"
}
```

#### Review record (`type: "review"`)

| Field | Description |
|---|---|
| `reviewId` | Yelp review identifier |
| `businessName` | Name of the reviewed business |
| `text` | Review text |
| `rating` | Star rating (1-5) |
| `date` | Review date (YYYY-MM-DD, business local time) |
| `language` | Review language (English reviews are collected) |
| `authorPseudonymized` | Author name in "FirstName L." format |
| `useful` | Useful reaction count |
| `funny` | Funny reaction count |
| `cool` | Cool reaction count |
| `photosCount` | Number of photos attached |
| `url` | Review permalink (`?hrid=<reviewId>`) |

### How it works

The Actor collects public data from these sources:

1. Search mode: a public web search (Yahoo, then DuckDuckGo) restricted to `site:yelp.com/biz` returns candidate businesses; the first candidate whose address matches the requested location is kept.
2. The business "Directions" page (`/map/<alias>`) gives the business id, name, address and coordinates.
3. Rating, review count and reviews come from the JSON endpoint used by Yelp's own business pages, paginated with a cursor. Reviews are de-duplicated by `reviewId`.

Requests go through Apify Proxy (datacenter first, residential if needed). If a request is blocked, the Actor retries with a new proxy session. It never solves captchas.

### Pricing

Pay-per-event, **no start fee**: **$3.50 per 1,000 businesses** and **$0.21 per 1,000 reviews** on the Apify Free plan, with lower prices on paid plans.

| Event | Free | Starter | Scale | Business | Enterprise |
|-------|------|---------|-------|----------|------------|
| Business (`BUSINESS`) | $3.50 | $3.00 | $2.60 | $2.10 | $2.10 |
| Review (`REVIEW`) | $0.21 | $0.18 | $0.16 | $0.13 | $0.13 |

Prices in USD per 1,000 events.

#### Cost examples (Free plan)

| Scenario | Reviews | Cost |
|----------|---------|------|
| Quick look | 10 | $0.0021 |
| One business in depth | 200 | $0.042 |
| Many businesses | 5,000 | $1.05 |

### Limitations

- Phone, category, opening hours and price range are not available from these sources, so they are returned as `null`.
- Search mode depends on web search engines, which throttle automated traffic; the Actor retries several times and fails with an explicit message if every attempt is blocked. For precise and most reliable targeting, provide `businessUrl`.
- Search mode scrapes one business: the first search result located in the requested city (or the first result if none matches).
- Only English reviews are collected, in Yelp's default ("Yelp Sort") order.
- Author names are pseudonymized to "FirstName L." format and cannot be recovered.

### Related Actors

- [Trustpilot Reviews Scraper - Ratings & Company Profile](https://apify.com/sweet_stickball/trustpilot-reviews) — Scrape Trustpilot reviews for any company domain: rating, title, text, date, company reply and the company profile (TrustScore, review count).
- [Google Trends Scraper - Interest Over Time & Related Queries](https://apify.com/sweet_stickball/google-trends-scraper) — Scrape Google Trends: interest over time and related queries for up to 5 compared keywords, by country, time range and category.
- [App Store Reviews Scraper - iOS & Google Play Reviews](https://apify.com/sweet_stickball/app-store-reviews-scraper) — Scrape app reviews and ratings from the Apple App Store and Google Play: review text, rating, date, app version and app metadata.

# Actor input Schema

## `businessUrl` (type: `string`):

Direct URL to a Yelp business page. Example: 'https://www.yelp.com/biz/tartine-bakery-san-francisco'

## `query` (type: `string`):

Search query to find a business on Yelp. Used only if businessUrl is not provided.

## `location` (type: `string`):

Location for the search query (e.g. 'San Francisco, CA'). Used only with query.

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

Maximum number of reviews to scrape per business.

## Actor input object example

```json
{
  "query": "pizza",
  "location": "New York, NY",
  "maxReviews": 10
}
```

# Actor output Schema

## `businesses` (type: `string`):

Dataset items shown with the 'businesses' view.

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

Dataset items shown with the 'reviews' view.

# 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 = {
    "query": "pizza",
    "location": "New York, NY",
    "maxReviews": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("sweet_stickball/yelp-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 = {
    "query": "pizza",
    "location": "New York, NY",
    "maxReviews": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("sweet_stickball/yelp-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 '{
  "query": "pizza",
  "location": "New York, NY",
  "maxReviews": 10
}' |
apify call sweet_stickball/yelp-scraper --silent --output-dataset

```

## MCP server setup

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