# Yellow Pages US Business Scraper — Phone, Email & Address (`khadinakbar/yellow-pages-us-scraper`) Actor

Scrape US businesses from yellowpages.com by keyword+city, category URL, or profile URL. Returns name, phone, address, website, categories, rating, years in business + optional email/hours enrichment. Firefox Cloudflare-bypass, residential proxy. MCP-ready.

- **URL**: https://apify.com/khadinakbar/yellow-pages-us-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Lead generation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event + usage

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

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

## Yellow Pages US Scraper — Business Leads (Phone, Address, Website)

Scrape US business listings from **yellowpages.com** at scale. Search by keyword + city, or paste search / category / business-profile URLs, and get clean, structured leads: business name, phone, full address, website, categories, star rating, review count, and years in business — plus optional best-effort detail enrichment (email, hours, description).

Built for sales teams, lead-gen agencies, market researchers, and **AI agents** (MCP-ready). Firefox-rendered with residential proxies to reliably clear yellowpages.com's Cloudflare protection.

### What you get

| Field | Example | Notes |
|---|---|---|
| `name` | `Ritz Plumbing Heating, Air & Electrical` | Business name |
| `phone` | `(323) 452-4915` | Primary phone |
| `street` | `1355 S La Brea Ave` | Organic listings (ads omit street) |
| `city` / `state` / `zip` | `Los Angeles` / `CA` / `90019` | Parsed address parts |
| `fullAddress` | `1355 S La Brea Ave, Los Angeles, CA 90019` | Single-line address |
| `website` | `http://ritzplumbing.com` | When listed |
| `categories` | `["Plumbers","Heating Contractors"]` | All listed categories |
| `primaryCategory` | `Plumbers` | First category |
| `rating` | `4.5` | Star rating (when present) |
| `reviewCount` | `120` | Number of reviews |
| `yearsInBusiness` | `95` | Years in business |
| `snippet` | `Family-owned since 1929…` | Listing blurb |
| `sponsored` | `false` | `true` = paid/ad placement |
| `profileUrl` | `https://www.yellowpages.com/.../mip/...` | Yellow Pages profile |
| `email` / `hours` / `description` | best-effort | Only when `enrichDetails` is on |
| `scrapedAt` | `2026-06-21T16:00:00.000Z` | ISO 8601 timestamp |

### When to use

- Build **B2B lead lists** by industry + city (plumbers in Los Angeles, dentists in Chicago…).
- Enrich a CRM with phone, address, and website for local businesses.
- Power an **AI agent** that needs structured local-business data — single keyword + location in, JSON out.

**Not** for: yellowpages.com reviews-only export, or non-US Yellow Pages directories.

### Input

| Field | Type | Description |
|---|---|---|
| `searchTerms` | string | Business type or name, e.g. `plumber`, `coffee shop`. |
| `location` | string | City+state or ZIP, e.g. `Los Angeles, CA` or `90210`. Blank = nationwide. |
| `startUrls` | string[] | Optional. yellowpages.com `/search`, category, or `/mip/` business URLs. |
| `maxResults` | integer | Max businesses to return (default 100). |
| `maxPagesPerSearch` | integer | Search pages to paginate (~30/page, default 5). |
| `enrichDetails` | boolean | Visit each profile for email/hours/description (slower; default false). |
| `proxyConfiguration` | object | Residential proxy required (default Apify RESIDENTIAL, US). |

#### Example

```json
{
  "searchTerms": "plumber",
  "location": "Los Angeles, CA",
  "maxResults": 100,
  "maxPagesPerSearch": 5
}
````

```bash
apify call khadinakbar/yellow-pages-us-scraper --input='{"searchTerms":"dentist","location":"Chicago, IL","maxResults":50}'
```

### Pricing — Pay Per Event

| Event | Price |
|---|---|
| Actor start | $0.005 (per run, per GB) |
| Business scraped | **$0.005 / result** |

A 100-business run costs about **$0.50** plus the start fee. Pay-per-usage (compute + proxy) is also available — pick whichever billing fits your job at run time.

### Reliability

- **Firefox-rendered** pages clear yellowpages.com's Cloudflare challenge.
- **Residential proxy** is required (datacenter IPs are firewall-blocked by Yellow Pages). The actor defaults to Apify Residential (US) and includes a secondary residential provider fallback for resilience.
- **Honest results:** if every attempt is blocked, the run fails clearly instead of silently returning an empty dataset. Bad input (no search terms / invalid URLs) ends gracefully with a clear status message rather than a hard error.
- Heavy page assets (images, fonts, media) are skipped to keep proxy bandwidth and cost low.

### MCP / AI agents

Available as `apify--yellow-pages-us-scraper` via the Apify MCP server. Narrow input (keyword + location), flat structured output, and a clear per-result price make it a clean tool call for Claude, GPT, and other agents.

### Notes & limitations

- `email`, `hours`, and `description` come only from detail pages (`enrichDetails: true`) and are best-effort — yellowpages.com detail pages are more heavily protected, so coverage is partial.
- Sponsored/ad listings (`sponsored: true`) include name, phone, categories, and years, but usually no street address.
- yellowpages.com covers **US** businesses only.

### Legal

This actor collects only publicly available business information from yellowpages.com. Use it in compliance with yellowpages.com's Terms of Service and all applicable laws (including data-protection regulations). You are responsible for how you use the scraped data. This tool is provided for legitimate business research and lead generation.

# Actor input Schema

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

Business type or name to search (e.g. "plumber", "pizza", "auto repair"). Combine with "location" for best results.

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

City, state, or ZIP code to narrow the search (e.g. "Los Angeles, CA", "90210"). Leave blank to search nationwide.

## `startUrls` (type: `array`):

Direct yellowpages.com search URLs or business profile URLs (/mip/...). Overrides searchTerms + location when provided.

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

Maximum number of business listings to return. Each result costs $0.005.

## `maxPagesPerSearch` (type: `integer`):

Max search result pages to paginate through (~30 businesses/page). Increase for broader coverage.

## `enrichDetails` (type: `boolean`):

Visit each business profile page to extract email addresses, business hours, and description. Slower but more complete data.

## `proxyConfiguration` (type: `object`):

Proxy settings. yellowpages.com requires residential proxies — Apify RESIDENTIAL group recommended. The actor includes a DataImpulse residential fallback for reliability.

## Actor input object example

```json
{
  "searchTerms": "plumber",
  "location": "Los Angeles, CA",
  "maxResults": 100,
  "maxPagesPerSearch": 5,
  "enrichDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `businessesJson` (type: `string`):

All scraped business rows as JSON.

## `businessesCsv` (type: `string`):

All scraped business rows as CSV — import into a CRM or spreadsheet.

## `datasetUrl` (type: `string`):

Console dataset 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 = {
    "searchTerms": "plumber",
    "location": "Los Angeles, CA",
    "maxResults": 100,
    "maxPagesPerSearch": 5,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/yellow-pages-us-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": "plumber",
    "location": "Los Angeles, CA",
    "maxResults": 100,
    "maxPagesPerSearch": 5,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/yellow-pages-us-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 '{
  "searchTerms": "plumber",
  "location": "Los Angeles, CA",
  "maxResults": 100,
  "maxPagesPerSearch": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call khadinakbar/yellow-pages-us-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Yellow Pages US Business Scraper — Phone, Email & Address",
        "description": "Scrape US businesses from yellowpages.com by keyword+city, category URL, or profile URL. Returns name, phone, address, website, categories, rating, years in business + optional email/hours enrichment. Firefox Cloudflare-bypass, residential proxy. MCP-ready.",
        "version": "0.1",
        "x-build-id": "oSUsIEC0H8dhKBqEU"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/khadinakbar~yellow-pages-us-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-khadinakbar-yellow-pages-us-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/khadinakbar~yellow-pages-us-scraper/runs": {
            "post": {
                "operationId": "runs-sync-khadinakbar-yellow-pages-us-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/khadinakbar~yellow-pages-us-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-khadinakbar-yellow-pages-us-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",
                "properties": {
                    "searchTerms": {
                        "title": "Search terms",
                        "type": "string",
                        "description": "Business type or name to search (e.g. \"plumber\", \"pizza\", \"auto repair\"). Combine with \"location\" for best results."
                    },
                    "location": {
                        "title": "Location",
                        "type": "string",
                        "description": "City, state, or ZIP code to narrow the search (e.g. \"Los Angeles, CA\", \"90210\"). Leave blank to search nationwide."
                    },
                    "startUrls": {
                        "title": "Start URLs (optional)",
                        "type": "array",
                        "description": "Direct yellowpages.com search URLs or business profile URLs (/mip/...). Overrides searchTerms + location when provided.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum number of business listings to return. Each result costs $0.005."
                    },
                    "maxPagesPerSearch": {
                        "title": "Max pages per search",
                        "minimum": 1,
                        "maximum": 40,
                        "type": "integer",
                        "description": "Max search result pages to paginate through (~30 businesses/page). Increase for broader coverage."
                    },
                    "enrichDetails": {
                        "title": "Enrich with detail pages",
                        "type": "boolean",
                        "description": "Visit each business profile page to extract email addresses, business hours, and description. Slower but more complete data.",
                        "default": false
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy settings. yellowpages.com requires residential proxies — Apify RESIDENTIAL group recommended. The actor includes a DataImpulse residential fallback for reliability."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
