# YellowPages USA B2B Local Business Leads & Phone Scraper (`growthscrapers/yellowpages-usa-b2b-scraper`) Actor

Extract US local businesses, phone numbers, websites, street addresses, ratings, and years in business across all 50 US states by category and city.

- **URL**: https://apify.com/growthscrapers/yellowpages-usa-b2b-scraper.md
- **Developed by:** [Ishant Dubey](https://apify.com/growthscrapers) (community)
- **Stats:** 2 total users, 1 monthly users, 75.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## YellowPages USA B2B Local Business Leads & Phone Scraper

Extract **US local business leads from YellowPages.com** — business name, category, **direct phone number**, **website**, **street address, city, state, ZIP**, star rating, review count, **years in business** and opening hours — for any category in any US city, state or ZIP code.

Built for **US digital marketing agencies, SMMA owners, cold-calling teams, SaaS SDRs and commercial insurance / business financing brokers** who need fresh, call-ready local business lists without copy-pasting from directories.

- ✅ All 50 US states — search by **city + state** (`Austin, TX`) or **ZIP code** (`90210`)
- ✅ Any category: roofers, plumbers, HVAC, dentists, lawyers, chiropractors, auto repair, med spas…
- ✅ Automatic pagination (30 businesses per page) up to your `maxItems`
- ✅ Duplicate businesses removed (same listing or same phone number)
- ✅ Sponsored "lead reseller" ad blocks skipped — you get the real local businesses
- ✅ Fast HTTP scraper (no browser) → low cost per 1,000 leads
- ✅ Export to CSV, Excel, JSON, Google Sheets, or pull via API / Zapier / Make / n8n

### 🎯 Use cases

| Who | What they do with the data |
|---|---|
| **Marketing agencies & SMMA** | Build prospect lists of roofers, HVAC, dentists or law firms in a target city; find businesses **without a website** or with **few reviews** to pitch web design, SEO, Google Ads and reputation management. |
| **Cold-calling & appointment-setting teams** | Get direct phone numbers with category and city for dialer campaigns. |
| **SaaS SDRs** | Feed local-business CRMs, booking, invoicing or field-service software outreach (ServiceTitan-style ICPs: plumbers, electricians, roofers). |
| **Commercial insurance & business-loan brokers** | Use **years in business** to target established companies (e.g. 5+ years) for insurance, equipment financing and MCA offers. |
| **Market research** | Count competitors per city, compare ratings and business age by category. |

### 📥 Input

| Field | Type | Description |
|---|---|---|
| `searchTerm` | string | Business category or keyword, e.g. `Roofing Contractors`, `Plumbers`, `HVAC`, `Dentists`, `Personal Injury Attorneys`. |
| `location` | string | US city and state or ZIP code, e.g. `Austin, TX`, `Miami, FL`, `90210`. |
| `startUrls` | array | *(Optional)* YellowPages search or category URLs copied from your browser, e.g. `https://www.yellowpages.com/search?search_terms=plumbers&geo_location_terms=Miami%2C+FL` or `https://www.yellowpages.com/miami-fl/plumbers`. Scraped in addition to the search above. |
| `maxItems` | integer | Maximum number of unique businesses to save (1–5,000). Default `30`. |
| `proxyConfiguration` | object | Apify Proxy (default). YellowPages only serves US visitors; the actor switches connection automatically if one gets blocked. |

#### Example input

```json
{
    "searchTerm": "Roofing Contractors",
    "location": "Austin, TX",
    "maxItems": 100
}
```

### 📤 Output

One row per business. Example (real listing):

```json
{
    "businessName": "J-Conn Roofing & Repair Service Inc",
    "category": "Roofing Contractors",
    "phone": "(512) 524-9558",
    "website": "https://j-connroofing.com/",
    "streetAddress": "7302 Elm Forest Road",
    "city": "Austin",
    "state": "TX",
    "zipCode": "78745",
    "rating": 5,
    "reviewCount": 3,
    "yearsInBusiness": 47,
    "openingHours": "Closed now · Mo-Fr 07:30-17:00",
    "listingUrl": "https://www.yellowpages.com/austin-tx/mip/j-conn-roofing-repair-service-inc-458552965",
    "searchTerm": "Roofing Contractors",
    "searchLocation": "Austin, TX",
    "scrapedAt": "2026-10-21T00:00:00.000Z"
}
```

| Field | Description |
|---|---|
| `businessName` | Company / business name |
| `category` | Categories / specialties, comma separated |
| `phone` | Primary US phone number |
| `website` | Official business website (external URL) |
| `streetAddress` | Street address |
| `city` / `state` / `zipCode` | US city, 2-letter state code, 5-digit ZIP |
| `rating` / `reviewCount` | YellowPages average star rating and number of reviews |
| `yearsInBusiness` | Years in business (where the business lists it) |
| `openingHours` | Current open status and weekly hours, e.g. `Open 24 hours`, `Closed now · Mo-Fr 08:00-17:00` |
| `listingUrl` | Canonical YellowPages listing URL |
| `searchTerm` / `searchLocation` | The search that found this business |
| `scrapedAt` | Extraction timestamp (ISO 8601) |

Fields that a business does not publish are returned as `null` — nothing is guessed or invented.

### 💡 Tips

- **Bigger lists:** The actor follows YellowPages pagination to the last page (safety cap: 100 pages = 3,000 businesses per search). For a whole metro, run several searches by suburb or ZIP code (e.g. `78701`, `78704`, `78745`) — duplicates are removed automatically within a run.
- **Find pitch-ready prospects:** filter the export for `website = null` (needs a website) or `reviewCount < 5` (needs reviews / reputation management).
- **Target established businesses:** filter `yearsInBusiness >= 5` for insurance, financing and B2B services.

### ❓ FAQ

**Why do some businesses have no street address?**
Service-area businesses (e.g. mobile roofers, plumbers) list "Serving the Austin Area" instead of an office address. Their phone, website and category are still extracted; address fields are `null`.

**Does it include emails?**
YellowPages search results do not show email addresses. Use the `website` field with an email-finder or website contact scraper to enrich the list.

**Are sponsored ads included?**
No lead resellers. The repeating sponsored ad blocks at the top/bottom of each page, and national lead-reseller ads mixed into the result list (toll-free number, "Serving the … Area", no real local business behind them), are skipped. Local businesses that advertise on YellowPages are included — they are real leads.

**Why do I get fewer rows than the "results" count on YellowPages?**
Duplicates are removed: the same business listed twice, and different listing names that share one phone number (common with lead-generation sites), are saved only once.

**Is it legal?**
The actor collects publicly listed business information (business names, business phone numbers and addresses). You are responsible for complying with applicable laws such as the TCPA, CAN-SPAM and the YellowPages terms when you use the data for outreach.

### 🔎 Keywords

YellowPages scraper, Yellow Pages scraper USA, US business leads, local business leads scraper, B2B leads USA, contractor leads, roofing leads, HVAC leads, plumber leads, dentist leads, lawyer leads, US phone number scraper, business directory scraper, cold calling lists, SMMA lead generation, YellowPages data extractor, YP.com scraper, local SEO prospecting.

# Actor input Schema

## `searchTerm` (type: `string`):

US business category or keyword (e.g. Roofing Contractors, Plumbers, HVAC, Dentists, Lawyers)

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

US city and state or ZIP code (e.g. Austin, TX / Miami, FL / 90210)

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

Optional. Paste YellowPages search URLs copied from your browser, e.g. https://www.yellowpages.com/search?search_terms=plumbers\&geo_location_terms=Miami%2C+FL or https://www.yellowpages.com/miami-fl/plumbers. When given, these are scraped in addition to the Category + Location search above.

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

Maximum number of unique businesses saved across all searches. YellowPages shows 30 listings per page; the actor pages through results automatically.

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

YellowPages only serves visitors from the USA. Apify Proxy is recommended; the actor automatically switches to US residential IPs if the selected proxy gets blocked.

## Actor input object example

```json
{
  "searchTerm": "Roofing Contractors",
  "location": "Austin, TX",
  "maxItems": 30,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

One row per US business listing: name, category, phone, website, street address, city, state, ZIP, rating, review count, years in business, opening hours and YellowPages listing URL.

# 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 = {
    "searchTerm": "Roofing Contractors",
    "location": "Austin, TX",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("growthscrapers/yellowpages-usa-b2b-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 = {
    "searchTerm": "Roofing Contractors",
    "location": "Austin, TX",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("growthscrapers/yellowpages-usa-b2b-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 '{
  "searchTerm": "Roofing Contractors",
  "location": "Austin, TX",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call growthscrapers/yellowpages-usa-b2b-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,growthscrapers/yellowpages-usa-b2b-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/zDEM9m63kbTxJBwKb/builds/aOmBTiMWg4QpuRP88/openapi.json
