# Yelp Business Scraper (`xtracto/yelp-business-scraper`) Actor

Collect businesses from Yelp search — name, rating, review count, price range, and a review snippet — by search term and location. No login.

- **URL**: https://apify.com/xtracto/yelp-business-scraper.md
- **Developed by:** [Farhan Febrian Nauval](https://apify.com/xtracto) (community)
- **Categories:** Jobs, E-commerce, Lead generation
- **Stats:** 2 total users, 1 monthly users, 90.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Yelp Business Scraper

Collect businesses from **Yelp** search results — name, star rating, review count, price range, and a review snippet — by search term and location. No account or login required.

### Why use this actor

- **No login needed** — works on public Yelp search results.
- **Search by term + location** — e.g. "restaurants in San Francisco", "plumbers in Austin".
- **Key business signals** — name, rating, number of reviews, price range, and a sample review.
- **Bulk collection** — pages through all results for each search.
- **Stable JSON output** — ready for lead lists, market research, or dashboards.
- **Handles the site's protection automatically** — you don't manage browsers, sessions, or retries.

### How it works

1. Enter one or more **search terms** and **locations** (or paste Yelp search URLs).
2. The actor unlocks Yelp once, then pages through every result for each term + location.
3. Each business becomes one row — downloadable as JSON, CSV, or Excel.

A US residential proxy is required and set by default. The first unlock may take a few tries on fresh addresses — this is automatic.

### Use cases

- **Local lead generation** — build lists of businesses by category and city.
- **Market & competitor research** — compare ratings, review volume, and price tiers in an area.
- **Review monitoring** — track ratings for a category over time.

### Input

```json
{
  "searchTerms": ["restaurants"],
  "locations": ["San Francisco, CA"],
  "startUrls": [],
  "maxItemsPerSearch": 0,
  "maxItems": 100,
  "harvestAttempts": 8,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "US" }
}
````

| Field | Type | Description |
|---|---|---|
| `searchTerms` | array | What to search for (combined with each location). |
| `locations` | array | Cities/areas, e.g. `"San Francisco, CA"`. |
| `startUrls` | array | Optional: paste Yelp search URLs directly (overrides terms/locations). |
| `maxItemsPerSearch` | integer | Cap per term+location. `0` = all. |
| `maxItems` | integer | Overall cap. `0` = no limit. Default `100`. |
| `maxPagesPerSearch` | integer | Yelp shows 10/page (~24 page cap). |
| `harvestAttempts` | integer | How many fresh IPs to try for the initial unlock. Higher = more reliable. Default `8`. |
| `proxyConfiguration` | object | US residential required (the default). |

### Output

One record per business:

```json
{
  "_input": "https://www.yelp.com/search?find_desc=coffee&find_loc=Austin%2C+TX",
  "_scrapedAt": "2026-06-16T14:37:00Z",
  "recordType": "BUSINESS",
  "slug": "andersons-coffee-company-austin",
  "url": "https://www.yelp.com/biz/andersons-coffee-company-austin",
  "name": "Anderson's Coffee Company",
  "rating": 4.6,
  "reviewCount": 197,
  "priceRange": "$$",
  "reviewSnippet": "Amazing coffee. Exceptional service ...",
  "cardText": "..."
}
```

| Field | Type | Description |
|---|---|---|
| `slug` / `url` | string | Yelp business handle and page link. |
| `name` | string | Business name. |
| `rating` | number | Star rating (e.g. 4.6). |
| `reviewCount` | number | Number of reviews (parsed, e.g. `1.1k` → 1100). |
| `priceRange` | string | `$`–`$$$$` when shown. |
| `reviewSnippet` | string | A sample review excerpt. |
| `cardText` | string | Raw result-card text (for any extra fields you want). |

Searches that fail to unlock return an `_error` record, so nothing fails silently.

### Notes

- Use a US residential proxy. The initial unlock retries on fresh addresses automatically (`harvestAttempts`).
- Yelp shows ~10 results per page and caps deep pagination; use tighter searches to go deeper.

# Actor input Schema

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

What to search for, e.g. restaurants, plumbers, coffee. Combined with each Location.

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

Cities/areas, e.g. "San Francisco, CA", "New York, NY". Combined with each search term.

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

Paste Yelp search URLs directly (overrides terms/locations), e.g. https://www.yelp.com/search?find\_desc=restaurants\&find\_loc=San+Francisco%2C+CA

## `maxItemsPerSearch` (type: `integer`):

Cap per term+location search. 0 = all (up to the page limit).

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

Overall cap for the run. 0 = no limit.

## `maxPagesPerSearch` (type: `integer`):

Yelp shows 10 results per page (caps around 24 pages).

## `harvestAttempts` (type: `integer`):

How many times to retry the initial unlock on a fresh proxy IP if it doesn't pass. More attempts = more reliable, slightly higher cost.

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

Residential proxy required; US recommended.

## Actor input object example

```json
{
  "searchTerms": [
    "restaurants"
  ],
  "locations": [
    "San Francisco, CA"
  ],
  "startUrls": [],
  "maxItemsPerSearch": 0,
  "maxItems": 100,
  "maxPagesPerSearch": 24,
  "harvestAttempts": 8,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# 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": [
        "restaurants"
    ],
    "locations": [
        "San Francisco, CA"
    ],
    "startUrls": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtracto/yelp-business-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": ["restaurants"],
    "locations": ["San Francisco, CA"],
    "startUrls": [],
}

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Yelp Business Scraper",
        "description": "Collect businesses from Yelp search — name, rating, review count, price range, and a review snippet — by search term and location. No login.",
        "version": "0.1",
        "x-build-id": "IZ9xhDysR1jQuzeca"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/xtracto~yelp-business-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-xtracto-yelp-business-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/xtracto~yelp-business-scraper/runs": {
            "post": {
                "operationId": "runs-sync-xtracto-yelp-business-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/xtracto~yelp-business-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-xtracto-yelp-business-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "searchTerms": {
                        "title": "Search terms",
                        "type": "array",
                        "description": "What to search for, e.g. restaurants, plumbers, coffee. Combined with each Location.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "locations": {
                        "title": "Locations",
                        "type": "array",
                        "description": "Cities/areas, e.g. \"San Francisco, CA\", \"New York, NY\". Combined with each search term.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "startUrls": {
                        "title": "Yelp search URLs (optional)",
                        "type": "array",
                        "description": "Paste Yelp search URLs directly (overrides terms/locations), e.g. https://www.yelp.com/search?find_desc=restaurants&find_loc=San+Francisco%2C+CA",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItemsPerSearch": {
                        "title": "Max businesses per search (0 = all)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Cap per term+location search. 0 = all (up to the page limit).",
                        "default": 0
                    },
                    "maxItems": {
                        "title": "Max businesses total (0 = all)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Overall cap for the run. 0 = no limit.",
                        "default": 100
                    },
                    "maxPagesPerSearch": {
                        "title": "Max pages per search",
                        "minimum": 1,
                        "maximum": 24,
                        "type": "integer",
                        "description": "Yelp shows 10 results per page (caps around 24 pages).",
                        "default": 24
                    },
                    "harvestAttempts": {
                        "title": "Solve attempts (IP rotations)",
                        "minimum": 1,
                        "maximum": 15,
                        "type": "integer",
                        "description": "How many times to retry the initial unlock on a fresh proxy IP if it doesn't pass. More attempts = more reliable, slightly higher cost.",
                        "default": 8
                    },
                    "proxyConfiguration": {
                        "title": "Proxy",
                        "type": "object",
                        "description": "Residential proxy required; US recommended.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ],
                            "apifyProxyCountry": "US"
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
