# Yellow Pages Scraper (`automation-lab/yellowpages-scraper`) Actor

Scrape Yellow Pages business listings. Extract names, phone numbers, addresses, ratings, reviews, categories, and websites. Export to JSON, CSV, or Excel.

- **URL**: https://apify.com/automation-lab/yellowpages-scraper.md
- **Developed by:** [Automation Lab](https://apify.com/automation-lab) (community)
- **Categories:** Lead generation, Business
- **Features:** Limited permissions
- **Stats:** 156 total users, 7 monthly users, 97.7% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 business scrapeds

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

### What does Yellow Pages Scraper do?

**Yellow Pages Scraper** extracts business listing data from [yellowpages.com](https://www.yellowpages.com) at scale. Enter a search term and location, and the scraper returns structured data for every matching business: **names, phone numbers, addresses, ratings, reviews, categories, and websites**.

The fastest way to try it is to click **Start** with the prefilled input (plumber in New York) — you'll get results in under 30 seconds.

The actor uses Playwright with bounded fresh-session retries and automatically switches to Yellow Pages content served through Google's public translated delivery surface when direct access remains challenged. It combines Yellow Pages structured data with fields visible in the search results page; if both routes fail, the run fails clearly instead of returning stale or unrelated records.

### Next step: enrich local business lead lists

Use Yellow Pages Scraper as a local business lead list source. When listings include websites, send those domains to [Website Contact Finder](https://apify.com/automation-lab/website-contact-finder) for public emails, phones, socials, and contact pages. Clean discovered emails with [Bulk Email MX Verifier](https://apify.com/automation-lab/email-mx-verifier) and [Bulk SMTP Email Verifier](https://apify.com/automation-lab/smtp-email-verifier) before outreach.

### Build a cold-outreach lead workflow on Apify

Use this actor as one step in a scrape → enrich → verify → export workflow:

1. **Source B2B accounts or contacts** with [LinkedIn Company Employees Scraper](https://apify.com/automation-lab/linkedin-company-employees-scraper), [LinkedIn Company Scraper](https://apify.com/automation-lab/linkedin-company-scraper), [Clutch.co Scraper](https://apify.com/automation-lab/clutch-scraper), [Yellow Pages Scraper](https://apify.com/automation-lab/yellowpages-scraper), [YellowPages Canada Business Scraper](https://apify.com/automation-lab/yellowpages-canada-scraper), or [Substack Scraper](https://apify.com/automation-lab/substack-scraper).
2. **Find public contact signals** with [Website Contact Finder](https://apify.com/automation-lab/website-contact-finder) or [Social Media Profile Finder](https://apify.com/automation-lab/social-media-profile-finder) when you have company domains/websites.
3. **Clean the list before outreach** with [Bulk Email MX Verifier](https://apify.com/automation-lab/email-mx-verifier) for fast syntax/MX/disposable/role-risk screening, then [Bulk SMTP Email Verifier](https://apify.com/automation-lab/smtp-email-verifier) when you need deeper mailbox and catch-all checks.
4. **Export to your outreach stack** as CSV/Excel/JSON for Instantly, HubSpot, Salesforce, Pipedrive, Airtable, Make, Zapier, or n8n.

Use only public/business contact data and comply with CAN-SPAM, GDPR, and your outreach platform's rules. Prefer company emails over personal addresses, filter role-based/risky emails when needed, and do not send to invalid or unverified addresses.

### Who is it for?

**Lead generation teams** looking to build targeted contact lists:

- Extract plumber, electrician, or contractor listings in specific cities
- Build prospect databases with phone numbers and websites for outreach
- Filter by rating to target established businesses

**Market researchers** analyzing local business landscapes:

- Count businesses per category in a metro area
- Compare rating distributions across locations
- Track which categories are saturated vs. underserved

**Data analysts** building business directories or aggregators:

- Collect structured business data at scale across multiple cities
- Enrich CRM records with Yellow Pages data
- Monitor new business listings appearing in target markets

**Sales & marketing professionals** doing competitive intelligence:

- Find all competitors in a specific category and location
- Analyze competitor ratings and review counts
- Identify top-rated businesses for partnership opportunities

### Why use Yellow Pages Scraper?

- **Current-run data only** — never substitutes cached, pre-existing, or hard-coded businesses when a live search is empty or blocked
- **Rich data** — combines structured and page data for business name, phone, full address, rating, review count, categories, website URL, coordinates, and Yellow Pages listing link when available
- **No API key needed** — no Yellow Pages login or token is required
- **Pagination support** — automatically follows "Next" links to collect large result sets
- **Clean URLs** — strips tracking parameters from listing URLs
- **Pay-per-event pricing** — only pay for what you scrape, no monthly subscription
- **API, scheduling, and integrations** — access results via REST API, schedule recurring runs, export to Google Sheets, Slack, or 5,000+ apps via Zapier and Make
- **Export formats** — download results as JSON, CSV, Excel, or XML

### What data can you extract?

Each business listing includes up to **13 data fields**:

| Field | Description | Example |
|-------|-------------|---------|
| `businessName` | Company name | "Aladdin Plumbing Corp." |
| `phone` | Phone number | "(347) 395-4715" |
| `address` | Street address | "55 Garnet Street" |
| `city` | City | "Kings County" |
| `state` | State code | "NY" |
| `zip` | ZIP code | "11231" |
| `rating` | Star rating (1-5) | 4.5 |
| `reviewCount` | Number of reviews | 218 |
| `categories` | Business categories | "Plumbers, Water Heaters" |
| `website` | Business website URL | "https://example.com" |
| `url` | Yellow Pages listing URL | "https://www.yellowpages.com/..." |
| `latitude` | Latitude coordinate | null |
| `longitude` | Longitude coordinate | null |

### How much does it cost to scrape Yellow Pages?

This actor uses **pay-per-event** pricing — you pay only for what you scrape. No monthly subscription. All platform costs (compute, proxy, storage) are **included**.

| | Free | Bronze | Silver | Gold |
|---|---|---|---|---|
| **Per business** | $0.003 | $0.0025 | $0.002 | $0.0015 |
| **100 businesses including start** | 0.31 USD | 0.26 USD | 0.21 USD | 0.16 USD |
| **1,000 businesses including start** | 3.01 USD | 2.51 USD | 2.01 USD | 1.51 USD |

These totals use `result count × tier unit price + $0.01 start fee`. Platinum and Diamond subscribers receive additional discounts (up to $0.00075/business for Diamond).

**Real-world cost examples:**

| Query | Results | Duration | Cost (Free tier) |
|---|---|---|---|
| Plumber, New York | 10 | ~18s | ~$0.04 |
| Dentist, Los Angeles | 15 | ~30s | ~$0.055 |
| Pizza, Chicago | 50 | ~35s | ~$0.16 |

On the **free plan** ($5 credit), you can scrape approximately **1,600 business listings**.

### How to scrape Yellow Pages business listings

1. Go to [Yellow Pages Scraper](https://apify.com/automation-lab/yellowpages-scraper) on Apify Store
2. Click **Start** to try with the prefilled example (plumber in New York)
3. Or customize the input:
   - Set **Search Terms** to the business type (e.g., "dentist", "pizza", "electrician")
   - Set **Location** to a city and state (e.g., "Los Angeles, CA") or ZIP code
   - Adjust **Max Results** to control how many listings to extract
4. Click **Start** and wait for the run to finish
5. Download results as JSON, CSV, or Excel from the **Dataset** tab

**Example input for restaurants in Miami:**

```json
{
    "searchTerms": "restaurant",
    "location": "Miami, FL",
    "maxResults": 50
}
```

**Example input for lawyers in Seattle:**

```json
{
    "searchTerms": "lawyer",
    "location": "Seattle, WA",
    "maxResults": 100
}
```

### Input parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `searchTerms` | string | Yes | — | Business type or keyword (e.g., "plumber", "dentist") |
| `location` | string | Yes | — | City/state or ZIP code (e.g., "New York, NY", "90210") |
| `maxResults` | integer | No | 100 | Maximum number of listings to extract (1-500) |

### Output example

```json
{
    "businessName": "Jonathan M. Engel, DDS",
    "phone": "(323) 934-3341",
    "address": "5901 W Olympic Blvd",
    "city": "Los Angeles",
    "state": "CA",
    "zip": "90036",
    "rating": 5,
    "reviewCount": 218,
    "categories": "Dentists, Periodontists, Prosthodontists & Denture Centers",
    "website": "https://www.socaldentalhealth.com",
    "url": "https://www.yellowpages.com/los-angeles-ca/mip/jonathan-m-engel-dds-15064536",
    "latitude": null,
    "longitude": null
}
```

### Tips for best results

- **Start small** — use a low `maxResults` (10-20) for your first run to preview the data and estimate costs
- **Use specific search terms** — "emergency plumber" returns more relevant results than just "plumber"
- **Include state code** — "Los Angeles, CA" works better than just "Los Angeles"
- **Schedule recurring runs** — set up weekly scrapes to monitor new listings appearing in your market
- **Combine queries** — run multiple scrapes with different search terms to build comprehensive databases
- **Export to Google Sheets** — connect the output to a Google Sheet for easy team collaboration

### Integrations

- **Yellow Pages Scraper -> Google Sheets**: Automatically push new business listings to a shared spreadsheet for your sales team to work through
- **Yellow Pages Scraper -> Slack**: Get notified when new high-rated businesses appear in your target market — set up a scheduled run with a Slack webhook
- **Yellow Pages Scraper -> CRM (via Zapier/Make)**: Feed extracted business contacts directly into HubSpot, Salesforce, or Pipedrive for lead nurturing
- **Scheduled monitoring**: Run weekly to track new businesses opening in specific categories and locations
- **Webhooks**: Trigger your data pipeline automatically when a scrape completes — process, enrich, and store results in your database

### API Usage

You can run Yellow Pages Scraper programmatically using the Apify API.

#### Node.js

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('automation-lab/yellowpages-scraper').call({
    searchTerms: 'dentist',
    location: 'Los Angeles, CA',
    maxResults: 50,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor("automation-lab/yellowpages-scraper").call(run_input={
    "searchTerms": "dentist",
    "location": "Los Angeles, CA",
    "maxResults": 50,
})

items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)
```

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/automation-lab~yellowpages-scraper/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "searchTerms": "dentist",
    "location": "Los Angeles, CA",
    "maxResults": 50
  }'
```

### Use with AI agents via MCP

Yellow Pages Scraper is available as a tool for AI assistants that support the [Model Context Protocol (MCP)](https://docs.apify.com/platform/integrations/mcp).

Add the Apify MCP server to your AI client — this gives you access to all Apify actors, including this one:

#### Setup for Claude Code

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=automation-lab/yellowpages-scraper"
```

#### Setup for Claude Desktop, Cursor, or VS Code

Add this to your MCP config file:

```json
{
    "mcpServers": {
        "apify": {
            "url": "https://mcp.apify.com?tools=automation-lab/yellowpages-scraper"
        }
    }
}
```

Your AI assistant will use OAuth to authenticate with your Apify account on first use.

#### Example prompts

Once connected, try asking your AI assistant:

- "Find all dentists in Austin, TX with their phone numbers and ratings (use automation-lab/yellowpages-scraper)"
- "Get me a list of 50 pizza restaurants in Chicago with their websites"
- "Scrape plumber listings in Miami and export to a spreadsheet"

Learn more in the [Apify MCP documentation](https://docs.apify.com/platform/integrations/mcp).

### Data handling, dependencies, and limitations

This actor performs deterministic extraction and **does not use AI models**. It sends the search term and location to the public Yellow Pages website through Apify's US residential proxy service. When direct access remains challenged, it requests the same public Yellow Pages result page through Google Translate's delivery surface. The company pays the proxy and platform costs; users do not need a separate source or proxy account.

Output can include public business names, phone numbers, addresses, ratings, categories, websites, listing URLs, and coordinates. The actor does not request private profiles or credentials. It creates no external cache or separate copy: datasets, key-value diagnostics, and logs follow the retention and deletion controls of the user's Apify account. Operational logs contain source URLs and retry messages, not proxy credentials or user secrets.

Yellow Pages may omit optional fields or block an automated session, and the translated fallback depends on Google continuing to expose that public delivery surface. Missing source fields stay `null`; explicit no-match searches return an empty dataset; exhausted blocking or an unknown page shape fails rather than substituting old data. Yellow Pages and Google are named only to identify public dependencies. This actor is not affiliated with, endorsed by, or sponsored by either company.

For help with a run, use the **Issues** tab on the Actor's Apify Store page and include the run ID and non-sensitive input details.

### Is it legal to scrape Yellow Pages?

Yellow Pages Scraper only extracts publicly available data from yellowpages.com. The scraper does not bypass any login walls or access private data. Web scraping of public data is generally legal, as confirmed by the [US Ninth Circuit ruling](https://en.wikipedia.org/wiki/HiQ_Labs_v._LinkedIn) (hiQ Labs v. LinkedIn).

Always use scraped data ethically and in compliance with applicable laws, including GDPR and CCPA. Review Yellow Pages' Terms of Service before large-scale data collection. Apify provides tools for [responsible data collection](https://apify.com/ethical-scraping).

### Legality

Scraping publicly available data is generally legal according to the [US Court of Appeals ruling](https://en.wikipedia.org/wiki/HiQ_Labs_v._LinkedIn) (HiQ Labs v. LinkedIn). This actor only accesses publicly available information and does not require authentication. Always review and comply with the target website's Terms of Service before scraping. For personal data, ensure compliance with GDPR, CCPA, and other applicable privacy regulations.

### FAQ

**How fast is Yellow Pages Scraper?**
The scraper extracts 10-50 businesses in 15-35 seconds. Speed depends on the number of results and pagination. Each page contains up to 30 listings, so requests for 30+ results require multiple page loads.

**How much does it cost to scrape 1,000 businesses?**
On the Free tier, the estimate is `1,000 × $0.003 + $0.01`, or 3.01 USD including the start fee. See the pricing table above for all listed tiers.

**Why are some fields null?**
Yellow Pages does not expose every field for every listing on the search page. Missing ratings, review counts, categories, websites, or coordinates are returned as `null`; the actor does not guess or crawl extra profile pages to fill them.

**What happens when there are no matches or Yellow Pages blocks access?**
A page that explicitly reports no matches succeeds with an empty dataset and only the start charge. When direct Yellow Pages access stays challenged, the actor retries the same public result page through Google Translate. If both routes are challenged or have an unrecognized shape, the run fails with an actionable error and does not emit or charge business records.

**Why did my run return fewer results than expected?**
Yellow Pages may not have enough matching listings for your search term and location combination, and duplicate listings across result pages are emitted only once. Try broader search terms or a larger metro area.

**Can I scrape the entire United States?**
Yes, but run separate queries per city/metro area for best results. Yellow Pages limits search results per query, so splitting by location ensures complete coverage.

### Related actors

- [Google Maps Scraper](https://apify.com/automation-lab/google-maps-scraper) — extract business data from Google Maps

- [Indeed Scraper](https://apify.com/automation-lab/indeed-scraper) — extract job listings and company data

- [LinkedIn Company Scraper](https://apify.com/automation-lab/linkedin-company-scraper) — scrape LinkedIn company profiles

- [Craigslist Scraper](https://apify.com/automation-lab/craigslist-scraper) — extract Craigslist listings and classifieds

- [TripAdvisor Scraper](https://apify.com/automation-lab/tripadvisor-scraper) — scrape restaurant and hotel reviews

# Changelog

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

# Actor input Schema

## `searchTerms` (type: `string`):

Enter the business type or keyword to search for (e.g., "plumber", "dentist", "pizza").

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

Enter city, state, or zip code (e.g., "New York, NY", "90210").

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

Limit the number of business listings to extract. Yellow Pages shows 30 per page.

## Actor input object example

```json
{
  "searchTerms": "dentist",
  "location": "Los Angeles, CA",
  "maxResults": 10
}
```

# Actor output Schema

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

Open the default dataset table with business identity, contact, rating, category, website, listing URL, and coordinate fields.

# 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 = {
    "searchTerms": "dentist",
    "location": "Los Angeles, CA",
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/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 = {
    "searchTerms": "dentist",
    "location": "Los Angeles, CA",
    "maxResults": 10,
}

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

```

## MCP server setup

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