# Yellow Pages Scraper - US Business Leads and NAP Data (`s-r/yellowpages-scraper`) Actor

Search US Yellow Pages businesses by category or name and city or ZIP code. Export names, addresses, phones, websites, categories and published ratings with unique business IDs.

- **URL**: https://apify.com/s-r/yellowpages-scraper.md
- **Developed by:** [SR](https://apify.com/s-r) (community)
- **Categories:** Lead generation, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 business 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?

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

Yellow Pages Scraper collects US business search results for a business name or category and a city, state or ZIP code. Export names, addresses, phone numbers, websites, categories and published ratings into a structured dataset. Each business includes its original Yellow Pages link and business ID so you can trace the record back to the source.

The actor is intended for citation audits, local business research, lead preparation and comparisons between public business directories. Search for one category in one location per run. Choose an explicit result limit to keep the size of your dataset predictable. Results reflect what the directory publishes when the search runs; they do not certify that a business is active or that its contact information has been verified.

### Yellow Pages Scraper input

Two fields are required: `search_terms` and `geo_location_terms`. Use a category such as `plumbers`, or a business name. Set the location to a US city and state, such as `New York, NY`, or a ZIP code such as `10001`. Surrounding whitespace is removed. Each text field accepts up to 200 characters. The actor has no default city, so every run has an explicit geographic scope.

For example, this input searches the directory for plumbers in New York and asks for one business:

```json
{
  "search_terms": "plumbers",
  "geo_location_terms": "New York, NY",
  "max_items": 1
}
```

`max_items` defaults to 100 and accepts integers from 1 to 10,000. It is the total number of unique businesses requested across the run. A zero value does not mean unlimited. The actor may return fewer businesses if the directory has no more matching results or if collection cannot finish.

`page` defaults to 1 and chooses the first source page to visit. It is a page number rather than a row offset. The actor continues through available result pages automatically. The `cursor` field is for resuming an interrupted collection with its returned continuation value. When using a cursor, retain the original search term, location, starting page and result limit. Changing those values invalidates the continuation.

### Output and published business fields

The default dataset contains one row per unique business listing. Required fields include `name`, `place_id`, `url`, `source`, `platform` and `fetched_at`. The business ID identifies the listing, while `url` points to its Yellow Pages business page. The `website` field, when present, is the separate external website that the directory links to.

Optional contact fields include `address`, `street`, `city`, `state`, `postal_code`, `country_code` and `phone`. A ZIP code remains text to preserve leading zeroes. Phone numbers retain their published notation. Address fields describe the business location as published, which can differ from the city used for your search. Some listings publish only a service area. Those rows use `service_area` and do not turn that text into an invented street address.

`categories` preserves the published category order, and `category` is the first category in that list. If available, `rating` contains the numeric published average and `reviews_count` contains its review count. Missing ratings are omitted rather than replaced with zero. `opening_hours` preserves published schedule strings without calculating whether a business is currently open.

Every row also contains `search_terms`, `geo_location_terms`, `search_url`, `page` and `position`. These fields explain where the listing was encountered. Positions refer to the original result order and may have gaps after duplicate removal. Two businesses with the same name or telephone number remain separate if they have different business IDs.

#### Example row

One real row, as returned for `search_terms: "plumbers"` and `geo_location_terms: "New York, NY"`:

```json
{
  "source": "yellowpages-scraper",
  "fetched_at": "2026-11-11T15:06:52.015Z",
  "platform": "yellowpages",
  "place_id": "460765127",
  "name": "Fred Smith Plumbing & Heating",
  "url": "https://www.yellowpages.com/new-york-ny/mip/fred-smith-plumbing-heating-460765127",
  "search_terms": "plumbers",
  "geo_location_terms": "New York, NY",
  "search_url": "https://www.yellowpages.com/search?search_terms=plumbers&geo_location_terms=New+York%2C+NY",
  "page": 1,
  "position": 1,
  "address": "1674 1st Ave New York, NY 10128",
  "street": "1674 1st Ave",
  "city": "New York",
  "state": "NY",
  "postal_code": "10128",
  "country_code": "US",
  "phone": "(212) 744-1300",
  "website": "https://www.prestonkraus.com",
  "categories": ["Plumbers", "Drainage Contractors", "Fireplaces"],
  "category": "Plumbers",
  "rating": 5,
  "reviews_count": 68,
  "opening_hours": ["Mo-Su 09:00-17:00"]
}
```

Fields the directory does not publish for that business are absent from the row instead of being filled with zeros or empty strings.

### Use cases for Yellow Pages Scraper

**Citation and NAP consistency checks.** Name, address and phone come out as separate typed fields, so you can compare them against your own records or another directory without parsing a single formatted address line.

**Local lead lists.** Run one category per city and you get a contactable list: phone, the published website, the published categories and the original listing URL for verification. The stable `place_id` lets you re-run the same search later and match businesses across runs instead of comparing names.

**Local SEO and competitor research.** The published rating and review count show where a market is already reviewed and where a client can gain ground, per city and per category.

**Feeding other tools.** Rows are plain JSON with a fixed field set, so they drop straight into a spreadsheet, a CRM import or a citation database. Keep `place_id` as your key.

**Coverage checks before a bigger job.** Because a search term plus a location returns a predictable number of unique businesses, a small run first tells you whether the directory has the depth you need before you commit to a larger collection.

### How this Yellow Pages Scraper compares

The alternatives to this actor are scraping Yellow Pages yourself, using one of the free web tools, a browser extension or an open-source script, using another directory, or using another Yellow Pages actor in the Store. What separates them:

- **Against manual collection or a browser extension:** extensions give you one page at a time in the browser you are sitting at. This actor returns typed JSON, keeps a stable business ID per listing, removes duplicates across pages and hands you a continuation value when a run stops early, so a 500-business collection is one job rather than a copy-paste session.
- **Against free web tools, browser extensions and open-source scripts:** these are what you find first when you search for a free Yellow Pages scraper, and each one is a single export at a time: a form you fill in per city, an extension you drive page by page, or a script you run and maintain yourself when the source changes its layout. This actor takes two fields, walks the result pages on its own, returns a continuation value when a run stops early, and keys every row on `place_id`, so a repeat run lines up with the previous one instead of starting a fresh sheet.
- **Against other directories such as Google Maps or Yelp:** those are different sources with different coverage, review populations and category systems. This actor reads one directory only, and every row carries the original Yellow Pages URL, so a record can always be traced back to the page it came from instead of being treated as a verified register.
- **Against other Yellow Pages actors in the Store:** some listings there are no longer maintained, and some publish contact fields as pre-formatted strings. Here the address is also split into `street`, `city`, `state` and `postal_code`, ratings stay numeric, a missing rating stays missing, and deduplication runs on the business ID rather than on the name.

No directory is a substitute for checking a business itself: rows report what the source published when the search ran.

### Pricing and result limits

Refer to the actor's current Pricing tab for the applicable platform charges. Dataset item charges, when configured there, follow the businesses actually delivered. The actor does not add a separate manual charge for a result page, a repeated business or a collection attempt. An empty search delivers no dataset items and therefore has no dataset item charges. Platform run charges, if applicable, remain governed by the Pricing tab.

Users without a paid Apify plan receive at most ten businesses per run. This is a volume limit and does not mean the delivered dataset items are exempt from the pricing shown by Apify. All available contact and rating fields remain eligible within that limit. The limit applies across continuation requests, rather than restarting on every page.

### Coverage and practical limits

This version covers US search results. It does not collect individual review texts, email addresses, business coordinates or details found only after opening a business profile. Availability varies by listing. The main result list may contain promoted businesses, so the dataset should not be interpreted as an advertising-free ranking.

The run summary records whether collection is partial and includes warnings when a page could not be completed. Keep the returned continuation if you need to resume remaining work. A reported result total on the source is informational and is not a guarantee that the actor can deliver that many unique businesses. Source rankings and contact fields can change between visits.

### FAQ

#### Can I search by ZIP code?

Yes. Put the ZIP code in `geo_location_terms`. The source may normalize its displayed location, but each row preserves your original search location alongside the published business address.

#### Is there a free Yellow Pages scraper?

Search results for a free Yellow Pages scraper include web tools, a browser extension and an open-source script for this directory, each with its own manual step: a form per city, a browser session you drive yourself, or code you maintain when the source changes its layout. Runs without a paid Apify plan deliver at most ten businesses, with exactly the same fields and the same deduplication as a larger run, so a small run is enough to verify coverage and field quality before you commit to a bigger collection.

#### Why are some addresses or ratings missing?

The directory does not publish every field for every business. Missing optional fields are omitted. A service-area business is not assigned a street address based on the search city, and an absent rating is not reported as a zero rating.

#### Are duplicate businesses charged twice?

Listings are deduplicated by their Yellow Pages business ID across the pages collected in a run. A business encountered again is not added as a second dataset row. Distinct locations with separate IDs remain separate records even when their names or phone numbers match.

#### Can I collect data outside the United States?

This version is designed for US Yellow Pages searches. It does not promise coverage of other countries or other Yellow Pages brands. Use one US location per run and review the returned source links before combining records with another directory.

#### How should I compare records with another directory?

Use the published name, address, phone and website domain together. A name alone is not a reliable identity key across sources. The included source URL and collection timestamp help you review differences without treating one directory as a verified business register.

# Actor input Schema

## `search_terms` (type: `string`):

Business name or category to find in the US. Whitespace is trimmed.

## `geo_location_terms` (type: `string`):

US city and state, or ZIP code. Required; there is no default location.

## `page` (type: `integer`):

First source page. Keep the same value when continuing with a cursor.

## `max_items` (type: `integer`):

Total unique businesses across all continuation requests, not a per-page limit.

## `cursor` (type: `string`):

Opaque next_cursor from the previous response. Keep the original search, location, page and max_items.

## Actor input object example

```json
{
  "search_terms": "plumbers",
  "geo_location_terms": "New York, NY",
  "page": 1,
  "max_items": 100
}
```

# Actor output Schema

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

No description

## `output` (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 = {
    "search_terms": "plumbers",
    "geo_location_terms": "New York, NY"
};

// Run the Actor and wait for it to finish
const run = await client.actor("s-r/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 = {
    "search_terms": "plumbers",
    "geo_location_terms": "New York, NY",
}

# Run the Actor and wait for it to finish
run = client.actor("s-r/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 '{
  "search_terms": "plumbers",
  "geo_location_terms": "New York, NY"
}' |
apify call s-r/yellowpages-scraper --silent --output-dataset

```

## MCP server setup

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