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

Yelp Business Search Scraper automates data extraction from Yelp.com, collecting business names, addresses, reviews, ratings & hours. Outputs structured JSON for easy integration. Supports bulk processing across global Yelp platforms for market research & lead generation.

- **URL**: https://apify.com/ecomscrape/yelp-business-search-scraper.md
- **Developed by:** [ecomscrape](https://apify.com/ecomscrape) (community)
- **Categories:** Lead generation, Automation, Developer tools
- **Features:** Full permissions
- **Stats:** 52 total users, 0 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 1.00 out of 5 stars

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

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

## Contact

If you encounter any issues or need to exchange information, please feel free to contact us through the following link:
[My profile](https://apify.com/ecomscrape)

## What does Yelp.com Bussiness Search Scraper do?

### Introduction

Yelp.com is one of the most popular platforms for finding local businesses, renowned for its extensive user reviews and detailed business information. In today’s data-driven world, accessing real-time business insights from Yelp has become invaluable for marketers, analysts, and business owners alike. However, manually gathering this wealth of data can be extremely time-consuming and error-prone. This is where our Yelp.com Scraper comes into play. Designed to extract key details such as names, ratings, reviews, and operational hours, the scraper addresses the need for efficient and large-scale data collection. By automating the data retrieval process, it enables users to focus on analysis and strategy, rather than struggling with manual extraction. Moreover, the scraper supports structured data export, simplifying the integration into business intelligence and analytical workflows.

### Overview of the Scraper

The Yelp.com Scraper is engineered to extract comprehensive details from Yelp business search pages. It allows users to retrieve a variety of data points, including the output fields: Encid, URL, Name, Alias, Primary Photo, Rating, Total Reviews, Categories, Location, Operation Hours, and Media. The primary function is to automate the business search process on Yelp, ensuring that critical pieces of information are collected swiftly and accurately. One of the great strengths of this tool is its reliability under various network conditions, thanks to built-in re-try mechanisms and the use of proxy configurations such as Apify Proxy with residential IP groups. This ensures that data collection can continue even if temporary blocks or connectivity issues occur. The tool is designed for SEO professionals, market researchers, and business analysts who need actionable insights to drive local business strategies. With technical accuracy and a user-friendly interface, the scraper can be deployed in diverse settings, from academic research to competitive market analysis. Its robust design makes it suitable for both small-scale projects and large, automated data collection initiatives, keeping legal limitations and usage policies in mind.

### Input and Output Details

Example url 1: https://www.yelp.com/search?find_desc=Restaurant\&find_loc=San+Francisco%2C+CA

Example url 2: https://www.yelp.com/search?find_desc=Home+%26+Garden\&find_loc=San+Francisco%2C+CA

Example url 3: https://www.yelp.com/search?find_desc=Auto+Detailing\&find_loc=San+Francisco%2C+CA

Example Screenshot of bussiness information page:

![](https://i.ibb.co/mrCMmsBS/Screenshot-from-2025-07-07-16-06-28.png)

#### Input Format

The scraper accepts configuration through a JSON object with several key parameters:

##### Scrape with URLs:

```json
{
  "max_retries_per_url": 2, // Maximum number of retry attempts for each URL
  "proxy": { // Proxy configuration to avoid bot detection
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL" 
    ],
    "apifyProxyCountry": "US" // Choose a country that matches your target data location
  },
  "max_items_per_url": 20, // Total number of items you want to scrape
  "urls": [ // Business listing page URLs to scrape
    "https://www.yelp.com/search?find_desc=Restaurant&find_loc=San+Francisco%2C+CA",
    "https://www.yelp.com/search?find_desc=Auto+Detailing&find_loc=San+Francisco%2C+CA",
    "https://www.yelp.com/search?find_desc=Home+%26+Garden&find_loc=San+Francisco%2C+CA"
  ],
  "ignore_url_failures": true // Continue scraping even if some URLs fail
}
```

**The `urls` parameter**: List of business listing page URLs that you want to scrape. You can add URLs one by one, or use the Bulk edit section to add a prepared list.

**The `ignore_url_failures` parameter**: If set to `true`, the scraper will continue running even if some URLs fail to be scraped after reaching the maximum number of retries. This ensures that one problematic URL doesn't stop your entire scraping job.

*When you provide a list of URLs for scraping, all options in the "Scrape with search filters" section will be disabled. The system will only collect data from the URLs you specified.*

##### Scrape with Search Filters:

```json
{
  "max_retries_per_url": 2, // Maximum number of retry attempts for each search filter
  "proxy": { // Proxy configuration to avoid bot detection
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL" 
    ],
    "apifyProxyCountry": "US" // Choose a country that matches your target data location
  },
  "max_items_per_url": 20, // Total number of items you want to scrape
  "country_code": "com", // Select Yelp country site
  "keyword": "restaurant", // Search keyword to find businesses
  "location": "San Francisco, CA", // Location to search
  "sort_by": "rating", // Sort businesses by specific criteria
  "page": 1 // Starting page number for search results
}
```

**The `country_code` parameter**: Select the Yelp country site you want to scrape:

- `"com"` - Global (Yelp.com - primarily USA)
- `"uk"` - United Kingdom (Yelp.co.uk)
- `"ca"` - Canada (Yelp.ca)
- `"de"` - Germany (Yelp.de)
- `"fr"` - France (Yelp.fr)
- `"au"` - Australia (Yelp.com.au)
- `"jp"` - Japan (Yelp.co.jp)
- `"it"` - Italy (Yelp.it)
- `"es"` - Spain (Yelp.es)

**The `keyword` parameter**: The search keyword to find businesses (e.g., "restaurant", "pizza", "plumber", "dentist", "hotel").

**The `location` parameter**: Enter the location to search for businesses. You can use:

- City and state (e.g., "San Francisco, CA", "New York, NY")
- Zip codes (e.g., "94102", "10001")
- Neighborhoods (e.g., "Brooklyn", "SoHo")
- Addresses or landmarks

**The `sort_by` parameter**: Sort businesses by various criteria:

- `"relevance"` - Relevance (most relevant first)
- `"rating"` - Highest Rated (best reviews first)
- `"review_count"` - Most Reviewed (most reviews first)

**The `page` parameter**: Starting page number for scraping, useful for continuing interrupted scrapes or targeting specific result ranges.

*When using search filters for scraping, you need to leave the `urls` field empty (or set it to `null`) in the "Scrape with URLs" configuration.*

##### General Options:

**The `max_items_per_url` parameter**: Limits the number of business listings extracted from each listing page or search results page. The default value is 20, providing a manageable batch size while allowing for comprehensive data collection.

**The `max_retries_per_url` parameter**: Sets the maximum number of retry attempts for each URL or search filters if the scrape is detected as a bot or the page fails to load. The default value is 2, providing a good balance between thoroughness and efficiency.

**The `proxy` parameter**: Proxy configuration is essential for maintaining anonymity and avoiding detection. The residential proxy option ensures that your scraping activities appear as legitimate browsing, reducing the risk of being blocked or rate-limited. You should choose a country that matches the Yelp site you're scraping (e.g., US for Yelp.com, UK for Yelp.co.uk, CA for Yelp.ca, etc.).

#### Ouput format

You get the output from the Yelp.com Bussiness Search Scraper stored in a tab. The following is an example of the Information Fields collected after running the Actor.

```json
[ // List of bussiness information
  {
  "encid": "aqTV1OMiviDay_JUl5nnqg",
  "url": "https://www.yelp.com//adredir?ad_business_id=aqTV1OMiviDay_JUl5nnqg&campaign_id=126674350&click_origin=search_results&placement=vertical_0&placement_slot=0&redirect_url=https%3A%2F%2Fwww.yelp.com%2Fbiz%2Fhubei-restaurant-millbrae-2&request_id=5c678c2c260964c7&signature=f04265de00406ca3d0a66d52c9bd87d6f8b614efb4408ecb46fd41fd36b5bdbd&slot=0",
  "name": "Hubei Restaurant",
  "alias": "hubei-restaurant-millbrae-2",
  "primary_photo": null,
  "rating": 4.2,
  "total_reviews": 232,
  "categories": [
    {
      "title": "Chinese",
      "url": "/search?find_desc=Chinese&find_loc=San+Francisco%2C+CA"
    }
  ],
  "location": "",
  "operation_hours": {
    "format": "standard",
    "open_time": null
  },
  "media": {
    "is_scrollable": true,
    "photo_list": [
      {
        "src": "https://s3-media0.fl.yelpcdn.com/bphoto/RTyM9r7S1zw6_vTrRJgFow/348s.jpg",
        "srcset": "https://s3-media0.fl.yelpcdn.com/bphoto/RTyM9r7S1zw6_vTrRJgFow/1000s.jpg 2.87x"
      }
    ],
    "photo_href": "/adredir?ad_business_id=aqTV1OMiviDay_JUl5nnqg&campaign_id=126674350&click_origin=search_results&placement=vertical_0&placement_slot=0&redirect_url=https%3A%2F%2Fwww.yelp.com%2Fbiz%2Fhubei-restaurant-millbrae-2&request_id=5c678c2c260964c7&signature=f04265de00406ca3d0a66d52c9bd87d6f8b614efb4408ecb46fd41fd36b5bdbd&slot=0",
    "all_photos_list": null,
    "all_photos_href": "/biz_photos/aqTV1OMiviDay_JUl5nnqg",
    "is_responsive": true
  },
  "phone": "(650) 692-8858",
  "tags": [],
  "price_range": "$$",
  "from_url": "https://www.yelp.com/search?find_desc=Restaurant&find_loc=San+Francisco%2C+CA"
}, // ... Many other bussiness details
]
```

The output follows a structured format, providing rich detail in each field:

- Encid: A unique identifier for each business entry.
- URL: The direct link to the business’ Yelp page.
- Name: The official name of the business.
- Alias: An alternative representation of the business name.
- Primary Photo: The main image associated with the business.
- Rating: The average user rating, which can offer insight into service quality.
- Total Reviews: The number of reviews, indicating the level of customer engagement.
- Categories: Business categories that classify the type of service or product offered.
- Location: The business address and geographical information.
- Operation Hours: The schedule indicating when the business is open.
- Media: Additional images or videos that enrich the business profile.
- Phone: The contact number for the business.
- Tags: Keywords or phrases associated with the business.
- Price Range: The estimated price range for services or products provided.

Each field is meticulously documented to ensure that users understand the data’s context, usage, and limitations. For instance, the “Rating” field outlines average user opinions, while “Total Reviews” indicates popularity and reliability. The annotation in the output sample guides users in integrating this structured data into databases or analytics tools, facilitating seamless downstream processing.

### Usage Guide

#### Method 1: Scraping with URLs

Using the Yelp.com Scraper with URLs is straightforward. Begin by configuring your input JSON with the desired proxy settings and target URLs from Yelp.com. Add URLs of search result pages, business category pages, or location-specific listings that contain the data you need. Ensure that the "max_retries_per_url" and "max_items_per_url" are set according to the volume and frequency of data you wish to extract.

When providing URLs for scraping, all options in the "Scrape with search filters" section will be automatically disabled. The scraper will focus exclusively on extracting data from your specified URLs. You can paste URLs one by one or use the Bulk edit section to add a prepared list efficiently.

Enable the "ignore_url_failures" option to ensure your scraping job continues even if some URLs encounter issues after reaching the maximum retry limit. This prevents a single problematic URL from stopping your entire data extraction process.

#### Method 2: Scraping with Search Filters

Alternatively, you can scrape Yelp.com by using search filters instead of providing specific URLs. When using this method, leave the URLs section empty and configure the following parameters:

**Country Code**: Select the Yelp domain you want to scrape from (e.g., Global/Yelp.com, United Kingdom/Yelp.co.uk, Canada/Yelp.ca, Germany/Yelp.de, France/Yelp.fr, Australia/Yelp.com.au, Japan/Yelp.co.jp, Italy/Yelp.it, or Spain/Yelp.es).

**Keyword**: Enter the search term to find businesses (e.g., "Restaurant", "Coffee Shop", "Hotel", "Dentist").

**Location**: Specify the geographic location for your search (e.g., city, state, or zip code such as "San Francisco, CA" or "10001").

**Sort By**: Choose how you want results sorted:

- Relevance - Most relevant results first
- Highest Rated - Businesses with the best ratings
- Most Reviewed - Businesses with the most customer reviews

**Page Start**: Specify which page number to begin scraping from, useful for continuing interrupted scrapes or targeting specific result ranges.

#### Execution and Data Processing

Once the configuration is complete, run the scraper command; it will sequentially process each URL or search query and retrieve the specified details. As the process unfolds, the tool will output a structured dataset that can be directly imported into your preferred data management system or further analyzed with tools like Excel and BI software.

#### Best Practices and Troubleshooting

Monitor the scraping process to identify any anomalies, such as temporary site blocks or incomplete data segments. Users are encouraged to validate the output by cross-referencing a few data points with the actual Yelp listings to ensure accuracy.

In case of errors, the scraper provides detailed error messages, which can be used to troubleshoot connectivity issues or configuration mismatches. It is advisable to keep your proxy settings updated and compliant with legal frameworks to avoid any potential issues with Yelp's terms of service.

**Additional Recommendations**:

- Start with a small "max_items_per_url" value to test your configuration before running large-scale extractions
- Use residential proxies with country settings that match your target Yelp domain for optimal performance
- Regularly update your URL lists or search parameters to capture new businesses or seasonal changes
- Monitor for any changes in Yelp's website structure that might affect scraping performance

Moreover, regular updates to the scraper may be needed to adapt to any changes in the Yelp website's structure. Following these steps will ensure a smooth and efficient data extraction process.

### Benefits and Applications

The primary advantage of using the Yelp.com Scraper is the dramatic reduction in time and energy spent on collecting business data. By automating repetitive tasks, it allows professionals to focus on strategic decision-making. Marketers can use the extracted data for local SEO optimization and targeted advertising, while market researchers can analyze trends and consumer sentiment. Additionally, business analysts benefit from access to reliable data that may inform operational strategies and competitive intelligence. This scraper is particularly useful for startups and SMEs looking to harness online reviews and business details for competitive advantage. Ultimately, users gain more reliable data, leading to smarter business decisions and enhanced performance in a competitive market.

### Conclusion

The Yelp.com Scraper offers a powerful solution for extracting critical business data from one of the leading review platforms. By automating the data collection process and providing structured output, it helps users save time and improve insight-driven strategies. Whether for marketing, research, or operational efficiency, this tool can be seamlessly integrated into your workflows. Explore the possibilities and take your business intelligence efforts to the next level.

Note: Always ensure that your usage of the scraper complies with Yelp’s terms of service and local legal requirements.

## Your feedback

We are always working to improve Actors' performance. So, if you have any technical feedback about Yelp.com Bussiness Search Scraper or simply found a bug, please create an issue on the Actor's Issues tab in Apify Console.

# Actor input Schema

## `urls` (type: `array`):

Add the URLs of the Product list page urls you want to scrape. You can paste URLs one by one, or use the Bulk edit section to add a prepared list.

## `ignore_url_failures` (type: `boolean`):

If true, the scraper will continue running even if some URLs fail to be scraped after the maximum number of retries is reached.

## `keyword` (type: `string`):

Enter the keyword to search for items

## `country_code` (type: `string`):

Filter items by (e.g., com, uk, ca, de, fr, au, jp, it, es)

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

Enter the location to search for items (e.g., city, state, or zip code)

## `sort_by` (type: `string`):

Filter items by (e.g., relevance, EN_PRICE-LOW-TO-HIGH, EN_PRICE-HIGH-TO-LOW, EN_PRICE_PER_KG-LOW-TO-HIGH, EN_PRICE_PER_KG-HIGH-TO-LOW, AVG_RATING-HIGH-TO-LOW)

## `page` (type: `integer`):

Specify the page number to start scraping from

## `max_items_per_url` (type: `integer`):

Limit the number of items per URL or search filters you want to scrape

## `max_retries_per_url` (type: `integer`):

Limit the number of retries for each URL or search filters if the scrape is detected as a bot or the page fails to load

## `proxy` (type: `object`):

Select proxies to be used by your scraper.

## Actor input object example

```json
{
  "urls": [
    "https://www.yelp.com/search?find_desc=Restaurant&find_loc=San+Francisco%2C+CA"
  ],
  "ignore_url_failures": true,
  "max_items_per_url": 20,
  "max_retries_per_url": 2,
  "proxy": {
    "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 = {
    "urls": [
        "https://www.yelp.com/search?find_desc=Restaurant&find_loc=San+Francisco%2C+CA"
    ],
    "ignore_url_failures": true,
    "max_items_per_url": 20,
    "max_retries_per_url": 2,
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("ecomscrape/yelp-business-search-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 = {
    "urls": ["https://www.yelp.com/search?find_desc=Restaurant&find_loc=San+Francisco%2C+CA"],
    "ignore_url_failures": True,
    "max_items_per_url": 20,
    "max_retries_per_url": 2,
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("ecomscrape/yelp-business-search-scraper").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 '{
  "urls": [
    "https://www.yelp.com/search?find_desc=Restaurant&find_loc=San+Francisco%2C+CA"
  ],
  "ignore_url_failures": true,
  "max_items_per_url": 20,
  "max_retries_per_url": 2,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call ecomscrape/yelp-business-search-scraper --silent --output-dataset

```

## MCP server setup

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

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/J2du97a8TOyKhmn9e/builds/kz8FxMkMrfN6gJ5eV/openapi.json
