# Yellow Pages (`mcdowell/yellow-pages`) Actor

Scrape Yellow Pages for addresses, categories, names and phone numbers from listings

- **URL**: https://apify.com/mcdowell/yellow-pages.md
- **Developed by:** [Victor McDowell](https://apify.com/mcdowell) (community)
- **Categories:** Other, Lead generation
- **Stats:** 613 total users, 1 monthly users, 100.0% runs succeeded, 7 bookmarks
- **User rating**: 1.98 out of 5 stars

## Pricing

$10.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#rental-actors

## 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

## Yellow Pages Scraper

This scraper allows you to search records by using search queries with location or by using a list of urls.

### Input

Sample Input

```json
{
    "search": "Mechanic",
    "location": "New York",
    "maxItems": 100,
    "proxyConfiguration": { "useApifyProxy": false }
}
```

You can configure the actor to get a overview of the search results which extracts the data availale on the yellow pages search results page. A sample of the output can be found below

### Output

#### Simple Output

Output is stored as an object with the following structure.

```json
{
        "isAd": false,
	"url": "https://www.yellowpages.com/new-york-ny/mip/tow-always-daily-14340018",
	"name": "Tow Always Daily",
	"address": "93 E 42nd StNew York, NY 10017",
	"phone": "(212) 792-9113",
	"website": "http://towing.com",
	"categories": [
		"Auto Repair & Service",
		"Towing",
		"Automobile Body Repairing & Painting"
	]
}
```

#### Detailed Output

Using the optional filter `"detailedInfo": false,` you can configure the actor to get more detailed information about the businesses by checking every business that appears for detailed information.

```json
{
	"isAd": true,
        "isClaimed": false,
        "isPreferred": false,
	"image": "https://i3.ypcdn.com/blob/8c0e8c8e070693a3fef79eeafe4ba31e478cf5de_400x260_crop.jpg",
	"url": "https://www.yellowpages.com/nationwide/mip/firestone-complete-auto-care-461600831?lid=1001662607171",
	"name": "Firestone Complete Auto Care",
	"address": "",
	"phone": "(800) 364-4314",
	"website": "http://www.firestonecompleteautocare.com/repair/services.jsp?lw_cmp=IYP_YPC_NPLL_Service",
	"openingHours": [
		"Mo-Fr 07:00-19:00",
		"Sa 07:00-18:00",
		"Su 09:00-17:00"
	],
	"categories": [
		"Auto Repair & Service",
		"Automobile Air Conditioning Equipment-Service & Repair",
		"Automotive Tune Up Service",
		"Tire Dealers"
	],
	"reviews": [
		{
			"author": "William B.",
			"datePosted": "09/01/2024",
			"rating": 4,
			"reviewText": "#Very Professional"
		},
		{
			"author": "Adalberto P.",
			"datePosted": "06/16/2022",
			"rating": 5,
			"reviewText": "Good stuff and good prices"
		},
		{
			"author": "Patrick E.",
			"datePosted": "04/08/2016",
			"rating": 1,
			"reviewText": "I don't know if they are crooks, but they are slow and slow and slow slow slow.  When it took much longer than the guy in the front said, I walked back and the mechanics told me that they had not been told about my car!!! They seemed to think the guys in front were idiots who made them look bad."
		},
		{
			"author": "Stephanie M.",
			"datePosted": "02/02/2016",
			"rating": 1,
			"reviewText": "Went for just an inspection sticker they tried to tell me i needed brakes and was going to fail me if i didnt by them, i showed them a recipt where i had purchased brakes for my car two months before they are crooks, dont trust a word they say"
		},
		{
			"author": "Fred J.",
			"datePosted": "10/19/2015",
			"rating": 1,
			"reviewText": "Omggggg the worst business, they have had my tire for 2 weeks because they had to order a tire,I called to check to see if it was ready after I explained to the lady twice what I had done  she just mumbled under her breath and said I don't know what to tell you call back when the manager is here."
		},
		{
			"author": "Pete A.",
			"datePosted": "08/07/2015",
			"rating": 1,
			"reviewText": "They told me i had a electrical problem during inspection. Cost me $25 to do a \"diagnosis\" which they said was the battery. The battery was only 6 months old. Took it back to pep boys and they said the batter was fine. 4 years later, battery still starting the car. SCAMMERS!"
		},
		{
			"author": "Jill M.",
			"datePosted": "07/18/2014",
			"rating": 1,
			"reviewText": "STAY AWAY. THEY ARE CROOKS. I went there years ago because they had a really cheap oil change coupon and they sliced some parts on my car and told me that it was wear and tear. I told them that I had these parts were replace not so long ago. They wanted to fix them for a fortune. I took my car to another mechanic. He said that it was a clean cut, obviously done with a knife.  I was young and I never did anything about it, but I still get so mad thinking about it. I was in college and really struggling financially. I could not afford this."
		},
		{
			"author": "Sheila S.",
			"datePosted": "06/16/2014",
			"rating": 1,
			"reviewText": "went to get 99.00 brake job ended up 300.00 for just back brakes. took them hours to do. i was ripped off because i am a woman. do not trust them at all. I had some check all for me they ripped me off"
		},
		{
			"author": "None Y.",
			"datePosted": "05/30/2014",
			"rating": 1,
			"reviewText": "ALL FIRESTONES IN THE CENTRAL VALLEY REALLY SUK. I GUESS IT'S A COMPANY THING. EVERYTIME I GO IN FOR MY LIFETIME CONTRACTS, I GET TOLD THAT I HAVE TO BUY THIS, I HAVE TO REPLACE THIS AND THEY END UP NOT DOING THE WORK I NEED AND REQUEST....CLOVIS FIRESTONE SUCKS, HANFORD FIRESTONE SUCKS.... I'M TIRED OF THEM AND JUST WANT MY $ BACK AND I DON'T WANT ANYTHING TO DO WITH FIRESTONE....."
		},
		{
			"author": "chip1978",
			"datePosted": "07/23/2013",
			"rating": 1,
			"reviewText": "This is the worse business we have ever dealt with! Screwed  up our car, charged us for it and we had too have Linder Tire fix it! It was actually worse that when we took it in! Crude caveman customer service. No refunds for things they screw up!:Save your self the trouble. Go somewhere else!"
		}
	],
	"paymentAccepted": "amex, discover, visa, master card",
	"infoSnippet": "Firestone Complete Auto Care is a full-service auto maintenance and repair shop offering a large and affordable selection of tires, convenient hours & locations for car repair, tire replacement, brake services, auto tune ups, radiator repair, car batteries and more. \nWe've been providing the right solutions since 1926, one customer at a time.  Our teams of professionals understand cars and they understand the people who drive them. We use advanced technology and offer quality products from brands you trust - all of which add up to a total car care experience.",
	"rating": 3.5,
	"ratingCount": 42
}
```

### CHANGELOG

- Dropped use of browser for quicker runs
- **IsClaimed** - Updated detailed info with is claimed for owner claimed businesses
- **IsPreferred** - Updated detailed information with is preferred by yellow pages to determine if the business is boosted.

# Actor input Schema

## `search` (type: `string`):

Query to search on Yellow Pages

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

Location to search entries in

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

List of URLs that will be crawled.

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

Maximum number of outputted results

## `detailedInfo` (type: `boolean`):

Get Detailed information including reviews from a place

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

In this case the best option is usually no proxy. Otherwise US or UK proxies work best.

## Actor input object example

```json
{
  "search": "Mechanic",
  "location": "New York",
  "maxItems": 30,
  "detailedInfo": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyCountry": "US",
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (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": "Mechanic",
    "location": "New York",
    "maxItems": 30,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyCountry": "US",
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("mcdowell/yellow-pages").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": "Mechanic",
    "location": "New York",
    "maxItems": 30,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyCountry": "US",
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("mcdowell/yellow-pages").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": "Mechanic",
  "location": "New York",
  "maxItems": 30,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyCountry": "US",
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call mcdowell/yellow-pages --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=mcdowell/yellow-pages",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/PyEuN3CaH9ncZKCX5/builds/fW6S9BJciIwPKODre/openapi.json
