# Yellow Pages Scraper — US Business Leads with Phones (`jeffev/yellow-pages-scraper`) Actor

Scrape yellowpages.com business listings in the US by keyword and city or ZIP: name, phone, address, categories, rating, years in business and open status. Detailed mode adds website, email, extra phones, hours, payment methods and brands. Skips ads by default.

- **URL**: https://apify.com/jeffev/yellow-pages-scraper.md
- **Developed by:** [Jefferson Valandro](https://apify.com/jeffev) (community)
- **Categories:** Lead generation, E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Scraper — US Business Leads with Phones

Scrape **yellowpages.com business listings** across the US by business type and city, state or ZIP: business name, **phone**, street address and city, categories, rating, **years in business**, open status and description. Turn on **details** to add the **website**, email (when the business lists one), extra phones, opening hours, payment methods, brands and services.

Built for **local lead generation**: agencies, B2B sales, home-services marketplaces and anyone building lists of US small businesses.

### Why this one

- **Phone on almost every listing**, plus street address and categories.
- **Website in detailed mode** (85+% of listings in our tests).
- **Ads skipped by default**: sponsored listings often belong to other cities.
- **Filters**: only with phone, only with website, minimum rating. Filtered businesses are not charged.
- **Many terms × many cities** in one run, duplicates removed.

### Input

Dentists and roofers in Miami, with website:

```json
{
  "searchTerms": ["dentist", "roofing contractor"],
  "locations": ["Miami, FL", "Orlando, FL"],
  "maxResultsPerSearch": 200,
  "includeDetails": true
}
```

### Output

| Field | Description |
|---|---|
| `name`, `ypId`, `url` | business |
| `phone`, `street`, `locality` | contact and address |
| `categories`, `rating`, `reviewCount`, `yearsInBusiness`, `openStatus`, `snippet`, `isAd` | listing |
| `website`, `email`, `extraPhones`, `otherLinks`, `address`, `hours`, `payment`, `brands`, `services`, `description` | detailed mode |
| `search` | term and location that returned it |

### Example output

One real item from a test run (long texts and lists shortened):

```json
{
  "type": "business",
  "name": "Sara A Ramos DDS",
  "ypId": "471903260",
  "url": "https://www.yellowpages.com/miami-fl/mip/sara-a-ramos-dds-471903260",
  "phone": "(786) 212-1596",
  "street": "8370 W Flagler St Ste 100",
  "locality": "Miami, FL 33144",
  "categories": [
    "Dentists"
  ],
  "rating": 5,
  "reviewCount": 2,
  "yearsInBusiness": 14,
  "openStatus": "open now",
  "snippet": "Dr. Ramos is amazing! She is super sweet and has tons of patience with my 4, 6 and 9 year old girls. DEFINITELY RECOMMEND TO EVERYONE!!\"",
  "isAd": false,
  "search": "dentist | Miami, FL",
  "website": "http://ramosdentistry.com",
  "otherLinks": [
    "http://ramosdentistry.com"
  ],
  "email": null,
  "extraPhones": [
    "(786) 212-1740"
  ],
  "address": "8370 W Flagler St Ste 100 Miami, FL 33144",
  "hours": [
    "Mon: 9:00 am - 7:00 pm",
    "Tue: 9:00 am - 5:00 pm",
    "Wed: 9:00 am - 7:00 pm"
  ],
  "payment": "visa, master card, discover, debit, check, financing available, insurance",
  "brands": "invisalign",
  "description": "Dr. Sara A. Ramos was born and raised in Cuba. She attended Dental School for 5 years at Carlos J. Finlay Institute in Camaguey. She graduated in 1992 and wo...",
  "services": null
}
```

### Notes

- Yellow Pages shows up to about 3,000 results per term and location; split big cities into ZIP codes for more.
- Few businesses publish an email on Yellow Pages; for emails, combine with our **Website Contact Scraper** on the websites returned.

### Feedback

Found a problem or need a field? Open an issue in the **Issues** tab: every issue is read and answered. If the actor helped you, a review on the Store helps a lot.

### How much does it cost?

You pay only for results delivered, at a fixed price per item. **Apify platform usage is included** in that price, so there are no compute costs on top. Errors and items that couldn't be found are free.

| What you get | Price | Example |
|---|---|---|
| Business with details | $0.003 each | 1,000 businesses with details = $3.00 |
| Business listing | $0.001 each | 1,000 business listings = $1.00 |

The Apify **Free plan includes $5 of monthly credit**, enough for about **1,666 businesses with details** per month at no cost. You can also set a maximum spend per run.

On paid Apify plans it gets cheaper automatically: **10% off on Starter, 20% on Scale and 30% on Business**.

# Actor input Schema

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

Business types or keywords, e.g. 'plumber', 'dentist', 'roofing contractor'.

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

US locations, e.g. 'Austin, TX', 'Miami, FL', '10001'. Every term is searched in every location.

## `maxResultsPerSearch` (type: `integer`):

Maximum businesses per term and location (30 per page).

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

Open each listing for the website, email (when listed), extra phones, hours, payment methods, brands and description.

## `skipAds` (type: `boolean`):

Skip sponsored listings (they often belong to other cities).

## `onlyWithPhone` (type: `boolean`):

Keep only businesses that show a phone number.

## `onlyWithWebsite` (type: `boolean`):

Keep only businesses with a website (turns on details, since the website is on the listing page).

## `minRating` (type: `number`):

Skip businesses rated below this (unrated ones are skipped too).

## Actor input object example

```json
{
  "searchTerms": [
    "plumber"
  ],
  "locations": [
    "Austin, TX"
  ],
  "maxResultsPerSearch": 30,
  "includeDetails": false,
  "skipAds": true,
  "onlyWithPhone": false,
  "onlyWithWebsite": false
}
```

# Actor output Schema

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

Yellow Pages business listings.

# 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"
    ],
    "locations": [
        "Austin, TX"
    ],
    "maxResultsPerSearch": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("jeffev/yellow-pages-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"],
    "locations": ["Austin, TX"],
    "maxResultsPerSearch": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("jeffev/yellow-pages-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": [
    "plumber"
  ],
  "locations": [
    "Austin, TX"
  ],
  "maxResultsPerSearch": 30
}' |
apify call jeffev/yellow-pages-scraper --silent --output-dataset

```

## MCP server setup

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