{
  "openapi": "3.0.1",
  "info": {
    "title": "Canadian Tire Scraper - Products, Prices, Stock & Ratings",
    "description": "Scrape Canadian Tire (canadiantire.ca) products by keyword, category or URL. Extract prices, sale prices, ratings, specifications, images, fulfilment options and stock availability. Supports incremental tracking (NEW, UPDATED, REAPPEARED, EXPIRED), resume and MCP export.",
    "version": "0.1",
    "x-build-id": "yY2mSl7nr77swbN25"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abotapi~canadian-tire-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abotapi-canadian-tire-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/abotapi~canadian-tire-scraper/runs": {
      "post": {
        "operationId": "runs-sync-abotapi-canadian-tire-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/abotapi~canadian-tire-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-abotapi-canadian-tire-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "url"
            ],
            "type": "string",
            "description": "Choose 'search' to run keyword searches. Choose 'url' to paste search, category or product links.",
            "default": "search"
          },
          "searchTerms": {
            "title": "Search keywords",
            "type": "array",
            "description": "One or more keywords to search on canadiantire.ca, for example 'drill' or 'patio set'. Each keyword is searched separately and walked page by page.",
            "default": [
              "drill"
            ],
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "top_deals",
              "best_seller",
              "price_low",
              "price_high",
              "ratings_high",
              "newest"
            ],
            "type": "string",
            "description": "The storefront's own sort order for search and category results.",
            "default": "relevance"
          },
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Optional. Keep only products from these brands, exactly as the storefront spells them (for example 'DEWALT', 'Mastercraft'). Several brands are combined as 'any of these'.",
            "items": {
              "type": "string"
            }
          },
          "onSaleOnly": {
            "title": "On sale only",
            "type": "boolean",
            "description": "Optional. Keep only products currently carrying a store promotion (sale) flag.",
            "default": false
          },
          "inStockAtStoreOnly": {
            "title": "In stock at my store only",
            "type": "boolean",
            "description": "Optional. Keep only products the storefront reports as available at the store used for this run (see Store number below).",
            "default": false
          },
          "minRating": {
            "title": "Minimum customer rating",
            "enum": [
              "any",
              "4",
              "3"
            ],
            "type": "string",
            "description": "Optional. Keep only products rated at or above this number of stars; each returned row is checked against the number.",
            "default": "any"
          },
          "minPrice": {
            "title": "Minimum price (CAD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Only keep products priced at or above this amount."
          },
          "maxPrice": {
            "title": "Maximum price (CAD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Only keep products priced at or below this amount."
          },
          "urls": {
            "title": "Links to read",
            "type": "array",
            "description": "Paste canadiantire.ca links: a search-results link (/en/search-results.html?q=...), a category link (/en/cat/.../<id>.html), a product link (/en/pdp/...html), a store-locator link (/api/v1/store/v2/stores?...), a single-store link (/api/v1/store/store/<id>), or the matching API links. French-localized links (lang=fr_CA) are read too.",
            "default": [
              "https://www.canadiantire.ca/en/search-results.html?q=drill",
              "https://www.canadiantire.ca/api/v1/search/v2/search?q=drill&store=452",
              "https://www.canadiantire.ca/en/cat/tools-hardware/power-tools-DC0001707.html",
              "https://www.canadiantire.ca/api/v1/category/api/v1/categories/DC0001707?lang=en_CA",
              "https://www.canadiantire.ca/en/pdp/black-decker-bdc120vaca-cordless-drill-with-battery-charger-and-100-pc-accessory-set-20v-3-8-in-0543199p.html",
              "https://www.canadiantire.ca/api/v1/product/api/v2/product/productFamily/0543199p?baseStoreId=CTR&lang=en_CA&storeId=452&light=true",
              "https://www.canadiantire.ca/api/v1/search/v2/search?q=drill&store=452&lang=fr_CA",
              "https://www.canadiantire.ca/api/v1/store/v2/stores?maxCount=5&language=en_CA&banner=CTR",
              "https://www.canadiantire.ca/api/v1/store/store/452?lang=en_CA"
            ],
            "items": {
              "type": "string"
            }
          },
          "fetchDetails": {
            "title": "Fetch product details",
            "type": "boolean",
            "description": "Read each product's own page to add the full description, specifications, every image, fulfillment detail, warranty and manual links. Charged once per record enriched. Turn off for a faster, cheaper listing-level pull.",
            "default": true
          },
          "storeId": {
            "title": "Store number",
            "type": "string",
            "description": "The canadiantire.ca store number used to price and check stock context for every request (the catalog itself is the same nationwide; price and stock context are store-specific). Leave as the default unless you know your store's number.",
            "default": "452"
          },
          "maxPages": {
            "title": "Max result pages per keyword or link",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Defaults to unlimited (0 = walk every page the storefront offers for that search). This field does NOT cap the run on its own; it defers entirely to Max items below. With the default of 0, pages keep walking until Max items is reached, the storefront's own last page is hit, or a page returns nothing new. Only set this if you want to stop earlier than Max items would, at a specific page depth.",
            "default": 0
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "THE cap on this run: the maximum number of records returned across the whole run, regardless of Max result pages above. Defaults to 20 so a first run is fast and cheap. Use 0 for unlimited.",
            "default": 20
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave this on the default (Automatic) for most runs; it is the measured, recommended choice and works on every plan.",
            "default": {
              "useApifyProxy": true
            }
          },
          "resumeFromRunId": {
            "title": "Resume from a previous run",
            "type": "string",
            "description": "Paste a previous run ID or dataset ID to continue a large crawl without returning or charging for products already collected there. For recurring monitoring of the same search, use Incremental mode below instead."
          },
          "incrementalMode": {
            "title": "Incremental changes for scheduled runs",
            "type": "boolean",
            "description": "Turn this on for daily or recurring monitoring. The first run returns every matching product as NEW. Later runs normally return only NEW, UPDATED and REAPPEARED products. State is kept separately for each search term, link, filter and detail setup; use State key when you want to name or deliberately share a monitoring campaign.",
            "default": false
          },
          "stateKey": {
            "title": "State key (optional, incremental mode only)",
            "type": "string",
            "description": "Optional. Name this monitoring campaign to keep its state stable, or to deliberately share state across differently configured runs. Leave empty to derive a key automatically from this run's search and filter setup."
          },
          "changeScope": {
            "title": "What counts as a change (incremental mode only)",
            "enum": [
              "all",
              "priceAndStock"
            ],
            "type": "string",
            "description": "'Price and stock only' compares just price, sale status and fulfillment; a specification, image or badge change is treated as UNCHANGED and is never returned or billed as UPDATED. 'All fields' compares the whole record.",
            "default": "all"
          },
          "compactUpdates": {
            "title": "Compact UPDATED rows (incremental mode only)",
            "type": "boolean",
            "description": "When on, an UPDATED row carries only identifiers plus the price/stock fields that actually moved (priceChanges, variantChanges), instead of the full record. Off by default.",
            "default": false
          },
          "expireAfterMissedScans": {
            "title": "Missed scans before EXPIRED (incremental mode only)",
            "minimum": 1,
            "type": "integer",
            "description": "A tracked product absent from this many consecutive complete scans in a row is marked EXPIRED; fewer misses are held over without being reported. 1 (default) expires on the first miss, matching this actor's previous behaviour.",
            "default": 1
          },
          "emitUnchanged": {
            "title": "Emit unchanged products (incremental mode only)",
            "type": "boolean",
            "description": "Off by default. Turn on to also return products that have not changed since the last run, marked UNCHANGED. This returns, and bills, extra rows you already have.",
            "default": false
          },
          "emitExpired": {
            "title": "Emit expired products (incremental mode only)",
            "type": "boolean",
            "description": "Off by default. Turn on to also return products that were present in a previous run but are no longer found, marked EXPIRED. Only produced once a run has fully scanned the tracked search, never when Max items capped it or when Resume was used. This returns, and bills, extra synthetic rows.",
            "default": false
          },
          "ignoreFieldsForChanges": {
            "title": "Ignore fields when detecting changes (incremental mode only)",
            "type": "array",
            "description": "Optional. Field names that must NOT count as a change in incremental mode, for example \"badges\" or \"lowStockThreshold\". A product whose only differences are in these fields is treated as UNCHANGED, so it is not returned or billed as UPDATED. Names match at any nesting depth. The fields still appear in the output of rows that are returned.",
            "items": {
              "type": "string"
            }
          },
          "mcpConnectors": {
            "title": "Pipe results into your apps (optional)",
            "type": "array",
            "description": "Optionally send results into the apps you already use, via Model Context Protocol (MCP) connectors. Authorize one under Apify, Settings, API & Integrations, then select it here. Notion gets a rich page-per-item export; other connectors get a best-effort write or digest. Leave empty to skip; this never changes the dataset output. Supported: Notion (https://mcp.notion.com/mcp), Linear (https://mcp.linear.app/sse), Airtable (https://mcp.airtable.com/mcp), Apify (https://mcp.apify.com)."
          },
          "notionParentPageUrl": {
            "title": "Notion parent page (Notion connector only)",
            "type": "string",
            "description": "URL or id of the Notion page under which item pages are created. Required to enable the Notion export; ignored by other connectors."
          },
          "maxNotifyListings": {
            "title": "Max items to export per connector",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on items written to each connector per run. Does not affect the dataset.",
            "default": 50
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}