# Yelp Business Search Scraper (`joseolmedosotoaguirre/yelp-business-search`) Actor

Scrape public Yelp business search results by query and location for market research. Extracts name, rating, review count, categories, address, public phone, URL, and price level. Playwright + Cheerio with residential proxy recommended (DataDome).

- **URL**: https://apify.com/joseolmedosotoaguirre/yelp-business-search.md
- **Developed by:** [jose olmedo soto aguirre](https://apify.com/joseolmedosotoaguirre) (community)
- **Categories:** Lead generation, Travel, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

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

## Yelp Business Search Scraper

Apify Actor that scrapes **public** Yelp business search results by query + location for legitimate **market research** and local competitive analysis.

Built with **Camoufox** (stealth Firefox — DataDome) + **Cheerio** (Hypernova JSON + DOM merge). Concurrency 1, polite delays, dedupe by biz alias. **Apify Proxy RESIDENTIAL (US)** required.

***

### What it does

1. Warms a Camoufox session on yelp.com (DataDome cookie)
2. Opens `/search?find_desc=…&find_loc=…` pages
3. Parses Hypernova `react-root-props` and merges DOM card fields (Yelp often nulls JSON blobs)
4. Deduplicates by alias and stops at `maxItems`

#### Output fields

| Field | Description |
|--------|-------------|
| `name` | Business name |
| `rating` | Star rating (0–5) when shown |
| `reviewCount` | Number of public reviews |
| `categories` | Category titles when shown on the card |
| `address` | Neighborhood / address snippet when public |
| `phone` | Public business phone when shown |
| `url` | Canonical `https://www.yelp.com/biz/…` URL |
| `priceLevel` | `$`–`$$$$` when shown |
| `query` / `location` | Inputs used for the run |
| `scrapedAt` | ISO timestamp |

> Yelp frequently omits phone / full street address / price from search cards. Those fields are `null` when not publicly rendered on the SERP.

***

### Input

| Field | Required | Default | Description |
|--------|----------|---------|-------------|
| `query` | ✅ | — | Search term, e.g. `coffee` |
| `location` | ✅ | — | City/region, e.g. `Austin, TX` |
| `maxItems` | | `15` | Max unique businesses (cap 200) |
| `includeAds` | | `false` | Include sponsored cards |
| `proxyConfiguration` | | RESIDENTIAL + US | **Required** |

#### Example input

```json
{
  "query": "coffee",
  "location": "Austin, TX",
  "maxItems": 15,
  "includeAds": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "US"
  }
}
```

***

### Example output (real run)

Live verification on Apify (2026-07-29): query `coffee`, location `Austin, TX`, `maxItems: 15`. Extracted **11** unique organic businesses (page 2 hit a soft DataDome block; page 1 Hypernova+DOM merge succeeded). Run: [Rohs0iZYH3NKnU244](https://console.apify.com/actors/grvX9UcIK9nb4c9BL/runs/Rohs0iZYH3NKnU244).

```json
[
  {
    "name": "Desnudo Coffee",
    "rating": 4.6,
    "reviewCount": 105,
    "categories": ["Coffee Roasteries"],
    "address": "Downtown",
    "phone": null,
    "url": "https://www.yelp.com/biz/desnudo-coffee-austin-2",
    "priceLevel": null,
    "query": "coffee",
    "location": "Austin, TX",
    "scrapedAt": "2026-07-29T06:11:00.495Z"
  },
  {
    "name": "Desnudo Coffee",
    "rating": 4.7,
    "reviewCount": 344,
    "categories": ["Coffee Roasteries"],
    "address": "East Austin",
    "phone": null,
    "url": "https://www.yelp.com/biz/desnudo-coffee-austin",
    "priceLevel": null,
    "query": "coffee",
    "location": "Austin, TX",
    "scrapedAt": "2026-07-29T06:11:00.495Z"
  },
  {
    "name": "Third Coast Coffee Roasting Company",
    "rating": 4.9,
    "reviewCount": 108,
    "categories": ["Coffee & Tea", "Coffee Roasteries"],
    "address": "East Austin",
    "phone": null,
    "url": "https://www.yelp.com/biz/third-coast-coffee-roasting-company-austin",
    "priceLevel": null,
    "query": "coffee",
    "location": "Austin, TX",
    "scrapedAt": "2026-07-29T06:11:00.495Z"
  }
]
```

Also verified earlier cloud run with **15** items (name/rating/reviews/URL): [laxPbeR3GFZ0HNuT6](https://console.apify.com/actors/grvX9UcIK9nb4c9BL/runs/laxPbeR3GFZ0HNuT6).

***

### Suggested pricing

| Plan | Price | Notes |
|------|-------|--------|
| Pay per result | **$1.50–3 / 1,000 results** | Occasional local market pulls |
| Rental | **$25–39 / month** | Recurring competitor / directory jobs |

Residential proxy compute is billed separately by Apify.

***

### Responsible use / Terms of Service

- Use only for **legitimate market research** on **publicly available business listing** data.
- Respect [Yelp Terms of Service](https://www.yelp.com/static?p=tos) and applicable local laws.
- Do **not** harvest personal consumer data, bypass login walls, scrape private profiles, or run abusive high-concurrency traffic.
- Keep concurrency at 1, use polite delays, and prefer RESIDENTIAL proxies.
- You are responsible for compliance with Yelp ToS and your jurisdiction’s rules.

***

### Tips for reliable runs

1. Always enable **Apify Proxy → RESIDENTIAL** with `apifyProxyCountry: US`.
2. Start with `maxItems` ≤ 15 (~1–2 pages). Page 2+ is more likely to soft-block.
3. If you get 0 items, DataDome blocked — retry later with a fresh residential session.
4. Prefer organic results (`includeAds: false`).
5. Local `apify run` fails without Proxy external access — use `apify call` on the platform.

***

### Local development

```bash
export APIFY_TOKEN=$(grep '^APIFY_TOKEN=' ../.env | cut -d= -f2-)
npm install --registry https://registry.npmjs.org/
apify run
```

On Apify Cloud:

```bash
apify push -f
apify call joseolmedosotoaguirre/yelp-business-search --input '{...}'
```

**Actor:** https://console.apify.com/actors/grvX9UcIK9nb4c9BL\
**Username slug:** `joseolmedosotoaguirre/yelp-business-search`

# Actor input Schema

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

What to search for on Yelp (e.g. coffee, plumbers, sushi).

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

City / region as on Yelp (e.g. Austin, TX or New York, NY). Comma is recommended.

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

Maximum unique businesses to save (deduplicated by bizId / URL). ~10 organic results per page.

## `includeAds` (type: `boolean`):

When false, skip sponsored / adredir cards and keep organic listings only.

## `minDelayMs` (type: `integer`):

Polite minimum delay before each search page. Default 2500.

## `maxDelayMs` (type: `integer`):

Polite maximum delay (random between min and max). Default 4500.

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

Apify Proxy RESIDENTIAL (US) strongly recommended. Yelp blocks most datacenter IPs via DataDome.

## Actor input object example

```json
{
  "query": "coffee",
  "location": "Austin, TX",
  "maxItems": 5,
  "includeAds": false,
  "minDelayMs": 2000,
  "maxDelayMs": 3000,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Items pushed to the default dataset.

# 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": "coffee",
    "location": "Austin, TX",
    "maxItems": 5,
    "minDelayMs": 2000,
    "maxDelayMs": 3000
};

// Run the Actor and wait for it to finish
const run = await client.actor("joseolmedosotoaguirre/yelp-business-search").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": "coffee",
    "location": "Austin, TX",
    "maxItems": 5,
    "minDelayMs": 2000,
    "maxDelayMs": 3000,
}

# Run the Actor and wait for it to finish
run = client.actor("joseolmedosotoaguirre/yelp-business-search").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 '{
  "query": "coffee",
  "location": "Austin, TX",
  "maxItems": 5,
  "minDelayMs": 2000,
  "maxDelayMs": 3000
}' |
apify call joseolmedosotoaguirre/yelp-business-search --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/grvX9UcIK9nb4c9BL/builds/4GyQDbxABNZQAZFGD/openapi.json
