# Yelp Reviews API (`epctex/yelp-reviews-api`) Actor

Extract reviews from any Yelp business by URL or place ID. Filter by newest, oldest, highest rated, lowest rated, or elite reviewers. Get reviewer profiles, ratings, dates, and full review text. Perfect for sentiment analysis and reputation monitoring.

- **URL**: https://apify.com/epctex/yelp-reviews-api.md
- **Developed by:** [epctex](https://apify.com/epctex) (community)
- **Categories:** Social media, Developer tools, Other
- **Stats:** 22 total users, 6 monthly users, 99.8% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 dataset items

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 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

## Actor - Yelp Reviews API

### Yelp Reviews Scraper

The Yelp Reviews API supports the following features:

- **Scrape by URL** — Provide any Yelp business URL to extract its reviews.
- **Scrape by place ID** — Use a Yelp place ID for direct review retrieval.
- **Sort reviews** — Sort by Yelp's default, newest, oldest, highest rated, lowest rated, or elite reviewers.

### 💰 Pricing: Transparent Event-Based Costs

Pay only for what you scrape—no subscriptions, no hidden fees:

| Event Type | Price | What's Included |
| ---------- | ----- | --------------- |
| **Review Query** | **$0.004** per business | First ~10 reviews included FREE (first page) |
| **Dataset Items** | **$0.0004** per review | Only charged for reviews beyond the free ~10 |

#### 📊 Cost Examples

| Scenario | Charges | Calculation | Total Cost |
| -------- | ------- | ----------- | ---------- |
| **1 business, 10 reviews** | 1 query | $0.004 × 1 | **$0.004** |
| **1 business, 100 reviews** | 1 query + 90 items | $0.004 + ($0.0004 × 90) | **$0.040** |
| **1 business, 500 reviews** | 1 query + 490 items | $0.004 + ($0.0004 × 490) | **$0.200** |
| **5 businesses, 500 reviews** | 5 queries + 450 items | ($0.004 × 5) + ($0.0004 × 450) | **$0.200** |

### Input Parameters

| Field | Type | Description | Default |
| ----- | ---- | ----------- | ------- |
| `startUrls` | array | Yelp business URLs to fetch reviews from. | `[]` |
| `placeIds` | array | Yelp place IDs to fetch reviews from (e.g. `RJNAeNA-209sctUO0dmwuA`). | `[]` |
| `sortBy` | string | Sort order: `yelp`, `newest`, `oldest`, `highestRating`, `lowestRating`, or `elites`. | `yelp` |
| `maxItems` | number | Maximum number of reviews to return. | `30` |
| `customMapFunction` | string | Function that takes each object as an argument and returns a mapped object. | `null` |

#### Input Example

```json
{
  "startUrls": ["https://www.yelp.com/biz/kokoroll-cafe-torrance-4"],
  "sortBy": "newest",
  "maxItems": 100
}
```

### During the Run

The actor outputs messages as it progresses through each business. If you provide incorrect input, the actor will stop immediately with an explanation of what went wrong.

### Contact

Please visit us through [epctex.com](https://epctex.com) to see all available products. For custom integrations, reach out via the chat box on [epctex.com](https://epctex.com). For support: <business@epctex.com>.

# Actor input Schema

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

Yelp business URLs to fetch reviews from.

## `placeIds` (type: `array`):

Yelp place IDs to fetch reviews from (e.g. RJNAeNA-209sctUO0dmwuA).

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

Sorts reviews by the given option.

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

Maximum number of items that you want as output.

## `customMapFunction` (type: `string`):

Function that takes each object as an argument and returns a mapped object.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.yelp.com/biz/kokoroll-cafe-torrance-4"
  ],
  "placeIds": [
    "RJNAeNA-209sctUO0dmwuA"
  ],
  "sortBy": "yelp",
  "maxItems": 30,
  "customMapFunction": "(object) => { return {...object} }"
}
```

# 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 = {
    "startUrls": [
        "https://www.yelp.com/biz/kokoroll-cafe-torrance-4"
    ],
    "placeIds": [
        "RJNAeNA-209sctUO0dmwuA"
    ],
    "sortBy": "yelp",
    "maxItems": 30,
    "customMapFunction": (object) => { return {...object} }
};

// Run the Actor and wait for it to finish
const run = await client.actor("epctex/yelp-reviews-api").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 = {
    "startUrls": ["https://www.yelp.com/biz/kokoroll-cafe-torrance-4"],
    "placeIds": ["RJNAeNA-209sctUO0dmwuA"],
    "sortBy": "yelp",
    "maxItems": 30,
    "customMapFunction": "(object) => { return {...object} }",
}

# Run the Actor and wait for it to finish
run = client.actor("epctex/yelp-reviews-api").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 '{
  "startUrls": [
    "https://www.yelp.com/biz/kokoroll-cafe-torrance-4"
  ],
  "placeIds": [
    "RJNAeNA-209sctUO0dmwuA"
  ],
  "sortBy": "yelp",
  "maxItems": 30,
  "customMapFunction": "(object) => { return {...object} }"
}' |
apify call epctex/yelp-reviews-api --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/o4Sbb0uZ2vKvN1CRp/builds/znfoxb2w8i78BE6Vg/openapi.json
