# Fast-Yellow Pages Scraper-Free (`apicat/yellow-pages-scraper`) Actor

Scrapes business listings, contact details, categories, websites, and working hours from Yellow Pages.

- **URL**: https://apify.com/apicat/yellow-pages-scraper.md
- **Developed by:** [Md.Rakibur Islam](https://apify.com/apicat) (community)
- **Categories:** Lead generation, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## 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/platform/actors/running/actors-in-store#pay-per-usage

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

## Yellow Pages Scraper

Extract rich business directory listings, contact details, opening hours, and ratings from **YellowPages.com** using stealthy browser automation powered by **Playwright** and **Camoufox**.

***

### 🌟 What does Yellow Pages Scraper do?

The **Yellow Pages Scraper** enables you to automatically collect public business listings and contact information from [YellowPages.com](https://www.yellowpages.com/). Whether you enter a custom search term and location or provide specific search URLs, this Actor extracts detailed business data and delivers it in clean, structured formats like **JSON**, **CSV**, **Excel**, or **HTML**.

#### Key Features

- 🛡️ **Anti-Bot Evasion**: Built with **Camoufox** (anti-fingerprinting Firefox engine) and **Playwright** to bypass detection without sophisticated proxy setups.
- 📍 **Targeted Scraping**: Search by keyword and location (e.g., *"Car Wash in Kansas City, MO"*) or feed custom start URLs directly.
- 📞 **Complete Business Profiles**: Collects business names, phone numbers, full addresses (street, city, state, zip), review scores, opening hours, categories, and direct website links.
- ⚡ **High Scalability & Resiliency**: Built on the official Apify Crawlee SDK, offering automatic retry logic and configurable timeouts.

***

### 💡 Why scrape Yellow Pages?

Yellow Pages is one of the largest online B2B and local business directories in North America. Scraping Yellow Pages provides valuable data for:

- **B2B Lead Generation**: Build targeted outreach lists of local businesses complete with telephone numbers, addresses, and official websites.
- **Competitor & Market Analysis**: Map local business density, identify market gaps, and benchmark competitor ratings.
- **Local SEO & Citation Audits**: Verify NAP (Name, Address, Phone number) consistency across business directories.
- **Data Enrichment**: Enrich existing CRM records with verified phone numbers and business categories.

***

### ⚙️ Input Parameters

You can configure the Actor via JSON input in the Apify Console.

| Field | Type | Description | Default / Example |
| :--- | :--- | :--- | :--- |
| `start_urls` | `array` | List of YellowPages search or listing URLs to crawl. | `[{"url": "https://www.yellowpages.com/search?search_terms=car+wash&geo_location_terms=Kansas+City%2C+MO"}]` |

#### Example `input.json`

````json
{
  "start_urls": [
    {
      "url": "[https://www.yellowpages.com/search?search_terms=car+wash&geo_location_terms=Kansas+City%2C+MO](https://www.yellowpages.com/search?search_terms=car+wash&geo_location_terms=Kansas+City%2C+MO)"
    },
    {
      "url": "[https://www.yellowpages.com/search?search_terms=plumber&geo_location_terms=Chicago%2C+IL](https://www.yellowpages.com/search?search_terms=plumber&geo_location_terms=Chicago%2C+IL)"
    }
  ]
}


### 📊 Output Data Format

The Actor stores scraped business details in the default Apify Dataset. Below is an example of the structured JSON output:

```json
{
  "name": "GO Car Wash",
  "url": "[https://www.yellowpages.com/kansas-city-mo/mip/go-car-wash-574949481](https://www.yellowpages.com/kansas-city-mo/mip/go-car-wash-574949481)",
  "telephone": "(816) 892-4583",
  "streetAddress": "13341 State Line Rd",
  "locality": "Kansas City",
  "region": "MO",
  "postalCode": "64145",
  "country": "US",
  "ratingValue": 4.5,
  "reviewCount": 12,
  "openingHours": [
    "Mo-Sa 07:00-20:00",
    "Su 09:00-18:00"
  ],
  "categories": [
    "Car Wash"
  ],
  "website": "[https://gocarwash.com](https://gocarwash.com)",
  "summary": "Family owned car wash offering soft cloth washes and detailing.",
  "scrapedAt": "2026-07-30T11:08:23Z"
}

````

***

### 🚀 How to use Yellow Pages Scraper via API

You can easily run this Actor programmatically using the Apify API or Apify Python SDK.

#### Python SDK Example

```python
from apify_client import ApifyClient

## Initialize the ApifyClient with your API token
client = ApifyClient("YOUR_APIFY_TOKEN")

## Prepare the Actor input
run_input = {
    "start_urls": [
        {"url": "[https://www.yellowpages.com/search?search_terms=dentist&geo_location_terms=Los+Angeles%2C+CA](https://www.yellowpages.com/search?search_terms=dentist&geo_location_terms=Los+Angeles%2C+CA)"}
    ]
}

## Run the Actor and wait for it to finish
run = client.actor("YOUR_USERNAME/yellow-pages-scraper").call(run_input=run_input)

## Fetch and print results from the dataset
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"Business: {item.get('name')} | Phone: {item.get('telephone')}")

```

***

### ⚖️ Is scraping Yellow Pages legal?

The **Yellow Pages Scraper** extracts publicly available business information publicly displayed on YellowPages.com. It does not scrape private user data or access content behind paywalls.

When scraping directories, ensure compliance with local privacy laws (such as GDPR or CCPA) and use the extracted data responsibly for legitimate business operations.

***

### ❓ FAQ & Troubleshooting

- **Does this Actor extract email addresses?**
  YellowPages typically hides email addresses or does not expose them directly on public search cards. If present on the business detail page, the scraper will capture it; otherwise, you can utilize the extracted `website` URL with an email finder tool.
- **Why do I see connection timeout errors?**
  YellowPages occasionally enforces rate limiting on certain IP ranges. If you experience timeouts, consider enabling Apify Residential Proxies in the Actor settings.

```
```

# Actor input Schema

## `start_urls` (type: `array`):

Input a list of Yellow-pages search urls with or without filters.

## Actor input object example

```json
{
  "start_urls": [
    {
      "url": "https://www.yellowpages.com/search?search_terms=barber+shop&geo_location_terms=Floridana+Beach%2C+FL"
    }
  ]
}
```

# Actor output Schema

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

View or download the dataset items

# 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 = {
    "start_urls": [
        {
            "url": "https://www.yellowpages.com/search?search_terms=barber+shop&geo_location_terms=Floridana+Beach%2C+FL"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("apicat/yellow-pages-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 = { "start_urls": [{ "url": "https://www.yellowpages.com/search?search_terms=barber+shop&geo_location_terms=Floridana+Beach%2C+FL" }] }

# Run the Actor and wait for it to finish
run = client.actor("apicat/yellow-pages-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 '{
  "start_urls": [
    {
      "url": "https://www.yellowpages.com/search?search_terms=barber+shop&geo_location_terms=Floridana+Beach%2C+FL"
    }
  ]
}' |
apify call apicat/yellow-pages-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/H8RIfJlpfEp1tYUiH/builds/thmtjneKW7sS5zgtT/openapi.json
