# Deprecated YellowPages Scraper - Cloudflare Unstable (`pink_comic/yellowpages-scraper`) Actor

Deprecated best-effort YellowPages scraper. YellowPages now frequently hard-blocks automated access with Cloudflare; scheduled health checks are disabled and reliability is not guaranteed.

- **URL**: https://apify.com/pink\_comic/yellowpages-scraper.md
- **Developed by:** [Ava Torres](https://apify.com/pink_comic) (community)
- **Categories:** Lead generation, AI, Agents
- **Stats:** 38 total users, 1 monthly users, 64.9% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Deprecated YellowPages Scraper - Cloudflare Unstable

**Deprecated / best-effort.** YellowPages.com now frequently hard-blocks automated access with Cloudflare. Scheduled health checks are disabled, Slack failure alerts are suppressed, and reliability is not guaranteed. Use this actor only for legacy/manual runs where intermittent failure is acceptable.

Extract business contact data from YellowPages.com when the target allows access. Results can include names, phone numbers, email addresses, websites, physical addresses, ratings, reviews, hours, and more.

### What you get

Each result includes:

| Field | Example |
|-------|---------|
| Business name | "Joe's Plumbing LLC" |
| Phone | "(512) 555-0142" |
| Email | "joe@joesplumbing.com" |
| Website | "https://joesplumbing.com/" |
| Address | "1234 Main St, Austin, TX 78701" |
| Rating | 4.5 (out of 5) |
| Review count | 47 |
| Categories | \["Plumbers", "Water Heaters"] |
| Years in business | 12 |
| Hours | Mon-Fri 8am-6pm |
| Amenities | \["Licensed", "Insured", "Free Estimates"] |

### Who Uses This

- **Sales teams and SDRs** -- Build targeted prospect lists of plumbers, dentists, lawyers, or any industry in any US city. Get direct emails and phone numbers ready for outreach.
- **Marketing agencies** -- Pull local business data for client reporting, competitive audits, and territory planning. Ratings and review counts show market positioning at a glance.
- **Insurance agents** -- Find businesses by industry and location for general liability, workers' comp, and commercial property quotes. Years-in-business and employee signals help qualify leads.
- **SaaS companies** -- Build industry-specific lead lists for vertical software. Target restaurants, HVAC contractors, auto shops, or any niche with verified contact info.
- **Data enrichment teams** -- Supplement your CRM with business details, emails, websites, hours, and categories from Yellow Pages.

### How to use

1. Enter one or more **search terms** (e.g., "plumbers", "restaurants", "dentists")
2. Enter one or more **locations** in city-state format (e.g., "austin-tx", "new-york-ny")
3. Click **Start** -- the default quick test returns 5 businesses without opening detail pages

#### Reliable quick-test input

```json
{
  "searchTerms": ["plumbers"],
  "locations": ["boise-id"],
  "maxPages": 1,
  "maxResults": 5,
  "includeDetails": false
}
```

Turn **Include Detail Pages** on after the quick test if you need emails, payment methods, and richer profile fields.

#### Options

- **Max Pages Per Search** -- Each page returns ~30 results. Set to 1-3 for quick runs, or 0 for all available pages.
- **Include Detail Pages** -- Enables email extraction and additional fields (payment methods, neighborhoods). Uses more proxy credits but provides richer data.
- **Proxy Configuration** -- US residential proxies are required (Cloudflare protection). The default Apify RESIDENTIAL proxy group works out of the box.

### Cost

**Free to try** -- every Apify account includes $5/month in free platform credits, enough for a full test run at no cost.

Roughly **$0.005 per result** using Apify residential proxies. A typical run of 1 page (30 results) costs about $0.25 including the $0.10 platform fee. Detail pages cost slightly more due to additional proxy usage.

| Run size | Results | Approximate cost |
|----------|---------|-----------------|
| 1 page, no details | ~30 | ~$0.25 |
| 3 pages, no details | ~90 | ~$0.55 |
| 1 page, with details | ~30 | ~$0.40 |
| All pages (large city) | 500+ | ~$3-6 |

### Output formats

Export results as **JSON**, **CSV**, **Excel**, or push directly to **Google Sheets**, **Slack**, **email**, or any webhook via Apify integrations.

### Reliability

YellowPages.com uses Cloudflare, and target-side hard blocks are now frequent even with US residential proxies. This actor is deprecated/best-effort:

- Default input uses a low-pressure US city, 5 results, no detail pages, and Apify RESIDENTIAL US proxy settings
- Built-in recovery still rotates residential IPs and warms up the YellowPages homepage before retrying blocked search URLs
- Hard Cloudflare blocks can still fail the whole run; do not rely on this actor for production lead generation
- Detail-page extraction is slower and more Cloudflare-sensitive than search-result extraction

### Use with AI Assistants (MCP)

This deprecated actor can still be called as an MCP tool for legacy/manual use. Expect intermittent failures from Cloudflare hard blocks.

**Setup:** Add this to your MCP client configuration:

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

For reliable production workflows, use AutoScrape's other official-source business data tools instead of this deprecated YellowPages actor.

### FAQ

**Does it extract emails?**
Yes, when "Include Detail Pages" is enabled. Not every business lists an email, but extraction rate is typically 15-25% of listings.

**How many results can I get?**
Yellow Pages returns up to 30 results per page and up to 100 pages per search. For a broad category in a large metro, expect 500-2,000+ results.

**Does it work for all US cities?**
Yes. Any location listed on YellowPages.com is supported. Use the city-state format (e.g., "chicago-il", "miami-fl").

**How fast is it?**
A single-page search completes in 30-60 seconds. Larger runs with detail pages take 3-10 minutes depending on volume.

# Actor input Schema

## `searchTerms` (type: `array`):

Business categories or keywords to search for (e.g. 'restaurants', 'plumbers', 'dentists')

## `locations` (type: `array`):

Locations to search in. Format: city-state (e.g. 'austin-tx', 'new-york-ny', 'los-angeles-ca')

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

Pages to scrape per search (30 results/page). Set 1-3 for fast, cheap runs. Set 0 for all pages (up to 100). Each page costs ~$0.005 in proxy credits.

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

Maximum number of results to return. Useful for controlling costs. Set 0 or leave empty for no limit.

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

Fetch individual business pages for emails, payment methods, and neighborhoods. Slower and uses more proxy credits, but extracts data not available from search results alone. Leave off for the most reliable first run.

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

Apify proxy configuration. Residential proxies (RESIDENTIAL group) with US country code strongly recommended.

## `proxyUrls` (type: `array`):

Alternative to Apify proxy: your own proxy URLs (e.g. 'http://user:pass@proxy:port'). US residential proxies recommended.

## Actor input object example

```json
{
  "searchTerms": [
    "plumbers"
  ],
  "locations": [
    "boise-id"
  ],
  "maxPages": 1,
  "maxResults": 5,
  "includeDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Business listings including name, phone, address, email, ratings, hours, and categories.

# 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": [
        "plumbers"
    ],
    "locations": [
        "boise-id"
    ],
    "maxResults": 5,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("pink_comic/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": ["plumbers"],
    "locations": ["boise-id"],
    "maxResults": 5,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("pink_comic/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": [
    "plumbers"
  ],
  "locations": [
    "boise-id"
  ],
  "maxResults": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call pink_comic/yellowpages-scraper --silent --output-dataset

```

## MCP server setup

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