{
  "openapi": "3.0.1",
  "info": {
    "title": "Staples Canada Scraper — Prices, Clearance, UPC & Store Stock",
    "description": "Scrape staples.ca products by keyword, category, SKU or URL, or the full catalogue. Prices, sale and clearance flags, UPC and model, ratings, reviews, specs and in-store stock at 300+ Staples stores. Find clearance in stock near any postal code. No login.",
    "version": "0.1",
    "x-build-id": "bqoG735f5x9AFNpoV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yugenox~staples-canada-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yugenox-staples-canada-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/yugenox~staples-canada-scraper/runs": {
      "post": {
        "operationId": "runs-sync-yugenox-staples-canada-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/yugenox~staples-canada-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-yugenox-staples-canada-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",
        "properties": {
          "searchQueries": {
            "title": "🔎 Search terms",
            "type": "array",
            "description": "Keywords to search on staples.ca, e.g. \"printer ink\", \"office chair\", \"laptop\". Each term is scraped separately.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🔗 Staples URLs",
            "type": "array",
            "description": "staples.ca product, category (collection) or search pages, in English or French, e.g. https://www.staples.ca/collections/staplers-6769",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "categories": {
            "title": "🗂️ Categories",
            "type": "array",
            "description": "Category handles — the part after /collections/ in a staples.ca URL, e.g. staplers-6769, office-supplies-189 or staples-clearance-centre-7922. French handles (fr-…) return French listings.",
            "items": {
              "type": "string"
            }
          },
          "skus": {
            "title": "#️⃣ SKUs",
            "type": "array",
            "description": "Staples item numbers (the number at the start of a product URL, e.g. 978269), or full product URLs.",
            "items": {
              "type": "string"
            }
          },
          "scrapeFullCatalog": {
            "title": "📚 Scrape the full catalogue",
            "type": "boolean",
            "description": "Every product on staples.ca in the chosen language (about 125,000). Combine with the filters below, e.g. clearance only. Raise Max items (default 1,000) to about 130000 to get everything.",
            "default": false
          },
          "listStores": {
            "title": "🏬 List stores",
            "type": "boolean",
            "description": "Also save the Staples store list (number, name, address, coordinates). With a location, only the stores within the radius are listed.",
            "default": false
          },
          "location": {
            "title": "📍 Near location (in-store stock)",
            "type": "string",
            "description": "Postal code, city or \"lat,lng\", e.g. M5V 3L9 or Calgary. Keeps only products in stock at a Staples store within the radius below, and adds the stock at each nearby store. With no search terms, browses the whole catalogue (great with Clearance only)."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How far from the location to look for stores.",
            "default": 25
          },
          "storeNumbers": {
            "title": "Store numbers",
            "type": "array",
            "description": "Specific Staples store numbers (from \"List stores\"). Keeps only products in stock at these stores.",
            "items": {
              "type": "string"
            }
          },
          "includeStoreInventory": {
            "title": "Include stock at every store",
            "type": "boolean",
            "description": "Adds the full list of stores that have the item, with quantities (can be ~300 stores per product). Store count and total quantity are always included.",
            "default": false
          },
          "language": {
            "title": "🌐 Language",
            "enum": [
              "en",
              "fr"
            ],
            "type": "string",
            "description": "English or French product listings.",
            "default": "en"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "price_asc",
              "price_desc",
              "best_sellers",
              "new_arrivals",
              "ratings_desc",
              "title_asc"
            ],
            "type": "string",
            "description": "Order of the results (same as the sort menu on staples.ca).",
            "default": "relevance"
          },
          "minPrice": {
            "title": "Min price (CAD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only products at or above this price."
          },
          "maxPrice": {
            "title": "Max price (CAD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only products at or below this price."
          },
          "onSaleOnly": {
            "title": "On sale only",
            "type": "boolean",
            "description": "Only products priced below their regular price.",
            "default": false
          },
          "clearanceOnly": {
            "title": "Clearance only",
            "type": "boolean",
            "description": "Only clearance items.",
            "default": false
          },
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Only these brands, exactly as shown on staples.ca, e.g. HP, Canon, Staples.",
            "items": {
              "type": "string"
            }
          },
          "includeDetails": {
            "title": "Include description, bullet points and specifications",
            "type": "boolean",
            "description": "Adds the product description, feature bullets and the specification table.",
            "default": false
          },
          "maxReviewsPerProduct": {
            "title": "Reviews per product",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Newest customer reviews to include per product (rating, title, text, date, recommended, helpful votes, verified purchase). 0 = none.",
            "default": 0
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of results in total (products + stores). Default 1,000. For the full catalogue set it to about 130000.",
            "default": 1000
          },
          "maxItemsPerSource": {
            "title": "Max items per search term / category",
            "minimum": 1,
            "type": "integer",
            "description": "Cap for each search term, URL or category, so one large source doesn't use up the whole budget."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel requests (1–10).",
            "default": 8
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Apify Proxy (automatic) works well and is the default. Failed requests are retried on fresh IPs automatically, with a residential fallback.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}