# Yellow Pages Scraper (`anyxsolutions/yellowpages-scraper`) Actor

Scrapes US business listings from Yellow Pages by search term and location, returning names, addresses, phone numbers, websites, categories, ratings, and opening hours.

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

## Pricing

from $3.00 / 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/platform/actors/running/actors-in-store#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

![banner](https://i.ibb.co/hxWmSdHD/Screenshot-2026-07-30-at-9-25-38-PM.png)

## Yellow Pages Scraper

**US business listings with addresses, phones, websites, ratings, and opening hours.**

Search Yellow Pages by term and location — "plumbers in Austin, TX", "chinese restaurants in San
Francisco, CA" — and get every listing back as structured JSON, CSV, or Excel. Each result carries
the business name, full postal address, phone number, rating, review count, and opening hours. Point
it at individual business pages instead and you also get categories and the business website. Built
for local lead generation, market mapping, and competitor research.

### ⚡ Quick start

```json
{
  "searchTerms": ["chinese restaurants"],
  "location": "San Francisco, CA",
  "maxItems": 30,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

### 🧩 Input

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `searchTerms` | array | no¹ | — | What to search for, e.g. `plumbers`. One entry per search. |
| `location` | string | no | — | City and state, e.g. `San Francisco, CA`. Applies to every search term. |
| `startUrls` | array | no¹ | — | Yellow Pages URLs. Search pages and business pages are both supported. |
| `maxItems` | integer | no | `30` | Maximum businesses per search term or start URL. Search pages hold 30 listings each. |
| `proxyConfiguration` | object | no | `{ "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "US" }` | Proxy settings. See the FAQ before changing this. |

¹ Provide either `searchTerms` or `startUrls`.

### 📤 Output

One dataset row per business, in the same shape whether the row came from a search page or from a
business page. Search listings are the cheaper source and carry everything except `website` and
`categories`; business pages add those two. `source` tells you which produced the row.

#### Fields

| Field | Type | Description |
|---|---|---|
| `name` | string | Business name. |
| `url` | string | Yellow Pages listing URL. |
| `phone` | string | Phone number as listed. |
| `website` | string | The business's own website. Business pages only. |
| `address` | string | Full address on one line. |
| `street` | string | Street portion of the address. |
| `city` | string | City. |
| `state` | string | Two-letter state code. |
| `postalCode` | string | ZIP code. |
| `country` | string | Two-letter country code. |
| `categories` | array | Business categories. Business pages only. |
| `rating` | number | Star rating out of 5, e.g. `4.5`. |
| `reviewCount` | number | Number of reviews. |
| `openingHours` | object | Opening hours per weekday, e.g. `{ "Mo": "11:00-21:30" }`. |
| `source` | string | `search` or `business` — which page type produced the row. |
| `page` | number | Results page the listing came from. `null` for business pages. |

<details><summary>Example output</summary>

```json
{
  "name": "Z &Y Restaurant",
  "url": "https://www.yellowpages.com/san-francisco-ca/mip/z-y-restaurant-4970454",
  "phone": "(415) 981-8988",
  "website": null,
  "address": "655 Jackson St, San Francisco, CA 94133",
  "street": "655 Jackson St",
  "city": "San Francisco",
  "state": "CA",
  "postalCode": "94133",
  "country": "US",
  "categories": [],
  "rating": 5,
  "reviewCount": 17,
  "openingHours": {
    "Mo": "11:00-21:30",
    "Tu": "11:00-21:30",
    "We": "11:00-21:30",
    "Th": "11:00-21:30",
    "Fr": "11:00-22:30",
    "Sa": "11:00-22:30",
    "Su": "11:00-21:30"
  },
  "source": "search",
  "page": 1
}
```

</details>

### 💡 Use cases

- **Local lead generation** — build prospect lists of businesses in a trade and city, with phone numbers and websites.
- **Market mapping** — count and compare businesses in a category across neighbourhoods or metros.
- **Competitor research** — track ratings, review counts, and opening hours for a set of local rivals.
- **Data enrichment** — fill in addresses and phone numbers for an existing list of business names.

### ❓ FAQ

- **Do I need a proxy?** Yes, US residential. Yellow Pages rejects datacenter IPs and limits how often a single IP can request pages, so the Actor stops with a clear error if you turn proxies off.
- **How many results can I get?** Each search page holds 30 listings and a popular search runs to hundreds of pages. Raise `maxItems` to go deeper; the Actor paginates automatically.
- **Can I scrape a specific business?** Yes — put its Yellow Pages URL in `startUrls`. Business pages return categories and the company website too.
- **Why did some listings come back without a rating?** Not every business has reviews. Unrated listings simply omit `aggregateRating`.
- **Can I search outside the US?** No. Yellow Pages covers US businesses only.

### 🔗 More scrapers by Anyx

- [Bing Search Scraper](https://apify.com/anyxsolutions/bing-search-scraper)
- [Google Maps Email Extractor](https://apify.com/anyxsolutions/google-maps-email-extractor)
- [Indeed Scraper](https://apify.com/anyxsolutions/indeed-scraper)
- [Kleinanzeigen Scraper](https://apify.com/anyxsolutions/kleinanzeigen-scraper)

### 🤝 Anyx Solutions

We build custom scrapers and data-extraction pipelines.

- Email: tantosthor@gmail.com

### Notice

Anyx Solutions is not affiliated with [yellowpages.com](https://www.yellowpages.com/), and this
Actor is not supported or endorsed by it.

# Actor input Schema

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

What to search for, for example "chinese restaurants" or "plumbers". One entry per search.

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

City and state to search in, for example "San Francisco, CA". Applies to every search term.

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

Yellow Pages URLs to scrape directly. Search pages and individual business pages are both supported.

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

Maximum number of businesses to return per search term or start URL. Search pages hold 30 listings each.

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

Apify proxy settings. Yellow Pages blocks datacenter IPs and rate-limits per IP, so US residential proxies are used by default.

## Actor input object example

```json
{
  "searchTerms": [
    "chinese restaurants"
  ],
  "location": "San Francisco, CA",
  "maxItems": 30,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# 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": [
        "chinese restaurants"
    ],
    "location": "San Francisco, CA"
};

// Run the Actor and wait for it to finish
const run = await client.actor("anyxsolutions/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 = {
    "searchTerms": ["chinese restaurants"],
    "location": "San Francisco, CA",
}

# Run the Actor and wait for it to finish
run = client.actor("anyxsolutions/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 '{
  "searchTerms": [
    "chinese restaurants"
  ],
  "location": "San Francisco, CA"
}' |
apify call anyxsolutions/yellowpages-scraper --silent --output-dataset

```

## MCP server setup

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