# Yellow Pages US Scraper — with website URLs, per result (`diopside/yellowpages-us`) Actor

Drop-in compatible with trudax/yellow-pages-us-scraper — cheaper and it finishes. Business name, phone, split address, categories, exact rating and the business's own website URL from yellowpages.com search, category and profile pages.

- **URL**: https://apify.com/diopside/yellowpages-us.md
- **Developed by:** [DIOPSIDE AI](https://apify.com/diopside) (community)
- **Categories:** Business, Lead generation, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 85.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 business listings

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Yellow Pages US Scraper — with website URLs, per result

**Drop-in compatible with [`trudax/yellow-pages-us-scraper`](https://apify.com/trudax/yellow-pages-us-scraper) — cheaper, reliable, and it returns the business's website.** Same input fields, same output field names, so switching is a change of actor id and nothing else.

Give it a trade and a city — `plumber` / `Austin, TX` — or paste Yellow Pages URLs, and it returns every business listing with phone, address, categories, rating and **the business's own website URL**.

### Why this one

The incumbent has 5,025 users, and it failed **122 of its last 265 public runs (46%)**. A lead list you cannot rebuild on a schedule is not a lead list. Three things are different here:

- **It finishes.** yellowpages.com is behind Cloudflare, which rejects requests on two separate grounds: the TLS fingerprint (plain `curl`/`httpx` are blocked on the very first request, including on `/robots.txt`) and a **per-IP request budget** — about 8–10 requests in quick succession before the same URL starts answering `403`/`429` in milliseconds. This actor uses a real Chrome TLS fingerprint, paces itself, and **retires each exit IP every 6 requests, before the budget runs out**, rather than discovering it is burned halfway through a listing walk. A block that does happen rotates to a new IP and retries, up to 8 times by default. After two blocks in a row it also tries the run's own egress IP once, because the residential pool is partly flagged by the site on any given day.
- **`website`** — the field lead-gen buyers actually pay for, and the one the incumbent's output does not contain. 93% of organic listings in a measured Austin run published one.
- **It cannot double-charge you for the same page.** Pagination follows the site's own "Next" link, and each page's footer (`Showing 31-60 of 491`) is checked against the page that was requested. If an edge cache ever hands back page 1 in place of page 3, the run stops that target instead of pushing — and billing you for — 30 duplicates.

It also adds a split address (`streetAddress` / `city` / `state` / `zipCode`), `openingHours`, the **exact** rating (`2.87`, not "three stars"), the TripAdvisor rating Yellow Pages carries alongside its own, years in business, BBB grade and amenities.

#### Switching from `trudax/yellow-pages-us-scraper`

Change the actor id. Your existing input JSON (`search`, `location`, `startUrls`, `maxItems`) works unchanged, and every field your code reads today (`isAd`, `url`, `name`, `address`, `phone`, `rating`, `ratingCount`, `infoSnippet`, `image`, `categories`) is present with the same name and shape. The new columns are added after them.

Two deliberate differences, both improvements:

| Field | There | Here |
| --- | --- | --- |
| `rating` | the rounded star value | the exact published aggregate when there is one (the rounded value is still in `ratingStars`) |
| `image` | Yellow Pages' grey placeholder graphic when the business has no photo | `null`, so "has a photo" is a question you can actually ask |

### Input

| Field | Type | Description | Default |
| --- | --- | --- | --- |
| `search` | string | Trade, category or business name — `Dentist`, `plumber`, `pizza`. | `Dentist` |
| `location` | string | City, `City, ST` or US ZIP — `Austin, TX`, `90210`. | `Los Angeles` |
| `startUrls` | array | Yellow Pages URLs instead of, or as well as, a search. Accepts search results and SEO city-category pages (`/austin-tx/plumbers`); filters in the URL are kept. Single-business `/mip/` profile pages are not listing pages and are skipped with a warning. | `[]` |
| `maxItems` | integer | Cap on results for the whole run, and therefore on its cost. `0` = every result. | `100` |
| `maxPages` | integer | Stop each start URL after this many pages (30 results per page). `0` = all. | `0` |
| `includeAds` | boolean | Yellow Pages mixes advertiser rows into the organic list. Kept by default and flagged `isAd: true`. | `true` |
| `searchTerms` / `locations` | array | Bulk form: every term is cross-joined with every location — 3 trades × 4 cities = 12 searches in one run. | `[]` |
| `proxyConfiguration` | object | Apify Proxy, US residential — see the table below for why not datacenter. | `{"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "US"}` |
| `maxRequestsPerMinute` | integer | Pacing ceiling. Raising it makes blocks more likely, not runs faster. | `30` |
| `maxConcurrency` | integer | Pages fetched at once. | `2` |
| `maxRequestRetries` | integer | Retries on a fresh exit IP before a start URL is reported failed. After two blocks in a row, one retry goes out on the run's own egress IP. | `8` |

Either `search`/`location` or `startUrls` has to be set.

### Output

One record per business listing.

```json
{
  "isAd": false,
  "url": "https://www.yellowpages.com/austin-tx/mip/custom-plumbing-services-23191612",
  "name": "Custom Plumbing Services",
  "address": "9511 Brown Ln, Austin, TX 78754",
  "phone": "(512) 837-0437",
  "rating": 4.5,
  "ratingCount": 11,
  "infoSnippet": "From Business: At Custom Plumbing Services we provide bathroom remodeling, tankless water heater installation, and other water heater services to all of Austin, TX.",
  "image": "https://i3.ypcdn.com/blob/be5797c486551bc88b5261a8418a3c19272b52cc_130x130_crop.jpg",
  "categories": ["Plumbers", "Plumbing-Drain & Sewer Cleaning", "Sewer Cleaners & Repairers"],
  "website": "https://www.cpsaustin.com",
  "streetAddress": "9511 Brown Ln",
  "city": "Austin",
  "state": "TX",
  "zipCode": "78754",
  "ratingStars": 4.5,
  "tripAdvisorRating": null,
  "tripAdvisorReviewCount": null,
  "openingHours": ["Mo-Fr 09:00-17:00"],
  "openStatus": "closed now",
  "yearsInBusiness": 57,
  "yearsWithYellowPages": null,
  "bbbRating": "A+",
  "amenities": null,
  "ypId": "23191612",
  "listingId": null,
  "position": 2,
  "searchPage": 2,
  "searchUrl": "https://www.yellowpages.com/search?search_terms=plumber&geo_location_terms=Austin%2C+TX",
  "searchTerm": "plumber",
  "location": "Austin, TX",
  "scrapedAt": "2026-09-20T09:40:05+00:00"
}
```

Fields a business does not publish are `null`, never missing and never guessed. Measured coverage on the organic rows of a `plumber / Austin, TX` run on the Apify platform: name, categories, `url` and phone 100%; `website` 93%; address, `city`, `state`, `zipCode` 93%; `openingHours` 80%; rating 33% (only businesses with Yellow Pages reviews have one).

**You are never charged for a row you cannot use.** Yellow Pages sometimes serves its advertiser block as thin cards — a name, a link, and no phone, address or website, often for national advertisers in other cities. Those are ad impressions rather than leads, so they are dropped before they are pushed, and the run's status message reports how many. Advertiser rows that *do* carry contact details come through normally, flagged `isAd: true`.

Three dataset views are provided: **Overview**, **Lead list** (name / phone / website / split address) and **Ratings**.

### Which proxy, and why

Three runs per tier over the same two-page search, on the Apify platform:

| Tier | Runs that returned a full page of results | Blocks |
| --- | --- | --- |
| Apify **RESIDENTIAL**/US (the default) | **3/3** | 0 |
| No proxy | 3/3 | 0 |
| Apify **datacenter**/US | **1/3** | the two failures were blocked on all 4 attempts |

The shared datacenter pool is *worse than no proxy at all* on this site: its IPs arrive already spent, because every other Apify user pointed at Yellow Pages draws from the same small pool. No proxy passes too — but it is one IP against a per-IP budget, so it holds for a short run and stalls part-way through a long one. Residential is the only tier that both passes and still has fresh IPs on page 30, and it is cheap here: **0.094 MB of billed proxy traffic per 30 results.**

### Sizes and pacing

30 results per page, ~250 KB per page. A page is fetched every two seconds by default, and the exit IP is rotated every 6 pages, so a 300-result run is about 10 pages and under a minute of fetching. Result counts per search are whatever Yellow Pages reports — `plumber / Austin, TX` is 491.

### Use cases

- **Lead lists for local services** — every plumber, dentist or roofer in a metro, with phone *and* website, ready for outreach or enrichment.
- **Franchise and competitor mapping** — who is listed under a category in each city, in what rank order, and which of them are paying for placement (`isAd`).
- **Local SEO audits** — a business's categories, rating, review count, years listed and whether its Yellow Pages listing carries a website at all.
- **Directory freshness checks** — re-run the same search on a schedule and diff on `ypId`.

### Notes

Public business directory listings only — trading name, business address, business phone, website, categories and published ratings. No personal data, no logins, no email guessing.

# Actor input Schema

## `search` (type: `string`):

Query to search on Yellow Pages — a trade, category or business name, e.g. `Dentist`, `plumber`, `pizza`. Same field name as trudax/yellow-pages-us-scraper.

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

Location to search entries in: a city, `City, ST` or a US ZIP code — e.g. `Los Angeles`, `Austin, TX`, `90210`.

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

Yellow Pages listing URLs to crawl instead of (or as well as) a search. Accepts search results (`https://www.yellowpages.com/search?search_terms=plumber&geo_location_terms=Austin%2C+TX`) and SEO city-category pages (`https://www.yellowpages.com/austin-tx/plumbers`) — filters in the URL are kept. Single-business `/mip/` profile pages are not listing pages and are skipped with a warning.

## `maxItems` (type: `integer`):

Maximum number of outputted results across the whole run. Set to 0 for every result of every start URL. You are charged per result, so this is also the run's cost ceiling.

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

Stop each search after this many result pages (30 results per page). 0 walks every page the site offers.

## `includeAds` (type: `boolean`):

Yellow Pages mixes advertiser listings into the organic results. They are included by default and flagged with `isAd: true`; turn this off for organic listings only.

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

Several search terms at once. Combined with Locations below. Ignored if empty.

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

Several locations at once — cities, `City, ST` or ZIP codes. Cross-joined with Search terms.

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

Apify Proxy, US residential. Measured on the platform, 3 runs per tier: residential 3/3 with zero blocks, no proxy 3/3 on a short run, and the shared datacenter pool only 1/3 — its IPs arrive already spent on this site, so datacenter is worse than no proxy here. Residential billed 0.094 MB for 30 results. Leave this at the default.

## `maxRequestsPerMinute` (type: `integer`):

Pacing ceiling for the whole run. The default is deliberately unhurried; raising it makes blocks and rotations more likely, not the run faster.

## `maxConcurrency` (type: `integer`):

Maximum number of pages fetched at the same time.

## `maxRequestRetries` (type: `integer`):

How many times a blocked page is retried on a fresh exit IP before the start URL is reported as failed. After two blocks in a row the actor also tries the run's own egress IP once.

## Actor input object example

```json
{
  "search": "Dentist",
  "location": "Los Angeles",
  "startUrls": [],
  "maxItems": 100,
  "maxPages": 0,
  "includeAds": true,
  "searchTerms": [],
  "locations": [],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  },
  "maxRequestsPerMinute": 30,
  "maxConcurrency": 2,
  "maxRequestRetries": 8
}
```

# Actor output Schema

## `businesses` (type: `string`):

All business records. Append ?format=csv for CSV.

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

The default dataset.

# 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 = {
    "search": "Dentist",
    "location": "Los Angeles",
    "startUrls": [],
    "maxItems": 100,
    "searchTerms": [],
    "locations": [],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("diopside/yellowpages-us").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 = {
    "search": "Dentist",
    "location": "Los Angeles",
    "startUrls": [],
    "maxItems": 100,
    "searchTerms": [],
    "locations": [],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("diopside/yellowpages-us").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 '{
  "search": "Dentist",
  "location": "Los Angeles",
  "startUrls": [],
  "maxItems": 100,
  "searchTerms": [],
  "locations": [],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call diopside/yellowpages-us --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,diopside/yellowpages-us"
        }
    }
}
```

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/O66TDF3Oz7W5jelPJ/builds/vfJycTcXuznGg9lWp/openapi.json
