# YellowPages USA Lead Generator (`parsebird/yellowpages-scraper`) Actor

Scrape business listings from YellowPages.com. Extract names, phone numbers, emails, addresses, ratings, reviews, hours, categories, and websites. Search any industry and US city. Listing and detail modes with Pay-per-event pricing.

- **URL**: https://apify.com/parsebird/yellowpages-scraper.md
- **Developed by:** [ParseBird](https://apify.com/parsebird) (community)
- **Categories:** Lead generation, Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 32 total users, 1 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $6.00 / 1,000 yellowpages business listings

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

### YellowPages USA Lead Generator

Scrape business listings from [YellowPages.com](https://www.yellowpages.com/), the largest US business directory with 3,000+ categories across every city in the United States. Extract names, phone numbers, emails, addresses, ratings, reviews, hours, categories, and websites. Listing and detail modes with Pay-per-event pricing.

<table><tr>
<td style="border-left:4px solid #1a73e8;padding:12px 16px;font-weight:600">Build targeted lead lists from YellowPages — search any industry and US city, extract business contacts with emails, phone numbers, ratings, and hours at scale.</td>
</tr></table>

##### Copy to your AI assistant

Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.

```
parsebird/yellowpages-scraper on Apify. Call: ApifyClient("TOKEN").actor("parsebird/yellowpages-scraper").call(run_input={...}), then client.dataset(run["defaultDatasetId"]).list_items().items for results. Key inputs: searchQuery (string, e.g. "plumbers", "restaurants"), location (string, e.g. "Los Angeles, CA", "New York, NY", "90210"), category (string, optional — "attorneys"/"plumbers"/"dentists"/"restaurants"/etc.), maxPages (integer, default 5), maxResults (integer, default 100), includeDetails (boolean, default false — enables email, hours, description extraction). Full actor spec: fetch build via GET https://api.apify.com/v2/acts/parsebird~yellowpages-scraper (Bearer TOKEN). Get token: https://console.apify.com/account/integrations
```

### What does YellowPages USA Lead Generator do?

This Actor scrapes [yellowpages.com](https://www.yellowpages.com/) using Playwright with residential US proxies to bypass Cloudflare protection. It supports two modes:

**Listing mode** (default, fast):

| Field | Example |
|-------|---------|
| Business name | Joe's Plumbing LLC |
| Phone | (512) 555-0142 |
| Address | 1234 Main St, Austin, TX 78701 |
| City / State / ZIP | Austin / TX / 78701 |
| Rating | 4.5 |
| Review count | 47 |
| Detail URL | https://www.yellowpages.com/austin-tx/mip/... |

**Detail mode** (adds per business):

| Field | Example |
|-------|---------|
| Email | joe@joesplumbing.com |
| Image | https://i3.ypcdn.com/blob/... |
| Hours | {"Mon - Sun": "12:00 am - 11:59 pm"} |
| Description | Full business description text |
| Categories | \["Plumbers", "Water Heaters"] |
| Website | https://joesplumbing.com |
| Years in business | 12 |
| Amenities | \["Licensed", "Insured", "Free Estimates"] |
| Payment methods | \["Visa", "Mastercard", "Cash"] |
| Neighborhoods | \["Downtown", "East Side"] |
| Accreditations | \["BBB Accredited"] |
| Social links | {"facebook": "...", "instagram": "..."} |

### Why scrape YellowPages?

- **Lead generation** — Build targeted prospect lists of plumbers, dentists, lawyers, or any industry in any US city with direct emails and phone numbers
- **Sales prospecting** — Get verified business contacts for cold outreach, SDR campaigns, and appointment setting
- **Market research** — Analyze business density, ratings, and competition across categories and cities
- **Competitive intelligence** — Find all competitors in a specific category and location, compare ratings and review counts
- **Data enrichment** — Supplement your CRM with business details, emails, websites, hours, and categories
- **Insurance & finance** — Find businesses by industry and location for quoting, underwriting, and financial services
- **Directory building** — Feed business data into your own marketplace, aggregation platform, or local directory

### How to use

1. Go to the [YellowPages USA Lead Generator](https://apify.com/parsebird/yellowpages-scraper) page on Apify Store
2. Click **Try for free**
3. Configure your input:
   - **Search Query** — e.g. `plumbers`, `Italian restaurants`, `dentists`
   - **Location** — e.g. `Los Angeles, CA`, `New York, NY`, `90210`
   - **Category** — Optional: select a pre-defined category for more reliable results
   - **Include Details** — Enable to extract emails, hours, and full business descriptions
4. Click **Start** and wait for the run to finish
5. Download your data in JSON, CSV, Excel, or connect via API

> **Tip:** Use **Category** mode when you know the exact YellowPages category (e.g. "attorneys", "plumbers"). Use **Search Query** mode for free-text searches (e.g. "emergency plumber near me").

### Input parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `searchQuery` | string | `"restaurants"` | Business type, name, or keyword. Leave empty if using Category. |
| `location` | string | `"Los Angeles, CA"` | City and state (e.g. `New York, NY`) or ZIP code (e.g. `90210`). Required. |
| `category` | string | `""` | Pre-defined YellowPages category slug (e.g. `attorneys`, `plumbers`). Overrides Search Query when set. |
| `maxPages` | integer | `5` | Max listing pages (30 businesses per page) |
| `maxResults` | integer | `100` | Max businesses to return |
| `includeDetails` | boolean | `false` | Fetch detail pages for email, hours, description, amenities, and more |

### Output data

**Listing mode example:**

```json
{
    "businessName": "Joe's Plumbing LLC",
    "phone": "(512) 555-0142",
    "address": "1234 Main St, Austin, TX 78701",
    "streetAddress": "1234 Main St",
    "city": "Austin",
    "state": "TX",
    "zip": "78701",
    "rating": 4.5,
    "reviewCount": 47,
    "detailUrl": "https://www.yellowpages.com/austin-tx/mip/joes-plumbing-12345678",
    "rank": 1,
    "scrapedAt": "2026-03-28T12:00:00.000Z"
}
```

**Detail mode adds:**

```json
{
    "email": "joe@joesplumbing.com",
    "imageUrl": "https://i3.ypcdn.com/blob/...",
    "hours": {
        "Mon - Fri": "8:00 am - 5:00 pm",
        "Sat": "9:00 am - 2:00 pm"
    },
    "description": "Joe's Plumbing LLC has been serving Austin and surrounding areas for over 12 years. We specialize in residential and commercial plumbing...",
    "categories": ["Plumbers", "Water Heaters"],
    "website": "https://joesplumbing.com",
    "yearsInBusiness": 12,
    "amenities": ["Licensed", "Insured", "Free Estimates", "24/7 Emergency Service"],
    "paymentMethods": ["Visa", "Mastercard", "American Express", "Cash", "Check"],
    "neighborhoods": ["Downtown", "East Side", "South Austin"],
    "accreditations": ["BBB Accredited"],
    "socialLinks": {
        "facebook": "https://facebook.com/joesplumbing",
        "instagram": "https://instagram.com/joesplumbing"
    }
}
```

### Use with the Apify API

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("parsebird/yellowpages-scraper").call(run_input={
    "searchQuery": "plumbers",
    "location": "Austin, TX",
    "maxResults": 50,
    "includeDetails": True,
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{item['businessName']} - {item.get('phone', 'N/A')} - {item.get('email', 'N/A')}")
```

### Pricing

This Actor uses **Pay-per-event** pricing:

| Event | Cost | Rate |
|-------|------|------|
| `yp-business-listing` | $0.006 | $6 per 1,000 businesses |
| `yp-business-detail` | $0.021 | $21 per 1,000 businesses |

**Listing mode** charges only `yp-business-listing` per business found. **Detail mode** charges only `yp-business-detail` per business enriched (no double-charging).

**Cost examples (listing mode):**

- 30 businesses (1 page): $0.18
- 100 businesses: $0.60
- 1,000 businesses: $6.00

**Cost examples (detail mode):**

- 30 businesses (1 page): $0.63
- 100 businesses: $2.10
- 1,000 businesses: $21.00

You only pay for the businesses actually returned.

### Tips and best practices

- **Start small** — Set `maxResults` to 5-10 with `includeDetails` enabled to preview the data before running a full scrape
- **Use Category mode for precision** — Select a pre-defined category (e.g. "attorneys") for more reliable results than free-text search
- **Include state abbreviation** — Use `Los Angeles, CA` instead of just `Los Angeles` for accurate location matching
- **Listing mode for lead lists** — Listing mode includes name, address, phone, and rating — enough for quick lead generation
- **Detail mode for enrichment** — Enable detail mode when you need emails, business hours, payment methods, categories, websites, and full descriptions
- **Scheduling** — Set up weekly runs to track new businesses or changes in ratings and review counts
- **Combine queries** — Run multiple scrapes with different search terms or categories to build comprehensive databases

### Integrations

Connect this Actor to your workflow:

- **Google Sheets** — Export results directly
- **Webhooks** — Trigger actions when new data arrives
- **API** — Access data programmatically via the Apify API
- **Zapier / Make** — Automate downstream workflows
- **Slack** — Get notified when new high-rated businesses appear

### Limitations

- Currently supports US Yellow Pages (yellowpages.com) only
- YellowPages is behind Cloudflare protection, requiring residential US proxies (built-in on Apify platform). Local testing requires a US-based internet connection or proxies.
- Email extraction requires visiting individual business detail pages, which is slower but returns more contact data — typically 15-25% of listings have emails
- Yellow Pages shows a maximum of 30 results per page and roughly 3,000 results per search query
- Some businesses may not have websites, emails, ratings, or hours listed depending on their profile completeness
- Detail pages are fetched with small delays to avoid rate limiting

# Changelog

This Actor's version history is a separate document: https://apify.com/parsebird/yellowpages-scraper/changelog.md

# Actor input Schema

## `searchQuery` (type: `string`):

Business type, name, or keyword to search for (e.g. "plumbers", "Italian restaurants", "dentists"). Ignored when Category is selected. Defaults to "restaurants" if both are empty.

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

City and state (e.g. "Los Angeles, CA", "New York, NY") or ZIP code (e.g. "90210"). Required.

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

Pre-defined YellowPages category slug. When set, overrides Search Query and uses the direct category URL for more reliable results. Leave empty to use Search Query instead.

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

Maximum number of search result pages to scrape. Each page has up to 30 listings.

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

Maximum number of business listings to return. Useful for controlling costs.

## `includeDetails` (type: `boolean`):

Fetch each business's detail page for emails, hours, full description, amenities, payment methods, and more. Slower but provides richer data.

## Actor input object example

```json
{
  "searchQuery": "",
  "location": "Los Angeles, CA",
  "category": "",
  "maxPages": 5,
  "maxResults": 100,
  "includeDetails": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# 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 = {
    "searchQuery": "",
    "location": "Los Angeles, CA",
    "maxPages": 5,
    "maxResults": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("parsebird/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 = {
    "searchQuery": "",
    "location": "Los Angeles, CA",
    "maxPages": 5,
    "maxResults": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("parsebird/yellowpages-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 '{
  "searchQuery": "",
  "location": "Los Angeles, CA",
  "maxPages": 5,
  "maxResults": 100
}' |
apify call parsebird/yellowpages-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parsebird/yellowpages-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/jA7upXPRrF4V0idEl/builds/WOzXZbcAld2tV8JEs/openapi.json
