# Yellow Pages US Scraper (`memo23/yellow-pages-us-scraper`) Actor

Scrape Yellow Pages US listings: business name, phone, address, website, hours, categories, rating, and emails when the listing or its site has one. Keyword + city or yellowpages.com URLs in. Pure HTTP, no browser. JSON or CSV out. $2.50/1k listings; contact emails billed only when found.

- **URL**: https://apify.com/memo23/yellow-pages-us-scraper.md
- **Developed by:** [Muhamed Didovic](https://apify.com/memo23) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 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?

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

## Yellow Pages US Scraper

<p align="center"><img src="https://raw.githubusercontent.com/muhamed-didovic/muhamed-didovic.github.io/main/assets/logo-yellow-pages-us.png" alt="Yellow Pages US Scraper logo" width="160" /></p>

Turn a US Yellow Pages search into structured business leads: name, phone, address, website, hours, categories, rating, and email when the listing (or its own site) has one.

Keyword + city, or a yellowpages.com URL. JSON or CSV out.

### Why Use This Scraper?

- Phone and address on almost every US listing
- Native emails from the Yellow Pages profile when Thryv has one
- Optional website scrape for inboxes that are not on the listing
- Hours, categories, rating, optional full review text, year established, claimed flag
- Keyword + city, term × city lists, or paste a search / MIP URL
- HTTP only — no browser, no Cloudflare grind

### Overview

Built for lead-gen teams, agencies, and researchers who need US local-business rows from yellowpages.com.

Every start type becomes **one dataset row per business**. A city search, a category URL, and a `/mip/` profile all emit the same listing shape. Email is sparse on Yellow Pages itself; phone is not.

### Supported Inputs

#### Search terms and locations

| Field | Example |
| --- | --- |
| `searchTerms` | `["pizza"]`, `["plumber", "dentist"]` |
| `locations` | `["Los Angeles, CA"]`, `["34.05,-118.24"]` (ZIP alone does not geocode) |

Every term is searched in every location. `["pizza","plumber"]` × `["Los Angeles, CA","Houston, TX"]` is four searches. API callers can also send `what` + `where` or `queries: [{ what, where }]`; all three forms are merged and de-duplicated.

#### URL types

| URL type | Pattern | Example |
| --- | --- | --- |
| Category search | `/{city-st}/{term}` | `https://www.yellowpages.com/los-angeles-ca/pizza` |
| Listing (MIP) | `/{city-st}/mip/{slug}-{id}` | `https://www.yellowpages.com/los-angeles-ca/mip/pitfire-artisan-pizza-22248710` |

#### Copy-pasteable startUrls

```json
{
  "startUrls": [
    { "url": "https://www.yellowpages.com/los-angeles-ca/pizza" },
    { "url": "https://www.yellowpages.com/los-angeles-ca/mip/pitfire-artisan-pizza-22248710" }
  ]
}
```

**Unsupported:** yell.com, yellowpages.ca, pagesjaunes.fr, and other country directories. This actor is US yellowpages.com only.

### Use Cases

| Audience | What they take from a run |
| --- | --- |
| Lead gen | Phone, address, website, email when present |
| Agencies | Local category lists by city |
| Sales ops | Deduped listing ids + claimed / years-in-business |
| Researchers | Hours, ratings, category mix |

### How It Works

1. Geocode `where` (or read lat/lon).
2. Call the mobile search JSON at that pin, then walk neighboring pins (each pin returns a short page).
3. Deduplicate by listing id.
4. Load the listing detail for extra phones and native emails.
5. If `includeReviews` is on, keep review text from the profile `ratings` list.
6. If `enrichEmails` is on and the profile has no inbox, scrape the business website.

<p align="center"><img src="https://raw.githubusercontent.com/muhamed-didovic/muhamed-didovic.github.io/main/assets/how-it-works-yellow-pages-us.png" alt="How the Yellow Pages US scraper turns a query into listing rows" width="800" /></p>

### Input Configuration

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `searchTerms` | array | one of the start types | Keywords, searched in every location |
| `locations` | array | with `searchTerms` | US city + state, or `lat,lon` |
| `startUrls` | array | one of the start types | yellowpages.com search or MIP URLs |
| `what` + `where` | string | API only | Single pair, merged with the lists above |
| `queries` | array | API only | `[{ what, where }]` pairs, merged with the lists above |
| `sortBy` | string | no | `default`, `rating`, `name`, or `distance`. Sorts each map-pin page only — the API has no global sort. |
| `includeReviews` | boolean | no | Default false. Adds `reviews[]` (author, rating, title, text, date). |
| `maxReviews` | integer | no | Default 25. Cap per listing when reviews are on. |
| `maxItems` | integer | no | Default 50. Free users capped at 50. |
| `scrapeDetails` | boolean | no | Default true. Needed for native emails and extra phones. Forced on when reviews are on. |
| `enrichEmails` | boolean | no | Default false. Billed only when an address is found. |
| `maxConcurrency` | integer | no | Default 8. |
| `proxy` | object | no | Optional. Default is no Apify proxy. |

#### Example input

```json
{
  "searchTerms": ["pizza"],
  "locations": ["Los Angeles, CA"],
  "maxItems": 50,
  "scrapeDetails": true,
  "enrichEmails": false
}
```

### Output Overview

One flat row per business. Contact fields sit at the top level (`phone`, `email`, `website`). Nested pieces are `hours` and, when requested, `reviews`.

### Output Samples

Search: pizza in Los Angeles, CA.

```json
{
  "listingId": "22248710",
  "name": "Pitfire Artisan Pizza",
  "phone": "2138081200",
  "phones": ["2138081200", "2138081201"],
  "email": null,
  "emails": [],
  "website": "http://www.pitfirepizza.com",
  "yellowPagesUrl": "http://www.yellowpages.com/los-angeles-ca/mip/pitfire-artisan-pizza-22248710",
  "address": "108 W 2nd St Apt 208",
  "city": "Los Angeles",
  "state": "CA",
  "zip": "90012",
  "latitude": 34.05107,
  "longitude": -118.24486,
  "categories": ["Caterers", "Pizza", "Restaurants"],
  "rating": 5,
  "reviewCount": 4,
  "yearEstablished": null,
  "isClaimed": null,
  "paymentText": null,
  "reviews": [],
  "contactEmail": ""
}
```

A listing that publishes an inbox on the profile (same run):

```json
{
  "listingId": "495657088",
  "name": "Olio Pizzeria",
  "phone": "2136800010",
  "email": "info@oliogcm.com",
  "website": "http://www.pizzeriaolio.com/downtown.php"
}
```

With `includeReviews: true` the same listing also carries review bodies from the profile:

```json
{
  "listingId": "22248710",
  "reviewCount": 4,
  "reviews": [
    {
      "id": "a1",
      "author": "Sam",
      "rating": 5,
      "title": "Downtown",
      "text": "Great crust",
      "date": "2020-01-01"
    }
  ]
}
```

### Key Output Fields

**Identity:** `listingId`, `name`, `yellowPagesUrl`, `isClaimed`, `yearEstablished`

**Contact:** `phone`, `phones`, `email`, `emails`, `contactEmail`, `website`

**Place:** `address`, `city`, `state`, `zip`, `latitude`, `longitude`

**Listing:** `categories`, `rating`, `reviewCount`, `reviews`, `hours`, `paymentText`

`email` is the native Yellow Pages address. `contactEmail` is that same address, or the website-scrape result when `enrichEmails` is on.

### Pricing

| Event | When | Rate |
| --- | --- | --- |
| Actor start | Once per run, per GB of memory | $0.005 |
| Listing | Each unique business in the dataset | $0.0025 ($2.50 / 1k) |
| Contact phone | Row has a phone | $0.002 |
| Contact email found | Only when an address is returned | $0.05 |

Missed emails are free. Phone is billed only when the listing has a number.

### What makes this richer than the competition

| Capability | Typical Store actors | This actor |
| --- | --- | --- |
| Transport | HTML / Playwright | Mobile JSON over HTTP |
| Email | Website crawl, or none | Native profile emails + optional site scrape |
| Reviews | Count only, or a huge HTML dump | Profile review text when `includeReviews` is on |
| City coverage | First SERP page, or a hard 6k cap | Geo-tiles around the city pin |
| Hours / claimed / year / payments | Often missing | On the detail row |

### FAQ

**Will every row have an email?** No. Yellow Pages often lists a phone and no inbox. A mixed sample was about 30% native emails on the detail call. Turn on `enrichEmails` to look on the company site.

**Why so few results for a huge city?** Each map pin returns a short page. The actor walks neighboring pins and de-duplicates. Raise `maxItems` to keep walking.

**Do I need a proxy?** Usually not.

**Does this scrape yell.com or Yellow Pages Canada?** No.

**Are reviews included?** Rating and count always. Full text only when `includeReviews` is true. The profile usually carries a handful of reviews (Pitfire had 3 of 4), not a separate infinite review feed.

### Support

- Issues: [Actor Issues](https://console.apify.com/actors/hE1hlaoo5c9JbaJIz/issues)
- Author site: <https://muhamed-didovic.github.io/>
- Email: <muhamed.didovic@gmail.com>

### Additional Services

Custom fields, bulk city lists, or a private API wrapper: <muhamed.didovic@gmail.com>

### Explore More Scrapers

French directory cousin: [PagesJaunes Scraper](https://apify.com/memo23/pagesjaunes-scraper-cheerio). More actors on [memo23](https://apify.com/memo23) and [didovic](https://apify.com/didovic).

### 🤖 For AI Agents & LLM Apps

Compact reference for AI agents calling this actor via the [Apify MCP server](https://mcp.apify.com) or the Apify API (actor: `memo23/yellow-pages-us-scraper`).

**Purpose:** Extract US yellowpages.com business listings (phone, address, website, hours, native or scraped email).

**Minimal input:**

```json
{
  "searchTerms": ["pizza"],
  "locations": ["Los Angeles, CA"],
  "maxItems": 10,
  "scrapeDetails": true,
  "enrichEmails": false
}
```

**Output:** one dataset row per business — `listingId`, `name`, `phone`, `phones`, `email`, `emails`, `contactEmail`, `website`, `yellowPagesUrl`, `address`, `city`, `state`, `zip`, `latitude`, `longitude`, `categories`, `rating`, `reviewCount`, `reviews`, `hours`, `yearEstablished`, `isClaimed`, `paymentText`.

**Behaviors an agent should know:**

- Always set `maxItems`. Free users are capped at 50.
- Provide `searchTerms` + `locations` and/or `startUrls`. `what` + `where` and `queries` are also accepted. Empty input fails.
- `scrapeDetails` (default true) is required for native emails.
- `includeReviews` adds `reviews[]` from the listing profile and forces a detail fetch.
- `sortBy` reorders each map-pin page (`rating` / `name` / `distance`). It is not a site-wide SERP sort.
- `enrichEmails` costs $0.05 only when an address is returned.
- Each listing is $0.0025. A phone on the row is $0.002. An email is $0.05. Start is $0.005 per GB.
- US yellowpages.com only. Email is often null.

### ⚠️ Disclaimer

This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Thryv, Inc. or Yellow Pages. All trademarks mentioned are the property of their respective owners.

The scraper accesses only publicly available Yellow Pages listing data — no authenticated endpoints, paid Yellow Pages features, or content behind a login wall. Users are responsible for ensuring their use complies with yellowpages.com Terms of Service, applicable data-protection law (GDPR, CCPA, etc.), CAN-SPAM / TCPA if they send outreach, and any contractual obligations of their own organization.

### SEO Keywords

yellow pages scraper, yellow pages US scraper, yellowpages.com scraper, scrape yellow pages, Yellow Pages API, Apify yellow pages, US business listings scraper, local leads scraper, phone number scraper, email enrichment scraper, lead generation data, hours of operation scraper, US directory scraper, local business intelligence

# Actor input Schema

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

What you would type into the Yellow Pages search box, e.g. <b>pizza</b>, <b>plumber</b>, <b>dentist</b>. One row per term. Every term is searched in every location below.

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

US city and state, e.g. <b>Los Angeles, CA</b>. One row per city. Coordinates as <b>lat,lon</b> also work. ZIP codes alone do not.

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

Stop after this many unique businesses across the whole run. Free plan is capped at 50.

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

Examples: <code>https://www.yellowpages.com/los-angeles-ca/pizza</code> or a <code>/mip/</code> profile link.

## `enrichEmails` (type: `boolean`):

When Yellow Pages shows no email, open the business website and look for one. <b>$0.05 per email found, misses are free.</b>

## `scrapeDetails` (type: `boolean`):

Loads the profile page for extra phones, hours, year established, and the native Yellow Pages email. Leave on unless you only need names and one phone.

## `includeReviews` (type: `boolean`):

Adds a <code>reviews</code> list to each row with author, stars, title, text, and date. Rating and review count are always included.

## `maxReviews` (type: `integer`):

Only used when review text is on.

## `sortBy` (type: `string`):

Order of businesses inside each map area that is searched. Yellow Pages itself has no global sort for this API.

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

How many business profiles to load at the same time. Higher is faster.

## `proxy` (type: `object`):

Not needed for Yellow Pages. Only turn on if runs fail from your region.

## Actor input object example

```json
{
  "searchTerms": [
    "pizza"
  ],
  "locations": [
    "Los Angeles, CA"
  ],
  "maxItems": 50,
  "enrichEmails": false,
  "scrapeDetails": true,
  "includeReviews": false,
  "maxReviews": 25,
  "sortBy": "default",
  "maxConcurrency": 8,
  "proxy": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

# 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": [
        "pizza"
    ],
    "locations": [
        "Los Angeles, CA"
    ],
    "proxy": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("memo23/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": ["pizza"],
    "locations": ["Los Angeles, CA"],
    "proxy": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("memo23/yellow-pages-us-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": [
    "pizza"
  ],
  "locations": [
    "Los Angeles, CA"
  ],
  "proxy": {
    "useApifyProxy": false
  }
}' |
apify call memo23/yellow-pages-us-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,memo23/yellow-pages-us-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/hE1hlaoo5c9JbaJIz/builds/mxuetQtpsFAHN7XbH/openapi.json
