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

Scrape Canadian business listings from Yellow Pages Canada and PagesJaunes.ca. Get name, address, phone, website, opening hours, categories, rating, coordinates and social links for each business. Search by keyword and city, or paste search, category or business URLs.

- **URL**: https://apify.com/anyxsolutions/yellowpages-ca-scraper.md
- **Developed by:** [Anyx Solutions](https://apify.com/anyxsolutions) (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

from $1.50 / 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.
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

![banner](https://anyx.solutions/banners/yellowpages-ca-scraper.png)

## Yellow Pages Canada Scraper

**Canadian business leads from Yellow Pages Canada and PagesJaunes.ca — phone, website, address, hours, categories, ratings and social links — as clean JSON.**

Scrape Canadian business listings from Yellow Pages Canada and PagesJaunes.ca. Get name, address,
phone, website, opening hours, categories, rating, coordinates and social links for each business.
Search by keyword and city, or paste search, category or business URLs. Type "plumber" and
"Toronto ON", or paste any yellowpages.ca search, and the Actor walks every results page and opens
each business for its full profile: all phone numbers, the business website, opening hours, products
and services, description, Facebook, Instagram and other social profiles, and map coordinates.
French listings from PagesJaunes.ca stay in French. There is no login and no API key. Built for
local lead generation, sales prospecting, market mapping and competitor research across Canada.

### ⚡ Quick start

```json
{
  "startUrls": [
    { "url": "https://www.yellowpages.ca/search/si/1/plumber/Toronto+ON" }
  ],
  "maxItems": 5
}
```

Or search by keyword and city:

```json
{
  "searchTerms": ["dentists", "chiropractors"],
  "location": "Vancouver BC",
  "maxItems": 50
}
```

### 🧩 Input

| Field                | Type    | Required | Default                      | Description                                                                                                                                                                       |
| -------------------- | ------- | -------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `startUrls`          | array   | no¹      | —                            | Yellow Pages Canada or PagesJaunes.ca pages: a search (`/search/si/1/plumber/Toronto+ON`), a category page (`/business/ON/01030400.html`) or a single business page (`/bus/...`). |
| `searchTerms`        | array   | no¹      | —                            | What to search for, one search per entry, e.g. `plumber` or `dentists`. Used with `location`.                                                                                     |
| `location`           | string  | no       | —                            | City and province to search in, e.g. `Toronto ON` or `Vancouver BC`. Required with `searchTerms`.                                                                                 |
| `includeDetails`     | boolean | no       | `true`                       | Open every business page for opening hours, all phone numbers, products and services, the full description, social links and every category.                                      |
| `maxItems`           | integer | no       | —                            | Maximum businesses per start URL or search term. The input form starts at 5; a search page shows 35 businesses, so leave it empty to get every page.                              |
| `proxyConfiguration` | object  | no       | `{ "useApifyProxy": false }` | Proxy settings. Works without a proxy; switch to Apify's residential proxy with Canada as the country if requests get blocked.                                                    |

¹ Provide `startUrls`, or `searchTerms` with a `location`.

**Start URLs.** Search on yellowpages.ca or pagesjaunes.ca and copy the address bar. A category page
(Yellow Pages' "Browse by category", nationally or for one province) lists that category's search in
every city; the Actor runs those searches one after another until **Maximum businesses per search** is
reached, or all of them when it is empty. **Include business details** is on by default; with it off,
each row has what the search page shows: name, address, phone, website, categories, a short
description, rating and coordinates. Leave the **Proxy configuration** off unless runs start failing.

### 📤 Output

Each business is one dataset row, in the order the search shows them. A business that appears twice in
a search (a paid placement repeated as a regular result) is returned once. Fields the business does
not publish are `null` (or empty), so every row has the same shape.

#### Fields

| Field            | Type    | Description                                                                                        |
| ---------------- | ------- | -------------------------------------------------------------------------------------------------- |
| `id`             | string  | Yellow Pages' listing id, as in the URL.                                                           |
| `name`           | string  | Business name.                                                                                     |
| `url`            | string  | The business page on yellowpages.ca or pagesjaunes.ca.                                             |
| `categories`     | array   | Yellow Pages categories the business is listed under, e.g. `Plumbers & Plumbing Contractors`.      |
| `services`       | array   | Products and services the business lists on its page.                                              |
| `address`        | string  | Full address on one line.                                                                          |
| `street`         | string  | Street address.                                                                                    |
| `city`           | string  | City.                                                                                              |
| `province`       | string  | Two-letter province code, e.g. `ON`, `QC`.                                                         |
| `postalCode`     | string  | Postal code, e.g. `M3J 1Y8`.                                                                       |
| `latitude`       | number  | Map latitude.                                                                                      |
| `longitude`      | number  | Map longitude.                                                                                     |
| `phone`          | string  | Main phone number, as displayed, e.g. `647-362-2109`.                                              |
| `phones`         | array   | Every phone number on the business page, each with its `number` and `label` (`Primary`, `Fax`...). |
| `website`        | string  | The business's own website.                                                                        |
| `openingHours`   | object  | Opening hours per weekday, e.g. `{ "Monday": "08:00-17:00" }`; split shifts are joined by `, `.    |
| `rating`         | number  | Average Yellow Pages rating out of 5.                                                              |
| `reviewCount`    | number  | Number of Yellow Pages ratings.                                                                    |
| `description`    | string  | The business's own description, as plain text.                                                     |
| `emails`         | array   | Email addresses the business publishes on its page. Most businesses use a contact form instead.    |
| `socialLinks`    | array   | Social profiles, each with its `network` (`facebook`, `instagram`, `x`, `linkedin`...) and `url`.  |
| `logo`           | string  | Logo or photo URL.                                                                                 |
| `isAd`           | boolean | `true` for a paid placement in the search results; `null` for a business page given directly.      |
| `searchQuery`    | string  | What was searched for, e.g. `plumber`; `null` for a business page given directly.                  |
| `searchLocation` | string  | Where it was searched, e.g. `Toronto ON`.                                                          |
| `startUrl`       | string  | The start URL (or search built from your search terms) that produced the row.                      |

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

```json
[
  {
    "id": "101902936",
    "name": "Drain King Plumbers",
    "url": "https://www.yellowpages.ca/bus/Ontario/North-York/Drain-King-Plumbers/101902936.html",
    "categories": [
      "Sewer Line Inspection",
      "Sewer Contractors",
      "Plumbers & Plumbing Contractors"
    ],
    "services": [
      "Plumbing Repairs",
      "Pipe Replacement",
      "Plumbing Installation",
      "Backwater Valve Installation",
      "Plumbing Fixture Installation",
      "Clogged Drain",
      "Sewer Backup",
      "Drain Cleaning",
      "Sewer Cleaning",
      "Sump Pump Installation",
      "Water Service Upgrade",
      "Waterproofing",
      "Plugged Drain",
      "Trenchless Technology",
      "Camera Inspection",
      "Sewer Line Repair",
      "Drain Snaking",
      "Burst Pipe",
      "Trenchless Drain Repair",
      "Drain Pipe Repair"
    ],
    "address": "100 Saint Regis Crescent, North York, ON M3J 1Y8",
    "street": "100 Saint Regis Crescent",
    "city": "North York",
    "province": "ON",
    "postalCode": "M3J 1Y8",
    "latitude": 43.7550621,
    "longitude": -79.4822464,
    "phone": "647-362-2109",
    "phones": [
      {
        "number": "647-362-2109",
        "label": "Primary"
      }
    ],
    "website": "http://www.drainkingplumbers.ca/",
    "openingHours": {
      "Monday": "00:00-23:59",
      "Tuesday": "00:00-23:59",
      "Wednesday": "00:00-23:59",
      "Thursday": "00:00-23:59",
      "Friday": "00:00-23:59",
      "Saturday": "00:00-23:59",
      "Sunday": "00:00-23:59"
    },
    "rating": 5,
    "reviewCount": 8,
    "description": "Drain King is the premium choice when you're looking for quality craftsmanship, professionalism and superior customer service in the Greater Toronto Area.\nExperienced, licensed plumbing professionals are at your service anytime you need us – 24/7 - Get A Free Quote Drain King Plumbers is a locally-owned, 24/7 full-service plumbing and drain company, serving all of Toronto and the Greater Toronto Area. Industry leaders, licensed and insured, our plumbing experts are always on standby to tackle your plumbing emergency. We provide the best warranties available in the industry and will always do our best to beat a competitor's quote! We would love to serve you as our customer, anytime, any day! Trust us to get the job done right the first time, guaranteed!\n\nQuite often, when you are in need of plumbing services, you don’t have much time to do research and hand-pick the perfect plumbing company. What you need is a plumber who is timely, honest, knowledgeable, experienced and friendly. You need someone who will be able to quickly assess and repair your plumbing mishap AND do it at a reasonable price. At Drain King, we would be honoured to be your plumber. We won’t disappoint you. Whether you need a water heater repair or a drain cleaned out, we promise to provide you with our signature Royal Treatment.",
    "emails": [],
    "socialLinks": [
      {
        "network": "facebook",
        "url": "https://www.facebook.com/drainkingplumbers/"
      },
      {
        "network": "x",
        "url": "http://twitter.com/drainkingGTA"
      }
    ],
    "logo": "https://ssmscdn.yp.ca/image/resize/8bfbcba8-0a3e-48d3-b64b-16df5995779c/yp-serp-thumbnail/1.jpg",
    "isAd": true,
    "searchQuery": "plumber",
    "searchLocation": "Toronto ON",
    "startUrl": "https://www.yellowpages.ca/search/si/1/plumber/Toronto+ON"
  },
  {
    "id": "7937286",
    "name": "The Urban Plumber Inc",
    "url": "https://www.yellowpages.ca/bus/Ontario/Toronto/The-Urban-Plumber-Inc/7937286.html",
    "categories": ["Drainage Contractors", "Plumbers & Plumbing Contractors"],
    "services": [
      "Plumbing",
      "Heating",
      "Back Flow Prevention And Testing",
      "Drain Pipe Repair",
      "Faucet Repair",
      "Frozen Pipe",
      "Leaking Toilet",
      "Burst Pipe",
      "Gas Installation",
      "Clogged Drain",
      "Water Tank Repair",
      "Water Tank Replacement",
      "Boiler Service",
      "Plumbing Contractor",
      "Backwater Valve Installation",
      "Weeping Tile Installation",
      "Pump Repair",
      "Water Service Replacement",
      "Basement Flooding Repairs",
      "Unblocking Drains"
    ],
    "address": "343 Milverton Boulevard, Toronto, ON M4J 1W1",
    "street": "343 Milverton Boulevard",
    "city": "Toronto",
    "province": "ON",
    "postalCode": "M4J 1W1",
    "latitude": 43.685927,
    "longitude": -79.328018,
    "phone": "647-559-9297",
    "phones": [
      {
        "number": "647-559-9297",
        "label": "Primary"
      }
    ],
    "website": "http://theurbanplumber.com/",
    "openingHours": {
      "Monday": "00:00-23:59",
      "Tuesday": "00:00-23:59",
      "Wednesday": "00:00-23:59",
      "Thursday": "00:00-23:59",
      "Friday": "00:00-23:59",
      "Saturday": "00:00-23:59",
      "Sunday": "00:00-23:59"
    },
    "rating": 5,
    "reviewCount": 6,
    "description": "$20 off when you mention you found us on yellowpages. Limited time offer. The Urban Plumber is your plumbing and heating specialist in Toronto. Serving all of the GTA for over 20 years, our skilled, certified and professional technicians are eager to unclog your blocked drain, fix your leaky faucet and more!\n\nThe Urban Plumber is old fashioned service in a modern world. We provide a comprehensive range of heating and plumbing services including the installation, maintenance and repair of potable expansion tanks, water closets, tub and shower valves, bidet faucets, washlet seats, garburators, laundry tubs and much, much more. Our skilled crew is at the ready to serve you 24 hours a day, 7 days a week on an emergency basis. Visit our website to see a full list of services and give us a call today!",
    "emails": [],
    "socialLinks": [
      {
        "network": "facebook",
        "url": "https://www.facebook.com/theurbanplumberinc123"
      }
    ],
    "logo": "https://ssmscdn.yp.ca/image/resize/c41b32a8-ed72-45af-b011-2a37b2ad39ba/yp-serp-video-thumbnail/1.png",
    "isAd": false,
    "searchQuery": "plumber",
    "searchLocation": "Toronto ON",
    "startUrl": "https://www.yellowpages.ca/search/si/1/plumber/Toronto+ON"
  }
]
```

</details>

### 💡 Use cases

- **Local lead generation** — build call and outreach lists of plumbers, dentists, contractors or restaurants in any Canadian city, with phone, website and social profiles.
- **Sales prospecting** — find every business in a category across a province, with its categories and services to qualify the fit.
- **Market mapping** — count and map competitors by city and postal code with coordinates.
- **Data enrichment** — add phone numbers, websites, hours and ratings to a list of Canadian businesses.
- **Quebec and French-language markets** — scrape PagesJaunes.ca for listings in French.

### ❓ FAQ

- **Which pages work?** Searches on yellowpages.ca and pagesjaunes.ca (any keyword, any city), category pages (`/business/...html`, nationally or by province) and single business pages (`/bus/...html`). Sorted or filtered result views are not supported.
- **How many businesses can I get?** A search page shows 35 businesses and the Actor follows every page, so a search such as plumbers in Toronto returns all of its 1,700-plus businesses.
- **Do I need an account or an API key?** No. The Actor reads the same public pages anyone can open.
- **Why is a field `null`?** Yellow Pages only shows what the business published. Service-area businesses often list no street address or map location, and many have no website, hours or ratings.
- **Are emails included?** Only when a business publishes an email address on its page, which is rare: most use Yellow Pages' message form, and the Actor does not collect anything behind a form.
- **What does turning off business details change?** The run is much faster (one request per 35 businesses instead of one per business), but rows only carry the search-page fields: no opening hours, services, social links, labelled phone numbers or full category list.
- **Do I need a proxy?** No. If a run starts getting blocked, set the proxy to Apify's residential group with Canada (`CA`) as the country.

### 🔗 More scrapers by Anyx

- [Yellow Pages Scraper](https://apify.com/anyxsolutions/yellowpages-scraper)
- [Google Maps Email Extractor](https://apify.com/anyxsolutions/google-maps-email-extractor)
- [Google Search Scraper](https://apify.com/anyxsolutions/google-search-scraper)
- [Craigslist Scraper](https://apify.com/anyxsolutions/craigslist-scraper)

### 🤝 Anyx Solutions

We build custom scrapers and data-extraction pipelines.

- Email: tantosthor@gmail.com

### 🖼 Image credit

Image credit: [yellowpages.ca](https://www.yellowpages.ca/)

# Actor input Schema

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

Yellow Pages Canada or PagesJaunes.ca pages: a search such as https://www.yellowpages.ca/search/si/1/plumber/Toronto+ON, a category page such as https://www.yellowpages.ca/business/ON/01030400.html, or a single business page (/bus/...html).

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

What to search for, one search per entry, for example "plumber" or "dentists". Used together with the location below.

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

City and province to search in, for example "Toronto ON" or "Vancouver BC". Applies to every search term.

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

Open every business page for its opening hours, all phone numbers, products and services, full description, social media links and every category. Turn off for a faster run with the search-page fields only.

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

Maximum number of businesses to return per start URL or search term. A search page shows 35 businesses; leave empty to get every page of results.

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

Proxy settings. Yellow Pages Canada works without a proxy; if requests start getting blocked, switch to Apify's residential proxy with Canada as the country.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.yellowpages.ca/search/si/1/plumber/Toronto+ON"
    }
  ],
  "includeDetails": true,
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "startUrls": [
        {
            "url": "https://www.yellowpages.ca/search/si/1/plumber/Toronto+ON"
        }
    ],
    "maxItems": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("anyxsolutions/yellowpages-ca-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 = {
    "startUrls": [{ "url": "https://www.yellowpages.ca/search/si/1/plumber/Toronto+ON" }],
    "maxItems": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("anyxsolutions/yellowpages-ca-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 '{
  "startUrls": [
    {
      "url": "https://www.yellowpages.ca/search/si/1/plumber/Toronto+ON"
    }
  ],
  "maxItems": 5
}' |
apify call anyxsolutions/yellowpages-ca-scraper --silent --output-dataset

```

## MCP server setup

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