# YellowPages Scraper - USA Business Leads (`delicious_zebu/yellowpages-usa-business-lead-scraper`) Actor

Scrape YellowPages.com by keyword and location, or paste search URLs: business name, phone, email, website, address, categories, rating, review count, hours and claimed status. Build US business lead lists and export to CSV or Excel.

- **URL**: https://apify.com/delicious_zebu/yellowpages-usa-business-lead-scraper.md
- **Developed by:** [Zebu Data](https://apify.com/delicious_zebu) (community)
- **Categories:** Lead generation, Automation, Developer tools
- **Stats:** 275 total users, 12 monthly users, 100.0% runs succeeded, 38 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $2.00 / 1,000 results

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

## YellowPages Data Scraper – Extract Rich Business Data Effortlessly 🚀

Unlock detailed business information from [YellowPages](https://www.yellowpages.com) （`https://www.yellowpages.com`） with our powerful Apify actor. Designed for maximum flexibility and efficiency, this actor lets you gather comprehensive data using keyword-based searches or filtered links with just a few simple parameters.

***

### Overview

This actor efficiently extracts comprehensive business details from the US YellowPages directory. Whether you're researching local industries, performing competitive analysis, or fueling your lead generation, this tool delivers valuable data with customizable options to meet your specific needs.

***

### Key Features

- **Rich Data Extraction:** Collect detailed fields such as business name, contact details, address, reviews, ratings, and more.
- **Flexible Sorting Options:** Choose from four different sorting methods to prioritize search results according to your needs.
- **Customizable Pagination:** Define the maximum number of pages to scrape for each parameter, ensuring efficient and controlled data collection.
- **Dual Scraping Methods:**
  - **Keyword + Location:** Input search keywords (e.g., `dentists`) and location (e.g., `New York, NY`) to retrieve tailored results.
  - **Filtered Links:** Use direct links obtained from webpage filters to harvest specific data sets.

### Input Parameters

- **Search Keyword:** e.g., `dentists`
- **Location:** e.g., `New York, NY`
- **Sorting Method:** Four available options to order your search results.
- **Max Pages per Parameter:** Customize the maximum number of pages to crawl for each parameter.
- **Filtered Links:** Direct URLs obtained from in-page filtering for targeted scraping.

***

### Sample Data Output

```
{
    "is_ad": false,
    "title": "Manhattan Dental Spa",
    "is_claimed": "Claimed",
    "categories": [
        "Cosmetic Dentistry",
        "Dental Clinics",
        "Dental Hygienists"
    ],
    "star_rating": "5",
    "rating_count": "58",
    "opening_hours": "CLOSED NOW Today: 8:00 am - 4:00 pm Tomorrow: 9:30 am - 6:30 pm",
    "phone": "(212) 683-2530",
    "website": "http://www.manhattandentalspa.com",
    "address": "200 Madison Ave Ste 2201New York, NY 10016",
    "email": "",
    "regular_hours": {
        "Mon:": "9:00 am - 6:30 am",
        "Tue:": "8:30 am - 6:30 pm",
        "Wed:": "8:00 am - 6:30 pm",
        "Thu:": "8:30 am - 6:30 pm",
        "Fri:": "8:00 am - 4:00 pm",
        "Sat:": "9:30 am - 6:30 pm",
        "Sun": "Closed"
    },
    "more_info": {
        "General Info": "Manhattan Dental Spa (MDS) was awarded as the Elite Providers by Align Technology, the creators of Invisalign, for being the top 1% of InvisalignÊNewYork City providers for the past nine years. The dentists at MDS are all ADA accredited. The cosmetic and restorative dental services offered here include Invisalign, Zoom teeth whitening and KšR whitening. Dental services also includes, Nyc lumineers,  veneers, Juvederm, Botox, deep cleaning,  dental implants, sedation dentistry, sleep apnea,  dentures and bridges. MDS serves the neighborhoods of Midtown Manhattan and Murray Hill.  Payment can be through debit/credit cards, cash, check, in-office and third party financing by CareCredit, and PPO insurances. The spa can assist clients in English, French, Italian, Russian, Japanese, and Spanish.",
        "Brands": "invisalign, zoom",
        "Payment method": "discover, debit, visa, amex, cash, mastercard",
        "Neighborhoods": "Midtown Manhattan, Murray Hill, Garment District",
        "Languages": "English, French, Italian, Japanese, Russian, Spanish",
        "Other Link": "http://www.manhattandentalspa.com",
        "Categories": "Cosmetic Dentistry, Dental Clinics, Dental Hygienists, Dentists, Endodontists, Implant Dentistry, Orthodontists, Periodontists, Physicians & Surgeons, Oral Surgery, Prosthodontists & Denture Centers, Teeth Whitening Products & Services"
    },
    "reviews": [
        {
            "author": "tjanet826",
            "date": "Edited: 02/08/2017",
            "text": "Everyone made me feel incredibly comfortable especially because I was very nervous.  I could not have asked for a better experience.",
            "rating": "five",
            "helpful_count": "0"
        },
        {
            "author": "janestuckley",
            "date": "Edited: 02/07/2017",
            "text": "Everyone was very kind and efficient, especially the technician Yokanna. Great experience and very glad I found Manhattan Dental Spa.",
            "rating": "five",
            "helpful_count": "0"
        },
        {
            "author": "panpenny63",
            "date": "Edited: 02/04/2017",
            "text": "Knowledgeable team.  The results were great and the process was anything but pulling teeth.",
            "rating": "five",
            "helpful_count": "0"
        },
        {
            "author": "nmilton184",
            "date": "10/23/2013",
            "text": "Appointments start/finish on time; thorough but gentle teeth cleaning (Natascha is EXCELLENT) and a good look at your mouth by Dr. Charnas that is MUCH better than the perfunctory scan many other dentists (barely) give you; they keep an eye on changes from prior visits, for things like any teeth movement or gum erosion. Highly recommend.",
            "rating": "five",
            "helpful_count": "0"
        },
        {
            "author": "cecill227",
            "date": "10/11/2013",
            "text": "Have been to several dentists in the past and never found one I felt confident about! A good dentist is hard to find. But not impossible, I finally can say! This is a great office, with wonderful staff who do quality work!",
            "rating": "five",
            "helpful_count": "0"
        },
        {
            "author": "yshirley95",
            "date": "10/04/2013",
            "text": "Was happy to be seen same day. Was referred to specialist who saw me next day. Problem resolved within 2 days. I'm happy.",
            "rating": "five",
            "helpful_count": "0"
        },
        {
            "author": "H.",
            "date": "09/20/2013",
            "text": "I had a very nice, professional, and gentle (very important to me) dental hygienist (I wish I knew her name, but I was so nervous I did not retain it.) The dentist was quick, but efficient and seemed to know his stuff....",
            "rating": "five",
            "helpful_count": "0"
        },
        {
            "author": "donnaa935",
            "date": "08/27/2013",
            "text": "Everyone's very nice, they do a thorough job, keep you comfortable, don't try to sell you work you don't need, the office itself is clean, modern and pleasant with city views. My only problem is the wait times. If you go in for a cleaning/checkup, best to allot a solid hour and a half. You'll wait to be seen, wait as the hygienist checks on another patient, wait some more for the dentist to drop in and examine you after the cleaning.",
            "rating": "five",
            "helpful_count": "0"
        },
        {
            "author": "alicee536",
            "date": "08/21/2013",
            "text": "Saw me promptly for my appointment. The Hygienist was gentle and listened to all my concerns. The whole staff was super friendly and knowledgeable.",
            "rating": "five",
            "helpful_count": "0"
        },
        {
            "author": "eandre880",
            "date": "08/08/2013",
            "text": "Your service is always excellent. I have recommended my dentist/Manhattan Dental Spa on at least a half dozen occasions.",
            "rating": "five",
            "helpful_count": "0"
        }
    ],
    "source_url": "https://www.yellowpages.com/new-york-ny/mip/manhattan-dental-spa-22612348"
}
```

### Example Use Cases

- **Local Business Research:** Quickly compile detailed business directories for local marketing campaigns.
- **Lead Generation:** Extract contact and review data to fuel your sales outreach.
- **Competitive Analysis:** Gather and analyze competitor information to enhance your strategic decisions.
- **Data Enrichment:** Supplement your existing databases with comprehensive business profiles.

### 💬 Support and Feedback

Need help or have suggestions? Reach out to us via Apify support channels or leave feedback directly on the Actor’s page.

### Tags

`YellowPages, YellowPagesScraper, DataExtraction, BusinessData, WebScraping, LeadGeneration, LocalBusiness, CompetitiveAnalysis, SEO, Apify, YellowPage`

# Actor input Schema

## `searchKeyword` (type: `array`):

The search keyword to find businesses (e.g., 'dentists').

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

City and state to search in, e.g. 'Austin, TX'. Used together with Search Keyword. If you don't provide a location, New York, NY is used.

## `sort` (type: `string`):

Sorting method for the search results. Available options: 'Default', 'Distance', 'Rating', 'Name'.

## `maxPages` (type: `integer`):

The maximum number of pages to scrape for each parameter. (30 items per page)

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

A list of URLs (e.g., Filtered YellowPages listing page URLs) to scrape directly. You can provide any valid business page URL such as: https://www.yellowpages.com/new-york-ny/air-conditioning-service-repair?refinements=features%3AFREE_ESTIMATES

## Actor input object example

```json
{
  "searchKeyword": [
    "dentists"
  ],
  "location": "New York, NY",
  "sort": "Default",
  "maxPages": 5,
  "urls": [
    "https://www.yellowpages.com/new-york-ny/air-conditioning-service-repair?refinements=features%3AFREE_ESTIMATES"
  ]
}
```

# Actor output Schema

## `overview` (type: `string`):

Table view of USA business leads using the 'overview' view from dataset_schema.json.

## `rawResults` (type: `string`):

All USA business lead items from the default dataset without a specific view.

# 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 = {
    "searchKeyword": [
        "dentists"
    ],
    "location": "New York, NY",
    "sort": "Default",
    "maxPages": 2,
    "urls": [
        "https://www.yellowpages.com/new-york-ny/air-conditioning-service-repair?refinements=features%3AFREE_ESTIMATES"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("delicious_zebu/yellowpages-usa-business-lead-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 = {
    "searchKeyword": ["dentists"],
    "location": "New York, NY",
    "sort": "Default",
    "maxPages": 2,
    "urls": ["https://www.yellowpages.com/new-york-ny/air-conditioning-service-repair?refinements=features%3AFREE_ESTIMATES"],
}

# Run the Actor and wait for it to finish
run = client.actor("delicious_zebu/yellowpages-usa-business-lead-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 '{
  "searchKeyword": [
    "dentists"
  ],
  "location": "New York, NY",
  "sort": "Default",
  "maxPages": 2,
  "urls": [
    "https://www.yellowpages.com/new-york-ny/air-conditioning-service-repair?refinements=features%3AFREE_ESTIMATES"
  ]
}' |
apify call delicious_zebu/yellowpages-usa-business-lead-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,delicious_zebu/yellowpages-usa-business-lead-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/cqyF2HJNQWN1IUOpG/builds/7ghvkwMd2bednUI2v/openapi.json
