This tutorial shows how to scrape YellowPages.ca data into a CSV using the YellowPages Canada Scraper template for UScraper. You will import the workflow, add approved business detail URLs, choose an export folder, and validate the fields.
Before you start
Prerequisites and policy checks
You need UScraper installed as a local desktop app, a short list of allowed YellowPages.ca business detail URLs, and a folder where the CSV can be written. Start with five to ten records so selector, prompt, and export issues are easy to spot.
YellowPages.ca is a business directory for Canadian companies, products, services, addresses, phone numbers, websites, and reviews. Before automation, review the current YellowPages.ca site, robots.txt, and terms of use.
Compliance first: use pages you have permission to access, keep pacing modest, do not bypass CAPTCHA or access controls, and keep the source URL beside every exported row.
Workflow anatomy
What the YellowPages Canada scraper template does
The companion JSON is deliberately simple: Navigate -> Wait for Page Load -> Wait for Element -> Element Exists -> Structured Export -> Sleep -> Loop Continue. Navigate contains sample supermarket detail URLs, waits let the body render, and the condition block checks for a business detail container before exporting.
The template page is the download path. Use it instead of rebuilding blocks by hand, because the JSON preserves the branches, selectors, append mode, and export filename.
{
"fileName": "yellow-pages-canada-scraper-product-listing.csv",
"rowSelector": ".page__container[itemtype='http://schema.org/LocalBusiness']",
"loop": "navigate.urls",
"validPageCheck": ".page__container[itemtype='http://schema.org/LocalBusiness'], h1 .merchantName, .merchantName"
}
The workflow is a detail-page extractor. Add business profile URLs from approved research, a separate discovery step, or a carefully reviewed source list.
Runbook
How to scrape YellowPages.ca listings to CSV
Import the scraper template
Open the YellowPages Canada Scraper template, download the JSON, and import it into UScraper.
Replace sample URLs
In Navigate, replace or extend the sample supermarket pages with approved YellowPages.ca business detail URLs.
Keep the validation branch
Leave the waits and Element Exists check in place so non-detail pages do not create misleading blank rows.
Set the export path
In Structured Export, confirm the filename, append mode, headers, and project-specific save folder.
Run one record, then batch
Run a single URL, open the CSV, compare it against the browser, then run the remaining URLs only after the core fields look correct.
After the first run, sort by detail_url. One valid detail URL should create one row. Duplicate rows usually mean a repeated URL or a resumed loop.
Output
What the YellowPages Canada CSV includes
yellow-pages-canada-scraper-product-listing.csvColumn
keyword
The URL what parameter, such as supermarket.
Column
location
The URL where parameter, such as Canada.
Column
business_name
Business name from the merchant heading.
Column
detail_url
The exact URL opened during the run.
Column
canonical_url
Canonical business URL when exposed.
Column
address
Visible address text.
Column
telephone
Primary visible phone number.
Column
website_url
Outbound website link when present.
Column
rating
Rating value or label when present.
Column
description
Business description when available.
| Column group | Fields | Validation note |
|---|---|---|
| Query context | keyword, location | Useful when the URL includes what and where. |
| Business identity | business_name, detail_url, canonical_url | Keep both detail and canonical URLs for dedupe and audit trails. |
| Address fields | address, city, province, postal_code | Some profiles expose parts; others only expose visible text. |
| Contact and category | telephone, website_url, website_text, category | Verify before outreach or CRM import. |
| Trust and notes | rating, rating_count, current_status, editors_pick, description | Treat blanks as normal unless the live page visibly contains the missing field. |
The bundled JSON export is the authoritative workflow definition. It sets includeHeaders to true, uses append mode, and writes to a local save location you should update.
Validation
Validate the export before using the data
Treat QA as part of scraping. Open the CSV beside the browser and inspect records from the beginning, middle, and end of the run.
| Symptom | Likely cause | Fix |
|---|---|---|
Empty business_name | Invalid detail URL or unfinished page render. | Reopen the URL, handle prompts, then rerun it. |
Blank telephone | No phone field, or a selector missed a layout variant. | Update only if the field is visible. |
Missing website_url | No website is listed, or the link is in another module. | Keep blank unless the profile shows a website. |
Wrong keyword or location | The URL does not contain what or where parameters. | Add context columns manually or rebuild detail URLs with consistent query parameters. |
| Many blank rows | The loop includes search pages, blocked pages, or unavailable profiles. | Use business detail URLs and keep Element Exists enabled. |
Alternatives
YellowPages.ca scraper alternatives and trade-offs
Hosted marketplaces such as Apify, Octoparse, GetOdata, and WebAutomation publish YellowPages.ca scraper or extractor pages for teams that prefer cloud jobs, scheduled infrastructure, or vendor-managed execution. Open-source Python projects can help developers who prefer code.
UScraper fits supervised local CSV work, visible browser QA, no-code selector edits, and a workflow your team can inspect before each run. If you are comparing the best YellowPages.ca scraper for a research export, decide whether data custody and local review matter more than managed cloud scale.
FAQ
YellowPages.ca scraping FAQ
YellowPages.ca business pages may be publicly visible, but automated collection can still be limited by terms, robots rules, privacy law, database rights, and marketing regulations. Review the current policy pages, use modest pacing, and avoid bypassing access controls.
Next step
Download the YellowPages Canada scraper template
When you are ready to run the tutorial, download the JSON from YellowPages Canada Scraper for CSV Export and keep this guide open for validation. For related workflows, browse the UScraper template library or the UScraper blog.

