# Yelp Scraper (`tri_angle/yelp-scraper`) Actor

Free Yelp web scraper to extract data from Yelp. Fast Yelp review scraper, but also gets business details and ratings without using the Yelp API.

- **URL**: https://apify.com/tri\_angle/yelp-scraper.md
- **Developed by:** [Tri⟁angle](https://apify.com/tri_angle) (Apify)
- **Categories:** Travel
- **Stats:** 6,712 total users, 210 monthly users, 100.0% runs succeeded, 86 bookmarks
- **User rating**: 4.06 out of 5 stars

## Pricing

from $1.50 / 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/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

### What does Yelp Scraper do?

Yelp Scraper is an Apify actor that allows you to extract data from Yelp quickly. It can extract business details, ratings, and reviews without using the Yelp API.

Yelp Scraper can scrape:

- Business name
- Address
- Phone number
- Rating
- Review text

### Why scrape Yelp?

Yelp is a popular platform for finding local businesses, with millions of reviews and ratings. It is an excellent source of data for businesses looking to improve their online presence or conduct market research.

Here are some ways you could use Yelp data:

- Analyze customer sentiment and improve your product or service based on feedback
- Identify popular businesses in a specific area to inform business decisions
- Track competitors and monitor customer sentiment towards them

If you would like more inspiration on how scraping Yelp could help your business or organization, check out our [industry pages](https://apify.com/industries).

### How to scrape Yelp

It's easy to scrape Yelp with Yelp Scraper. Just follow these few steps, and you'll get your data in a few minutes.

1. Click on Try for free.
2. Enter the search terms or location you want to scrape.
3. Click on Run.
4. When Yelp Scraper has finished, preview or download your data from the Dataset tab.

### How many results can you scrape with Yelp scraper?

Yelp scraper can return up to 240 results **on average**. However, you have to keep in mind that scraping yelp.com has many variables to it and may cause the results to fluctuate case by case. There’s no one-size-fits-all-use-cases number. **The maximum number of results may vary** depending on the complexity of the input, location, and other factors. Some of the most frequent cases are:

- website gives a different number of results depending on the type/value of the input
- website has an internal limit that no scraper can cross
- scraper has a limit that we are working on improving

Therefore, while we regularly run Actor tests to keep the benchmarks in check, the results may also fluctuate without our knowing. The best way to know for sure for your particular use case is to do a test run yourself.

### How much will scraping Yelp cost you?

When it comes to scraping, it can be challenging to estimate the resources needed to extract data as use cases may vary significantly. That's why the best course of action is to run a test scrape with a small sample of input data and limited output. You’ll get your price per scrape, which you’ll then multiply by the number of scrapes you intend to do.

[Watch this video](https://www.youtube.com/watch?v=-wyz2iscZ30) for a few helpful tips. And don't forget that choosing a higher plan will save you money in the long run.

### Output

Here's an example of Yelp Scraper's output:

```
{
    "businessName": "Example Business",
    "address": "123 Main St",
    "phoneNumber": "(555) 555-1234",
    "rating": 4.5,
    "reviewText": "Great service and delicious food!"
}
```

### Tips for scraping Yelp

- Use relevant search terms to get the most accurate results.
- Be mindful of Yelp's terms of service and follow them to avoid legal issues.

### Is it legal to scrape Yelp?

Note that personal data is protected by GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers. We also recommend that you read our blog post: [is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

### Not your cup of tea? Build your own scraper

Yelp scraper doesn’t exactly do what you need? You can always build your own! We have various [scraper templates](https://apify.com/templates) in Python, JavaScript, and TypeScript to get you started. Alternatively, you can write it from scratch using our [open-source library Crawlee](https://crawlee.dev/). You can keep the scraper to yourself or make it public by adding it to Apify Store (and [find users](https://blog.apify.com/make-regular-passive-income-developing-web-automation-actors-b0392278d085/) for it).

Or let us know if you need a [custom scraping solution](https://apify.com/custom-solutions).

### Your feedback

We’re always working on improving the performance of our Actors. So if you’ve got any technical feedback for Yelp Scraper or simply found a bug, please create an issue on the Actor’s [Issues tab](https://console.apify.com/actors/bf54TfrKoJrQZsrZm/issues) in Apify Console.

# Actor input Schema

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

Here you can provide a search queries for Yelp businesses to scrape. <br /><br /><strong>Choose either of 'Search Terms' or 'Direct URLs'.</strong>

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

Locations that will be searched for each search term.

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

How many search results (eq. Yelp businesses) should be processed per search query

## `directUrls` (type: `array`):

If you already have URL(s) of page(s) you wish to scrape, you can set them here. <br /><br /><strong>Either of 'Search' or 'Direct URLs' or both fields.</strong>

## `maxImages` (type: `integer`):

Maximum number of images per business

## Actor input object example

```json
{
  "searchTerms": [
    "Pizza"
  ],
  "locations": [
    "New York"
  ],
  "searchLimit": 10,
  "directUrls": [],
  "maxImages": 30
}
```

# 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": [
        "Pizza"
    ],
    "locations": [
        "New York"
    ],
    "searchLimit": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("tri_angle/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 = {
    "searchTerms": ["Pizza"],
    "locations": ["New York"],
    "searchLimit": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("tri_angle/yelp-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 '{
  "searchTerms": [
    "Pizza"
  ],
  "locations": [
    "New York"
  ],
  "searchLimit": 10
}' |
apify call tri_angle/yelp-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/bf54TfrKoJrQZsrZm/builds/iz8vINlbSkD2053BS/openapi.json
