# YellowPages.ca Business Scraper — Canadian Leads (`ocrad/yellowpages-canada-scraper`) Actor

Scrape Canadian business listings from any YellowPages.ca or PagesJaunes.ca search: name, phone, full address, website, categories, rating, review count, GPS and opening hours. Lead generation without a browser. Export JSON/CSV/Excel.

- **URL**: https://apify.com/ocrad/yellowpages-canada-scraper.md
- **Developed by:** [Ocrad](https://apify.com/ocrad) (community)
- **Categories:** Lead generation, Agents
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 records

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.ca Business Scraper

***

Canadian Leads Provide any YellowPages.ca (English) or PagesJaunes.ca (French) search URL and get structured business listings across result pages — name, phone, full address, website, categories, rating, review count and GPS coordinates. Built for lead generation and local-business research, no browser needed.

***

#### **📋 Example Output**

```json
{
  "id": "8045023",
  "url": "https://www.yellowpages.ca/bus/Quebec/Laval/Plumteck-Deblocage-Drain/8045023.html",
  "title": "Plumteck Déblocage Drain",
  "phone": "438-604-5815",
  "street": "2700 Av Chicoutimi",
  "city": "Laval",
  "province": "QC",
  "postalCode": "H7E 1B1",
  "address": "2700 Av Chicoutimi, Laval, QC H7E 1B1",
  "website": "http://plumteckdeblocagedrain.ca/",
  "email": null,
  "categories": "Plumbers & Plumbing Contractors",
  "rating": 5,
  "reviewCount": 34,
  "description": "Déblocage de toilette, bain, lavabo - Dégel tuyaux - Renvoi d'égoût - 30 ans d'expérience - Service Rapide / UNBLOCKING: Drain, Bathtub, Sink, Toilet, Pipes Thawing. Fast Service. 30 years experience",
  "openingHours": null,
  "latitude": 45.5979736,
  "longitude": -73.677322,
  "isSponsored": true,
  "language": "en",
  "scrapedAt": "2026-10-28T19:57:47.874Z"
}
```

With `detailedInfo: true` each business page is visited and the record also gets `openingHours` (e.g. `Monday: 12:00 am - 11:59 pm; Tuesday: …`), the **full description**, the website even when the search card hides it, the e-mail address in the rare cases a business publishes one, and the business's own category list.

#### ⚙️ **Configuration**

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `url` | String | *(required)* | YellowPages.ca or PagesJaunes.ca search URL, e.g. `https://www.yellowpages.ca/search/si/1/Plumbers/Toronto+ON`. |
| `maxPages` | Integer | `1` | Number of result pages to scrape (1–500, up to 35 businesses each). The actor stops by itself at the last page. |
| `detailedInfo` | Boolean | `false` | Visit each business page for opening hours, full description, e-mail and categories. |
| `proxyConfiguration` | Object | Apify Proxy (auto) | Proxy settings; switch to RESIDENTIAL if blocked. |

##### Example Input

```json
{
  "url": "https://www.yellowpages.ca/search/si/1/Plumbers/Toronto+ON",
  "maxPages": 3,
  "detailedInfo": false
}
```

##### Getting your search URL

1. Open YellowPages.ca (or PagesJaunes.ca for French results) and search for a business type and a city/province
2. Copy the full URL from your browser address bar — it looks like `/search/si/1/<what>/<where>`
3. Paste it as the `url` input. The actor rewrites the page number in the URL to walk through the result pages.

Sponsored listings that the site repeats on a page are returned once (`isSponsored: true`). `language` is `en` for yellowpages.ca and `fr` for pagesjaunes.ca.

***

#### 💬 **Support and Feedback**

Reach out via Apify support channels or leave feedback on the Actor's page.

#### **Is it legal to scrape YellowPages.ca data?**

It is legal to scrape publicly available business directory data such as business names, phone numbers, addresses and ratings — these are business contact details published for the purpose of being found. Some records may still contain personal data (e.g. a sole proprietor's name, an e-mail address or reviewer names); scrape and use personal data only with a legitimate reason and in line with PIPEDA, Quebec's Law 25 and anti-spam rules (CASL) when contacting leads. Consult your legal advisor if unsure.

# Actor input Schema

## `url` (type: `string`):

A YellowPages.ca (English) or PagesJaunes.ca (French) search results URL, e.g. https://www.yellowpages.ca/search/si/1/Plumbers/Toronto+ON. Build it by searching on the site and copying the address bar.

## `maxPages` (type: `integer`):

How many result pages to scrape (up to 35 businesses each). Pagination follows the /search/si/{page}/ path segment; the actor stops early at the last page.

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

Visit each business page (/bus/...) for opening hours, full description, website, e-mail when shown and categories. One extra request per business.

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

Defaults to Apify Proxy (auto). Switch to RESIDENTIAL only if results are empty.

## Actor input object example

```json
{
  "url": "https://www.yellowpages.ca/search/si/1/Plumbers/Toronto+ON",
  "maxPages": 1,
  "detailedInfo": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `id` (type: `string`):

YellowPages listing ID

## `url` (type: `string`):

Business page URL

## `title` (type: `string`):

Business name

## `phone` (type: `string`):

Primary phone number

## `street` (type: `string`):

Street address

## `city` (type: `string`):

City

## `province` (type: `string`):

Province code (e.g. ON, QC)

## `postalCode` (type: `string`):

Postal code

## `address` (type: `string`):

Full address

## `website` (type: `string`):

Business website

## `email` (type: `string`):

E-mail address when shown on the business page (detailed mode)

## `categories` (type: `string`):

Directory categories, comma separated

## `rating` (type: `string`):

Average rating out of 5

## `reviewCount` (type: `string`):

Number of ratings

## `description` (type: `string`):

Business description (teaser on search pages, full text in detailed mode)

## `openingHours` (type: `string`):

Opening hours per day (detailed mode)

## `latitude` (type: `string`):

Latitude

## `longitude` (type: `string`):

Longitude

## `isSponsored` (type: `string`):

True when the listing is marked as an ad

## `language` (type: `string`):

en (yellowpages.ca) or fr (pagesjaunes.ca)

## `scrapedAt` (type: `string`):

ISO 8601 timestamp when the record was scraped

# 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 = {
    "url": "https://www.yellowpages.ca/search/si/1/Plumbers/Toronto+ON",
    "maxPages": 1,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("ocrad/yellowpages-canada-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 = {
    "url": "https://www.yellowpages.ca/search/si/1/Plumbers/Toronto+ON",
    "maxPages": 1,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("ocrad/yellowpages-canada-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 '{
  "url": "https://www.yellowpages.ca/search/si/1/Plumbers/Toronto+ON",
  "maxPages": 1,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call ocrad/yellowpages-canada-scraper --silent --output-dataset

```

## MCP server setup

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