# Canadian Tire Public Product Scraper (`codingfrontend/canadiantire-ca-scraper`) Actor

Parses permitted public Canadian Tire product/search pages into typed product records.

- **URL**: https://apify.com/codingfrontend/canadiantire-ca-scraper.md
- **Developed by:** [Coding Frontned](https://apify.com/codingfrontend) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

### What does Canadian Tire Public Product Scraper do?

Canadian Tire Public Product Scraper collects structured product information from public [Canadian Tire Canada](https://www.canadiantire.ca/) search and product pages. It reads public JSON-LD, application JSON, and Next.js state when present, returning public product IDs/SKUs, names, brands, prices, CAD currency, availability, descriptions, product-owned images, ratings, reviews, source URLs, and collection timestamps. It does not log in, use private APIs, solve CAPTCHA, or bypass anti-automation controls.

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

### Input

Use `query` (default `drill`) or multiple `queries`. Compatibility aliases `searchQuery` and `searchKeywords` are merged and deduplicated. Supply public Canadian Tire URLs through `startUrls`, `sourceUrls`, `searchUrls`, `urls`, or `url`; URLs are deduplicated and restricted to `canadiantire.ca` subdomains. An invalid source produces an explicit diagnostic and is not replaced with an unrelated page.

`maxItems` defaults to 10 and is capped at 50; `maxProducts` is an alias. `maxPages` defaults to 1 per source and is capped at 25. The Actor follows a same-host next link when visible and otherwise uses a bounded `page` query fallback while preserving existing query parameters. `sortBy` defaults to website order (`relevance`) and supports `nameAsc`, `priceAsc`, `priceDesc`, `ratingDesc`, and `reviewCountDesc` after collection.

`includeMedia` and `includeDiagnostics` default to `true`. `timeoutSecs`, `requestDelayMs`, `maxRequestRetries`, `maxResponseBytes`, `proxyUrl`, and `proxyConfiguration` are bounded request controls. An explicit HTTP/HTTPS proxy URL is wired to the request transport; credentials and unsupported proxy-only routing are rejected.

`renderJavaScript` is an opt-in, bounded Playwright pass for public search pages whose product cards are rendered in the browser. `renderWaitMs` is capped at 5 seconds. The browser path stays on the supplied Canadian Tire URL and reports redirects, challenges, and empty pages; it never logs in, solves CAPTCHA, or bypasses access controls. Browser-use metrics are written only to `OUTPUT_SUMMARY`, not product rows.

Fixture QA accepts `fixtureHtml` or a relative `fixtureFile`/`fixtureFiles` path inside the Actor directory. Fixture mode makes no live request and is synthetic evidence only. Summary statuses are `SUCCEEDED`, `SUCCEEDED_WITH_DIAGNOSTICS`, `BLOCKED_SOURCE_OR_EMPTY`, and `NO_DATA`; diagnostics never count as products.

Simple run:

```json
{"query":"drill","maxItems":10,"maxPages":1}
```

Fixture-backed local QA:

```json
{"fixtureFile":"qa/canadiantire.html","includeDiagnostics":false,"sortBy":"priceAsc"}
```

### Output

Normal rows contain only public product fields plus `dataType: product`, `sourceDomain`, `sourceUrl`, and `scrapedAt` alongside `productId`, `name`, `brand`, `sku`, `price`, `currency`, `availability`, `description`, `imageUrls`, `productUrl`, `rating`, and `reviewCount`. Runtime, parser, and transport instrumentation is omitted from normal rows. Image URLs are limited to Canadian Tire-owned hosts and deduplicated; page logos, QR codes, payment images, and unrelated UI assets are not selected.

When a public request is blocked or unavailable, the dataset can contain a typed diagnostic row with `recordType`, `diagnosticType`, `sourceUrl`, `url`, `error`, `errorCode`, and `scrapedAt`. `includeDiagnostics:false` omits those rows while preserving operational counts in the canonical `OUTPUT_SUMMARY` key-value record; `OUTPUT` remains a compatibility alias. No product price is inferred from a challenge or empty response.

Example product row:

```json
{
  "productId": "CT-1001",
  "name": "Synthetic Cordless Drill",
  "brand": "Example Tools",
  "sku": "CT-1001",
  "price": 129.99,
  "currency": "CAD",
  "availability": "InStock",
  "productUrl": "https://www.canadiantire.ca/en/pdp/synthetic-cordless-drill-1001.html",
  "sourceUrl": "https://www.canadiantire.ca/en/search-results.html?q=drill",
  "dataType": "product",
  "sourceDomain": "www.canadiantire.ca",
  "scrapedAt": "2026-09-11T00:00:00.000Z"
}
```

Example diagnostic row:

```json
{
  "recordType": "diagnostic",
  "diagnosticType": "no_public_data",
  "sourceUrl": "https://www.canadiantire.ca/en/search-results.html?q=drill",
  "url": "https://www.canadiantire.ca/en/search-results.html?q=drill",
  "errorCode": "PARSE_EMPTY",
  "error": "Canadian Tire returned HTTP 200 but no structured public products were exposed.",
  "scrapedAt": "2026-09-16T00:00:00.000Z"
}
```

### Access boundary and responsible use

The Actor follows only public same-host links and reports Cloudflare, CAPTCHA, redirect, HTTP, timeout, and no-data boundaries without bypass attempts. Respect Canadian Tire terms, robots guidance, rate limits, privacy obligations, and applicable law. Prices, stock, and delivery information are time-sensitive and may vary by region. Apify platform usage and storage costs depend on your plan, runtime, request volume, and retention settings.

### Local validation

From this directory:

```bash
npm install
npm test
npm run lint
npm run validate
apify validate-schema
apify run --purge --input-file qa/input-fixture.json
```

`qa/canadiantire.html` is synthetic fixture data, not a current site capture.

### Support

When reporting an issue, include the input shape without secrets, the `OUTPUT_SUMMARY` status, diagnostic codes, source URL, and whether the run used direct HTTP or the local fixture. Do not include credentials or private customer data.

# Actor input Schema

## `query` (type: `string`):

Public Canadian Tire search terms.

## `queries` (type: `array`):

Additional public Canadian Tire search terms.

## `searchQuery` (type: `string`):

Compatibility alias for one query.

## `searchKeywords` (type: `array`):

Compatibility alias for multiple queries.

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

Optional direct public Canadian Tire URLs.

## `sourceUrls` (type: `array`):

Additional public Canadian Tire URLs.

## `searchUrls` (type: `array`):

Public search URLs merged with startUrls.

## `urls` (type: `array`):

Compatibility alias for public Canadian Tire URLs.

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

One public Canadian Tire URL.

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

Maximum product records to emit.

## `maxProducts` (type: `integer`):

Compatibility alias for maxItems.

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

Bounded pagination budget.

## `sortBy` (type: `string`):

Optional bounded client-side sorting.

## `includeMedia` (type: `boolean`):

Keep product-owned image URLs.

## `renderJavaScript` (type: `boolean`):

Opt in to a bounded headless browser pass for public pages whose product cards are rendered client-side. No login, CAPTCHA solving, or access-control bypass is attempted.

## `renderWaitMs` (type: `integer`):

Bounded wait for public product cards after navigation.

## `includeDiagnostics` (type: `boolean`):

Emit access/empty/request diagnostics in the dataset.

## `timeoutSecs` (type: `integer`):

Maximum time per public request.

## `requestDelayMs` (type: `integer`):

Bounded delay between pages.

## `maxRequestRetries` (type: `integer`):

Retries for transient requests.

## `maxResponseBytes` (type: `integer`):

Reject oversized public responses.

## `userAgent` (type: `string`):

Optional transparent user-agent for the public request.

## `proxyUrl` (type: `string`):

Optional HTTP/HTTPS proxy URL; credentials are rejected.

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

Optional compatibility object containing one explicit proxy URL.

## `fixtureHtml` (type: `string`):

Synthetic HTML used for isolated QA instead of live requests.

## `fixtureFile` (type: `string`):

Relative fixture path inside the Actor directory.

## `fixtureFiles` (type: `array`):

The first safe relative fixture path is used.

## Actor input object example

```json
{
  "query": "drill",
  "queries": [],
  "searchQuery": "",
  "searchKeywords": [],
  "startUrls": [],
  "sourceUrls": [],
  "searchUrls": [],
  "urls": [],
  "url": "",
  "maxItems": 10,
  "maxProducts": 10,
  "maxPages": 1,
  "sortBy": "relevance",
  "includeMedia": true,
  "renderJavaScript": false,
  "renderWaitMs": 5000,
  "includeDiagnostics": true,
  "timeoutSecs": 20,
  "requestDelayMs": 0,
  "maxRequestRetries": 1,
  "maxResponseBytes": 8000000,
  "proxyUrl": "",
  "fixtureHtml": "",
  "fixtureFile": "",
  "fixtureFiles": []
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `runSummary` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("codingfrontend/canadiantire-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("codingfrontend/canadiantire-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 '{}' |
apify call codingfrontend/canadiantire-ca-scraper --silent --output-dataset

```

## MCP server setup

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