# Yellow Pages Scraper: Business Leads, Phones & Ratings (`moggedhq/yellow-pages-scraper`) Actor

Get Yellow Pages business leads by category and city, such as Austin plumbers or Seattle cafes. Export phones, websites, addresses, hours, years in business, precise ratings and claimed status. About $0.0024 per business; 100 cost $0.24. No login. Duplicates and failures free.

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

## Pricing

from $1.92 / 1,000 businesses

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: Business Leads, Phones & Ratings

For agencies, local market researchers and business analysts who need repeatable US business lists with published contact details and evidence of what was actually read. About **$0.0024 per business**: 100 businesses cost **$0.24**, plus Apify's small start charge. No login or source API key is needed.

The prefilled job asks for 20 plumbers in Austin, TX with full details. In the measured cloud acceptance run on 29 October 2026, it returned 20 unique businesses in 38 seconds. Each business has one numeric source ID, so overlapping searches and repeated URLs cannot create a second business charge within the same run. Running a new job collects a new snapshot and is charged normally.

### What you get

One `business` row represents one Yellow Pages listing. Its first field is a readable summary of the available phone, rating and detail verification. A free `SUMMARY` row and the `SUMMARY` key-value record describe the whole run. Free `NOTE` rows explain invalid combinations or unavailable source pages. Filter exports to `type = business` when importing leads into a CRM.

| Field | Meaning |
| --- | --- |
| `summary` | Readable contact and verification result. |
| `businessId`, `name` | The directory's numeric listing ID and published business name. |
| `phone` | The public business phone exactly as listed. |
| `address` | A readable combination of the published address components. |
| `street`, `city`, `state`, `postalCode` | Separate address fields, suitable for spreadsheets and territory filters. |
| `website` | A published external HTTP or HTTPS website. Directory self-links remain null. |
| `yearsInBusiness` | The source's published years trading, distinct from years advertising with the directory. |
| `rating`, `reviewCount` | Business-page aggregate when published; otherwise the verified search value. |
| `searchRating`, `searchReviewCount` | Search values retained beside the detail result when both were read. |
| `ratingSource` | Whether the main rating was read from a search page or business page. |
| `categories` | Published business categories, deduplicated. |
| `hours` | The source's opening-hours strings; absent times are never completed by guessing. |
| `latitude`, `longitude` | Published business coordinates, never the search city's coordinates. |
| `isClaimed`, `claimStatus` | Claimed boolean and original source signal, including provider-specific claimed badges. |
| `services`, `paymentMethods` | Published services and accepted payments where available. |
| `areaServed`, `languages`, `yearEstablished` | Additional details when the business publishes them. |
| `isAd` | Whether the listing carried the explicit paid-placement marker read by the Actor. |
| `detailStatus` | `complete` or `not-requested`. |
| `qualityFlags` | Missing external website, phone, street address or unavailable detail page. |
| `requestedLocation`, `searchTerm`, `sourceUrl` | Where the business was discovered and what was requested. |
| `url`, `scrapedAt` | Canonical business page and UTC collection time. |

A missing value is `null`, or an empty category array where no categories were published. It does not become an estimated phone, inferred address or fabricated rating. Search results sometimes publish a more precise rating than the detail page. For example, an Austin listing showed 2.87 in search structured data and 3 on its business page during testing. Both are preserved rather than silently treating them as identical.

### Use it in three steps

1. Enter one or more trades in `searchTerms` and US cities or ZIP codes in `locations`. Alternatively, paste search, category or business pages into `startUrls`.
2. Set `maxItems` to the number of unique businesses you want across the run. Leave `includeDetails` enabled for business-page information.
3. Start the Actor, inspect the overview and summary, then export JSON, CSV or Excel. Join later snapshots by business ID.

### Inputs

| Input | Default | Purpose |
| --- | --- | --- |
| `searchTerms` | `["plumbers"]` | Trades or categories, one string per entry. |
| `locations` | `["Austin, TX"]` | US cities with states, or ZIP codes. Every trade is searched in every location. |
| `startUrls` | Empty | Optional public Yellow Pages search, category or business URLs. |
| `maxItems` | `20` | Global unique-business cap, from 0 to 10,000. |
| `includeDetails` | `true` | Read each business page for full details. |
| `maxItemsPerSearch` | `maxItems` | Optional per-search delivery cap. |
| `maxPagesPerSearch` | `10` | Maximum pages followed for each search. |
| `includeAds` | `false` | Include explicitly labeled paid placements when true. |
| `requirePhone` | `false` | Deliver only businesses publishing a phone. |
| `requireWebsite` | `false` | Deliver only businesses linking to an external website. |
| `proxyConfiguration` | Direct cloud access | Optional buyer-supplied proxy settings. |

Inputs support at most 50 distinct search and location combinations or starting URLs. Terms and locations are limited to 120 characters each. A search without a location produces a free explanatory note. When URLs are supplied on their own, the default trade and city are not added behind the scenes. Invalid input combinations produce notes rather than business charges.

#### Search two markets

```json
{
  "searchTerms": ["coffee shops"],
  "locations": ["Austin, TX", "Seattle, WA"],
  "maxItems": 40,
  "includeDetails": true,
  "requirePhone": true
}
```

The global limit covers both markets together. Jobs are visited in turn, and the Actor follows each source next-page link as needed. A listing found in both jobs is delivered once. `requestedLocation` records the discovery request; `city` records the published business address, which may differ because the directory also lists nearby and service-area businesses.

#### Read known businesses

```json
{
  "startUrls": [
    "https://www.yellowpages.com/austin-tx/mip/m1-plumbing-531014849"
  ],
  "maxItems": 1,
  "includeDetails": true
}
```

Only signed-out public directory pages are accepted. Tracking parameters on business URLs do not create separate businesses. External domains, account pages and URLs containing credentials are rejected before source requests.

### Example from a real cloud run

This business was checked on 29 October 2026. The excerpt omits optional fields for readability; the dataset has the full declared schema.

```json
{
  "type": "business",
  "businessId": "531014849",
  "name": "M1 Plumbing",
  "phone": "(512) 766-1519",
  "address": "1712 E Riverside Dr, Austin, TX 78741",
  "website": "https://www.austinplumbery.com/",
  "rating": null,
  "reviewCount": null,
  "hours": ["Mo-Fr 07:00-18:00", "Sa 08:00-13:00"],
  "latitude": 30.244608,
  "longitude": -97.729996,
  "isClaimed": false,
  "detailStatus": "complete"
}
```

### Pricing and spending limits

The primary charge is one **Business**, saved before it is charged. There is no separate detail fee and no charge for duplicate, filtered, missing or failed business results. Summary and note records are free. Apify's start charge is $0.00005 for the normal memory setting.

| Businesses delivered | Standard price | Bronze | Silver | Gold |
| --- | --- | --- | --- | --- |
| 20 | $0.048 | $0.0456 | $0.0432 | $0.0384 |
| 100 | $0.24 | $0.228 | $0.216 | $0.192 |
| 1,000 | $2.40 | $2.28 | $2.16 | $1.92 |

These examples exclude the small start charge. Bronze receives 5% off, Silver 10%, and Gold and higher tiers 20%. The per-run maximum charge is respected before more business work begins. Reaching it ends the job cleanly with the delivered rows and a summary. A platform reboot resumes from saved candidates and the dataset ledger, reconciling the last row's charge without charging completed rows twice.

### Monitor businesses every day

Save a task for the trades and territories you actually monitor. In Apify Console, create a daily or weekly schedule for that task and choose a completion webhook or a dataset export integration. Use the same inputs each time and retain the run date alongside the business ID in your destination.

Join successive datasets on `businessId` to detect contact changes, new or missing websites, rating movement, review-count growth or a change in claimed status. Keep `searchRating` separate from `rating` when comparing time series. A search-page precision change should not be mistaken for customer sentiment. The Actor returns current snapshots; it does not promise a complete historical directory or a permanent registry of every local business.

### API usage

Use your own Apify token as an environment variable, never inside shared source or a public spreadsheet. Start a run with the asynchronous API, wait for `SUCCEEDED`, then download its default dataset. Private access requires authorization.

```python
import os
from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("moggedhq/yellow-pages-scraper").call(run_input={
    "searchTerms": ["dentists"], "locations": ["Denver, CO"],
    "maxItems": 20, "requireWebsite": True
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    if item.get("type") == "business":
        print(item["businessId"], item["phone"], item["website"])
```

### Use with AI agents (MCP)

Connect an Apify MCP client at `https://mcp.apify.com`. Ask the agent to fetch this Actor's input schema, specify the trade, location and business cap, and inspect business rows plus the run summary. Example: "Collect 20 Austin plumbers with phone, external website, claimed status and opening hours. Spend no more than $0.06."

Private access requires the connected Apify account to have access to this Actor. Agents should count only `type = business` as leads and use `businessId` for joins. A missing value should stay missing in later enrichment rather than being presented as verified data.

### Limits and source behaviour

Coverage is the US Yellow Pages directory. Other countries, Yelp reviews, reviewer profiles and personal user accounts are outside this Actor's scope. Full business details depend on what the listing publishes. Phone numbers are directory-published business contacts; the Actor does not test whether a number connects, whether a website is active or whether a business is licensed.

Requests are sequential and paced. Direct Apify cloud access worked during feasibility; the tested datacenter and residential proxy pools were refused, so neither is silently enabled. If the source changes or refuses a page, the job reports that fact and charges only delivered business records. With details enabled, missing or unavailable business pages are skipped without a business charge. The summary records these free failures. Choose `includeDetails = false` for search records only.

Explicitly labeled advertisements are excluded by default. The directory may still promote ordinary ranked listings or show businesses outside the exact city boundary. Published address fields and `isAd` are retained so buyers can apply their own geographic and placement rules. The Actor does not solve CAPTCHAs or log into the source. Jobs stop cleanly before their run timeout.

### FAQ

#### Can I collect reviews or reviewer identities?

No. This Actor exports business data and aggregate ratings. It does not export review text, reviewer names, profile links or reviewer locations.

#### Why are the two ratings different?

The search and business pages can publish different precision or different snapshots. `ratingSource` identifies the main value; the search values are preserved separately when details are enabled.

#### Will a repeated business be charged twice?

Not within a run, including after an Apify reboot. A later independent run is a new snapshot and charges for its delivered businesses again.

#### Can I collect only businesses with a website?

Yes. Set `requireWebsite` to true. Only external HTTP or HTTPS links qualify. A directory link labeled Website is not counted as the business's external website.

#### Why is claimed status or years trading missing?

The source did not establish it in the returned business fields. Unknown claimed status remains null. Years advertising with Yellow Pages are not substituted for years in business.

#### Does a business address have to match my requested city?

No. The source can include nearby and service-area listings. Compare the published city, state and ZIP with your territory requirements; the requested city is a separate discovery field.

#### What happens when no data is available?

A free note and summary explain the outcome. There is no business charge for an empty result. The normal platform start charge can still apply.

#### How do I report a changed page or missing field?

Provide the run ID, a public source business URL and the field you expected. These references reproduce the input.

# Actor input Schema

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

Business categories or trades. Every term is searched in every location. Examples: plumbers, cafes, dentists. Supply a location or use startUrls.

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

US city and state or ZIP code, such as Austin, TX or 98101. Used with searchTerms. Search location is recorded separately from each business address.

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

Optional public yellowpages.com links. Can be used without searchTerms. No external domains or account pages.

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

Hard cap on unique delivered businesses across all inputs. Duplicates, failed pages and free note rows do not count. At $0.0024 each, 20 businesses cost $0.048 plus the platform start charge.

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

Recommended. Opens each business page for full opening hours, coordinates, claimed status, services, payment methods and available published fields. About one extra paced request per business.

## `maxItemsPerSearch` (type: `integer`):

Optional cap for each term/location or starting URL. Defaults to maxItems.

## `maxPagesPerSearch` (type: `integer`):

Follows the source next link, stopping at this cap, maxItems, or the end of results.

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

Off by default. Labeled paid listings are excluded; when enabled they carry isAd true. Ordinary ranked listings can still be sponsored by the source.

## `requirePhone` (type: `boolean`):

Only deliver and charge for businesses with a published phone.

## `requireWebsite` (type: `boolean`):

Only deliver businesses linking to an external website. A Yellow Pages link labeled Website does not count as an external website.

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

Optional. Direct Apify cloud access is the tested default. Datacenter and US residential proxy routes were refused in feasibility tests. Custom configuration is tried as supplied; no automatic paid upgrade.

## Actor input object example

```json
{
  "searchTerms": [
    "plumbers"
  ],
  "locations": [
    "Austin, TX"
  ],
  "maxItems": 20,
  "includeDetails": true,
  "maxPagesPerSearch": 10,
  "includeAds": false,
  "requirePhone": false,
  "requireWebsite": false
}
```

# Actor output Schema

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

No description

## `summary` (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": [
        "plumbers"
    ],
    "locations": [
        "Austin, TX"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("moggedhq/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": ["plumbers"],
    "locations": ["Austin, TX"],
    "maxItems": 20,
}

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

```

## MCP server setup

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