# Yelp Scraper: Business Search for Many Locations (`nextgensda/yelp-businesses`) Actor

Search Yelp for businesses in many locations and categories in one run: name, rating, review count, price range, categories, address, coordinates, phone, hours, photos and Yelp link. Fast HTTP scraper, no browser.

- **URL**: https://apify.com/nextgensda/yelp-businesses.md
- **Developed by:** [Tauqeer Abbas](https://apify.com/nextgensda) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 search results

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

![Yelp Business Search Scraper: many terms and locations per run, with pay-per-event pricing shown as a receipt](https://api.apify.com/v2/key-value-stores/geRVR2OV0FK5SBjwb/records/banner.png?signature=QNzIrtLhm2c5dHbmZE0T)

Search [Yelp](https://www.yelp.com/) for businesses in many locations and
categories in one run. Every business is one item in the dataset: name,
rating, review count, price range, categories, full address with
coordinates, phone number, hours, photos and a Yelp link.

### What it does

- Searches by **term** ("pizza", "plumber"), **category** ("restaurants"),
  **location** ("New York", "90210") or any combination.
- Returns up to 1,000 businesses per search and 100,000 per run.
- Pure HTTP — no browser, fast and lightweight (256 MB).
- Pay per event: a **search** that delivers results and each **business**
  pushed to the dataset.

### Input examples

**Several searches:**

```json
{
    "searches": [
        { "term": "pizza", "location": "New York" },
        { "term": "sushi", "location": "Los Angeles" }
    ]
}
```

**Many terms × many locations:**

```json
{
    "terms": ["pizza", "sushi", "tacos"],
    "locations": ["New York", "Chicago", "Houston"]
}
```

**Category search:**

```json
{
    "searches": [
        { "category": "restaurants", "location": "San Francisco" }
    ]
}
```

### Output

Each item contains:

| Field | Example |
|---|---|
| `name` | Joe's Pizza |
| `rating` | 4.5 |
| `review_count` | 1,234 |
| `price` | $$ |
| `categories` | \["Pizza", "Italian"] |
| `address` | 7 Carmine St |
| `city`, `state`, `zip` | New York, NY, 10014 |
| `latitude`, `longitude` | 40.7306, -74.0021 |
| `phone` | +12122553946 |
| `url` | https://www.yelp.com/biz/joes-pizza-new-york |
| `photo` | (first photo URL) |
| `neighborhoods` | \["Greenwich Village"] |
| `is_closed`, `hours` | false, "Open 10:00 AM - 2:00 AM" |
| `website` | joespizzanyc.com |

Plus `delivery`, `takeout`, `reservations` (when available), `distance`
(metres from the searched location) and `is_ad`.

### Pricing

Pay per event — platform usage is included in every price; you never pay
Apify compute or transfer on top. A search that returns no businesses is
free.

| Event | Price | When charged |
|---|---|---|
| Run start | $0.005 | every run |
| `search` | $0.001 | each search that delivered at least one business |
| `business` | $0.80 / 1,000 | each business pushed to the dataset |

**Example:** 10 searches × 100 businesses each = $0.005 + 10 × $0.001 +
1,000 × $0.0008 = **$0.82** for 1,000 businesses.

Your **spending limit** (set in the run configuration) is always respected:
the actor stops before exceeding it.

### Proxy

US residential proxies are recommended.

# Actor input Schema

## `searches` (type: `array`):

One search per entry: <code>{"term": "pizza", "location": "New York"}</code>. Optional per search: <code>category</code> (e.g. <code>restaurants</code>, <code>bars</code>). A search needs at least a term or a category.

## `terms` (type: `array`):

Shortcut for many terms on the same locations below.

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

Run-wide locations: every search or term runs in each location. A location is a city, neighborhood, address or zip code as you'd type it on Yelp.

## `category` (type: `string`):

Default category for searches that don't set their own (e.g. <code>restaurants</code>, <code>bars</code>, <code>plumbers</code>).

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

Yelp serves up to 1,000 per search.

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

The run stops after this many businesses.

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

US residential proxies are recommended for Yelp.

## Actor input object example

```json
{
  "searches": [
    {
      "term": "pizza",
      "location": "New York"
    },
    {
      "term": "coffee",
      "location": "San Francisco"
    }
  ],
  "maxItemsPerSearch": 100,
  "maxItems": 1000,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

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

One row per business: name, rating, review count, price range, categories, address and Yelp link.

## `allFields` (type: `string`):

Every field of every item, including coordinates, phone, hours, neighborhoods and photos.

# 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 = {
    "searches": [
        {
            "term": "pizza",
            "location": "New York"
        },
        {
            "term": "coffee",
            "location": "San Francisco"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("nextgensda/yelp-businesses").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 = {
    "searches": [
        {
            "term": "pizza",
            "location": "New York",
        },
        {
            "term": "coffee",
            "location": "San Francisco",
        },
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("nextgensda/yelp-businesses").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 '{
  "searches": [
    {
      "term": "pizza",
      "location": "New York"
    },
    {
      "term": "coffee",
      "location": "San Francisco"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call nextgensda/yelp-businesses --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nextgensda/yelp-businesses"
        }
    }
}
```

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/oveoTH7Y5IyWbRbRH/builds/pLksGeRQhlQrdlfoi/openapi.json
