# 🔥Advance US YellowPages Business Scraper (`ramman/yellow-pages-business-scraper`) Actor

🔥This actor scrapes Yellow Pages business directories and extracts verified contact information, ready to use for sales, marketing, or B2B lead generation.

- **URL**: https://apify.com/ramman/yellow-pages-business-scraper.md
- **Developed by:** [ramman](https://apify.com/ramman) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 16 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$150.00 / 1,000 yellow pages business scraper uses

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/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 Business Scraper - Lead Generation Tool

Transform your lead generation process with this powerful Yellow Pages scraper. Built specifically for Apify, this actor automatically extracts real business contact information from Yellow Pages directories, giving you access to thousands of potential leads in minutes.

### What This Tool Does

This Yellow Pages scraper is your secret weapon for building comprehensive business databases. Instead of manually searching through hundreds of Yellow Pages listings, this tool automatically:

- **Discovers businesses** by searching Yellow Pages with your keywords and location
- **Extracts contact details** including business names, phone numbers, addresses, and websites
- **Handles pagination** automatically, so you get results from multiple pages
- **Delivers clean data** in structured JSON format ready for your CRM or marketing tools

### Why Yellow Pages Scraping?

Yellow Pages remains one of the most comprehensive business directories available. While many businesses have moved online, Yellow Pages still contains:

- **Local business listings** that may not appear in Google searches
- **Verified contact information** including physical addresses and phone numbers
- **Business categories** that help you target specific industries
- **Geographic data** perfect for location-based marketing campaigns



#### Built for Yellow Pages
Unlike generic scrapers, this tool is specifically optimized for Yellow Pages:
- **Custom selectors** that understand Yellow Pages structure
- **Pagination handling** that follows "next page" links automatically
- **URL generation** that creates proper search queries from your keywords
- **Anti-blocking measures** to ensure reliable data collection


### How to Use This Tool

Configure Your Search
Enter your search parameters:
- **Search Keyword**: What type of business you want (e.g., "restaurants", "plumbers", "lawyers")
- **Location**: Where to search (e.g., "New York NY", "Los Angeles CA", "10001")
- **Max Pages**: How many pages to scrape (default: 5, max: 200)
- **Extract Websites**: Whether to get business website URLs (Yes/No)
- **Include Source URL**: Whether to include Yellow Pages links (Yes/No)


### Input Parameters Explained

| Parameter | Description | Required | Default |
|-----------|-------------|----------|---------|
| `searchKeyword` | What type of business you're looking for (e.g., "plumbers", "lawyers", "restaurants") | Yes | "restaurants" |
| `location` | Where to search (city, state, or ZIP code) | Yes | "New York NY" |
| `maxPagesToScrape` | How many pages to process (more pages = more businesses) | No | 5 |
| `extractWebsites` | Whether to extract business website URLs | No | true |
| `includeSourceUrl` | Include original Yellow Pages links in output | No | false |

### What You'll Get

Each business listing includes comprehensive information:

```json
{
  "businessName": "Joe's Pizza & Restaurant",
  "phone": "+1 (555) 123-4567",
  "address": "123 Main Street, New York, NY 10001",
  "website": "https://joespizza.com",
  "scrapedAt": "2024-01-15T10:30:00.000Z"
}
````

### Real-World Use Cases

#### Sales Teams

Build prospect lists by scraping businesses in your target market. Get phone numbers and addresses for cold calling and direct mail campaigns.

#### Marketing Agencies

Create comprehensive business databases for email marketing, social media campaigns, and market research.

#### Business Development

Identify potential partners, competitors, and market opportunities in specific geographic areas.

#### Market Research

Analyze business density, industry distribution, and market saturation in different locations.

### How It Works

The tool works in simple steps:

1. **Search**: Creates Yellow Pages search URLs from your keywords and location
2. **Extract**: Gets business data from each page
3. **Follow**: Automatically finds and follows next page links
4. **Format**: Cleans and formats the information
5. **Deliver**: Saves structured data ready for your use

**Ready to transform your lead generation?** This Yellow Pages scraper gives you access to thousands of business contacts in minutes, not hours. Deploy it today and start building your prospect database!

*Built specifically for Yellow Pages US business directory scraping with lead generation in mind.* 🎯📊

# Actor input Schema

## `searchKeyword` (type: `string`):

What type of business to search for (e.g., restaurants, plumbers, lawyers)

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

City, State or ZIP code to search in (e.g., New York NY, 10001)

## `maxPagesToScrape` (type: `integer`):

Maximum number of Yellow Pages to scrape (more pages = more businesses)

## `extractWebsites` (type: `boolean`):

Try to extract website URLs from business listings

## `includeSourceUrl` (type: `boolean`):

Include the original Yellow Pages URL in the output

## Actor input object example

```json
{
  "searchKeyword": "restaurants",
  "location": "New York NY",
  "maxPagesToScrape": 5,
  "extractWebsites": true,
  "includeSourceUrl": false
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("ramman/yellow-pages-business-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("ramman/yellow-pages-business-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 '{}' |
apify call ramman/yellow-pages-business-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "🔥Advance US YellowPages Business Scraper",
        "description": "🔥This actor scrapes Yellow Pages business directories and extracts verified contact information, ready to use for sales, marketing, or B2B lead generation.",
        "version": "0.0",
        "x-build-id": "RFr4J0l27y5UeQdA2"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ramman~yellow-pages-business-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ramman-yellow-pages-business-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/ramman~yellow-pages-business-scraper/runs": {
            "post": {
                "operationId": "runs-sync-ramman-yellow-pages-business-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/ramman~yellow-pages-business-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-ramman-yellow-pages-business-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": [
                    "searchKeyword",
                    "location"
                ],
                "properties": {
                    "searchKeyword": {
                        "title": "Search Keyword",
                        "type": "string",
                        "description": "What type of business to search for (e.g., restaurants, plumbers, lawyers)",
                        "default": "restaurants"
                    },
                    "location": {
                        "title": "Location",
                        "type": "string",
                        "description": "City, State or ZIP code to search in (e.g., New York NY, 10001)",
                        "default": "New York NY"
                    },
                    "maxPagesToScrape": {
                        "title": "Max Pages to Scrape",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Maximum number of Yellow Pages to scrape (more pages = more businesses)",
                        "default": 5
                    },
                    "extractWebsites": {
                        "title": "Extract Website URLs",
                        "type": "boolean",
                        "description": "Try to extract website URLs from business listings",
                        "default": true
                    },
                    "includeSourceUrl": {
                        "title": "Include Source URL",
                        "type": "boolean",
                        "description": "Include the original Yellow Pages URL in the output",
                        "default": false
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
