# Yellow Pages Scraper (`fatihai-tools/yellowpages-scraper`) Actor

Extract business listings from Yellow Pages with phone numbers, addresses, reviews, and categories. Build local business databases for lead generation, market research, and directory services.

- **URL**: https://apify.com/fatihai-tools/yellowpages-scraper.md
- **Developed by:** [fatih dağüstü](https://apify.com/fatihai-tools) (community)
- **Categories:** Business
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, NaN 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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## YellowPages Scraper - Extract Business Listings, Phone & Email

The fastest way to extract local business data from YellowPages.com. Get business names, phone numbers, email addresses, websites, ratings, hours of operation, and full addresses — all in one run.

Built for **local lead generation**, **B2B prospecting**, **market research**, and **business directory data extraction**.

### What You Get

Each scraped business record includes:

| Field | Description |
|-------|-------------|
| `businessName` | Full business name |
| `phone` | Primary phone number |
| `email` | Email address (from detail page) |
| `address` | Full street address |
| `city` / `state` / `zipCode` | Address components |
| `website` | External website URL |
| `rating` | Star rating (1.0–5.0) |
| `reviewCount` | Number of customer reviews |
| `categories` | Business category tags |
| `yearsInBusiness` | Years operating |
| `isAccredited` | BBB accreditation status |
| `hours` | Hours by day of week |
| `description` | Business description |
| `services` | List of offered services |
| `photosCount` | Number of profile photos |
| `yellowPagesUrl` | Direct YellowPages profile link |
| `searchTerm` | Keyword used to find this listing |
| `scrapedAt` | Timestamp of extraction |

### Quick Start

#### Input Example

```json
{
    "searchQueries": ["plumber", "electrician"],
    "location": "Los Angeles, CA",
    "maxResults": 200,
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": ["RESIDENTIAL"]
    }
}
````

#### Output Example

```json
{
    "businessName": "Sunset Plumbing & Heating",
    "phone": "(310) 555-0147",
    "email": "info@sunsetplumbing.example.com",
    "address": "1234 Wilshire Blvd, Los Angeles, CA 90010",
    "street": "1234 Wilshire Blvd",
    "city": "Los Angeles",
    "state": "CA",
    "zipCode": "90010",
    "website": "https://www.sunsetplumbing.example.com",
    "rating": 4.7,
    "reviewCount": 142,
    "categories": ["Plumbers", "Water Heater Repair & Replacement"],
    "yearsInBusiness": 22,
    "isAccredited": true,
    "neighborhood": "Koreatown",
    "hours": {
        "Monday": "7:00 AM - 6:00 PM",
        "Tuesday": "7:00 AM - 6:00 PM",
        "Wednesday": "7:00 AM - 6:00 PM",
        "Thursday": "7:00 AM - 6:00 PM",
        "Friday": "7:00 AM - 6:00 PM",
        "Saturday": "8:00 AM - 2:00 PM",
        "Sunday": "Closed"
    },
    "description": "Family-owned plumbing company serving LA since 2002...",
    "services": ["Emergency Plumbing", "Water Heater Install", "Drain Cleaning"],
    "photosCount": 18,
    "yellowPagesUrl": "https://www.yellowpages.com/los-angeles-ca/mip/sunset-plumbing-123456789",
    "searchTerm": "plumber",
    "searchLocation": "Los Angeles, CA",
    "scrapedAt": "2025-06-15T09:23:11.000Z"
}
```

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `searchQueries` | array | Yes | — | Business types or keywords (e.g. `["dentist", "auto repair"]`) |
| `location` | string | Yes | — | City and state (e.g. `"Chicago, IL"`) |
| `maxResults` | integer | No | 100 | Total results to collect across all queries |
| `proxy` | object | No | Residential | Proxy configuration |

#### Search Query Examples

- Service businesses: `"plumber"`, `"electrician"`, `"HVAC"`, `"roofing contractor"`
- Healthcare: `"dentist"`, `"chiropractor"`, `"optometrist"`, `"urgent care"`
- Food & beverage: `"pizza restaurant"`, `"catering"`, `"food truck"`
- Professional services: `"accountant"`, `"attorney"`, `"real estate agent"`
- Retail: `"auto parts"`, `"pet store"`, `"hardware store"`

#### Location Format

Use `"City, STATE"` format for best results:

- `"New York, NY"`
- `"Houston, TX"`
- `"Phoenix, AZ"`
- `"San Francisco, CA"`
- `"Seattle, WA"`

### Pricing

**$3.00 per 1,000 results** — pay only for what you collect.

| Volume | Cost |
|--------|------|
| 100 results | ~$0.30 |
| 1,000 results | ~$3.00 |
| 5,000 results | ~$15.00 |
| 10,000 results | ~$30.00 |

Proxy costs are separate (Apify residential proxy applies).

### Use Cases

#### Local Lead Generation

Build targeted prospect lists for any city and service category. Ideal for:

- Home service companies targeting subcontractors
- Marketing agencies building local client lists
- Sales teams prospecting small businesses

#### B2B Prospecting

Extract contact data for cold outreach campaigns:

- Phone numbers for cold calling
- Email addresses for email campaigns
- Websites for personalization research

#### Market Research

Analyze the competitive landscape in any market:

- Count competitors by city and category
- Compare ratings and review counts
- Identify market gaps

#### Data Enrichment

Enrich your existing business lists with verified YellowPages data including hours, categories, and contact info.

#### Directory Building

Build niche business directories using curated YellowPages data for specific industries or regions.

### Technical Details

- **Source:** YellowPages.com (public data)
- **Method:** HTTP requests + HTML parsing (no browser emulation needed)
- **Speed:** ~30–60 results/minute including detail pages
- **Proxy:** Residential proxies recommended for reliability
- **Pagination:** Automatically paginate through all result pages
- **Rate limiting:** Built-in 2–3 second delays between requests

### Frequently Asked Questions

**Is YellowPages data public?**
Yes. YellowPages.com is a fully public business directory. All data extracted is publicly available without login.

**How accurate is the email data?**
Emails are extracted only when businesses publicly list them on their YellowPages profile page. Not all businesses list email addresses.

**Can I scrape multiple cities at once?**
Run multiple actor instances with different locations simultaneously, or use separate `searchQueries` per location in sequence.

**What is the maximum number of results?**
YellowPages shows up to 30 results per page and typically 30+ pages per search. For high-volume needs, use multiple specific queries to maximize coverage.

**Can I export to CSV or Excel?**
Yes. Use the Apify dataset export feature to download results as CSV, JSON, Excel, or XML from your dataset view.

**Will my IP get blocked?**
This actor uses residential proxies with built-in delays to minimize detection. Residential proxies rotate IPs automatically.

**Can I schedule this to run automatically?**
Yes. Use Apify's built-in scheduler to run this actor daily or weekly to keep your data fresh.

**Does it respect robots.txt?**
The actor scrapes publicly available pages as a regular user would. YellowPages allows indexing of its public business listings.

### Related Actors

Looking for more business data? Check out other actors by [intelligent\_yaffle](https://apify.com/intelligent_yaffle):

- **Google Maps Scraper** — Extract business data including reviews from Google Maps
- **Yelp Business Scraper** — Scrape Yelp business listings, reviews, and contact info
- **LinkedIn Company Scraper** — Extract company data and employee information from LinkedIn
- **Trustpilot Review Scraper** — Collect reviews and ratings from Trustpilot
- **Angi / HomeAdvisor Scraper** — Scrape contractor listings and leads from Angi
- **BBB Business Scraper** — Extract accredited business data from Better Business Bureau

### Support

Questions or issues? Contact us through the Apify console or open a GitHub issue.

For custom scraping solutions or high-volume enterprise needs, reach out directly.

***

*Data is extracted from publicly available pages on YellowPages.com. Use responsibly and in accordance with YellowPages Terms of Service and applicable laws.*

# Actor input Schema

## `searchQueries` (type: `array`):

List of business types or keywords to search for (e.g. \["plumber", "dentist", "pizza restaurant"]).

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

City and state to search in (e.g. "Los Angeles, CA", "New York, NY", "Chicago, IL").

## `maxResults` (type: `integer`):

Maximum number of business listings to scrape across all search queries.

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

Proxy settings. Residential proxies are recommended for best results on YellowPages.

## Actor input object example

```json
{
  "searchQueries": [
    "plumber",
    "electrician",
    "dentist"
  ],
  "location": "Los Angeles, CA",
  "maxResults": 100,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "searchQueries": [
        "plumber"
    ],
    "location": "Los Angeles, CA"
};

// Run the Actor and wait for it to finish
const run = await client.actor("fatihai-tools/yellowpages-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 = {
    "searchQueries": ["plumber"],
    "location": "Los Angeles, CA",
}

# Run the Actor and wait for it to finish
run = client.actor("fatihai-tools/yellowpages-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 '{
  "searchQueries": [
    "plumber"
  ],
  "location": "Los Angeles, CA"
}' |
apify call fatihai-tools/yellowpages-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Yellow Pages Scraper",
        "description": "Extract business listings from Yellow Pages with phone numbers, addresses, reviews, and categories. Build local business databases for lead generation, market research, and directory services.",
        "version": "1.0",
        "x-build-id": "26gnEmmS6QfkHZIo1"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/fatihai-tools~yellowpages-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-fatihai-tools-yellowpages-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/fatihai-tools~yellowpages-scraper/runs": {
            "post": {
                "operationId": "runs-sync-fatihai-tools-yellowpages-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/fatihai-tools~yellowpages-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-fatihai-tools-yellowpages-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "searchQueries",
                    "location"
                ],
                "properties": {
                    "searchQueries": {
                        "title": "Search Terms",
                        "type": "array",
                        "description": "List of business types or keywords to search for (e.g. [\"plumber\", \"dentist\", \"pizza restaurant\"]).",
                        "default": [
                            "plumber"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "location": {
                        "title": "Location",
                        "type": "string",
                        "description": "City and state to search in (e.g. \"Los Angeles, CA\", \"New York, NY\", \"Chicago, IL\").",
                        "default": "Los Angeles, CA"
                    },
                    "maxResults": {
                        "title": "Maximum Results",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum number of business listings to scrape across all search queries.",
                        "default": 100
                    },
                    "proxy": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings. Residential proxies are recommended for best results on YellowPages.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
