{
  "openapi": "3.0.1",
  "info": {
    "title": "Shoppers Drug Mart & Pharmaprix Scraper — Prices & PC Optimum",
    "description": "Shoppers Drug Mart & Pharmaprix products by keyword, category, brand, UPC or the whole ~23,500-product catalogue: price, sale price and end date, every deal, PC Optimum points and offers, online stock count, UPC, ratings, category and images. Store locator included. No login.",
    "version": "0.1",
    "x-build-id": "CLgPgnEJKQEgKSEhp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yugenox~shoppers-drug-mart-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yugenox-shoppers-drug-mart-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~shoppers-drug-mart-scraper/runs": {
      "post": {
        "operationId": "runs-sync-yugenox-shoppers-drug-mart-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~shoppers-drug-mart-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-yugenox-shoppers-drug-mart-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": {
          "searchTerms": {
            "title": "🔎 Search terms",
            "type": "array",
            "description": "Keywords to search, exactly as you would type them on the website, e.g. \"advil\", \"vitamin d\", \"cerave moisturizer\". Each search returns up to ~500 products (the website's own limit) — for more, use categories or the entire catalogue.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "🗂️ Categories",
            "type": "array",
            "description": "Category page URLs (…/c/57127), category numbers, or names: Beauty, Makeup, Skin Care, Hair Care, Fragrance, Personal Care, Health, Vitamins & Supplements, Medicine & Treatments, Baby & Child, Home & Electronics, Electronics, Grocery & Household, Sun Care, Men's. Every product in the category is returned (subject to the per-query limit).",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🔗 Website URLs",
            "type": "array",
            "description": "Paste shoppersdrugmart.ca or pharmaprix.ca links: product pages (…/p/BB_062107004107), category pages (…/c/57127) or search pages (…/search?text=sunscreen).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "upcs": {
            "title": "🏷️ UPCs / product codes",
            "type": "array",
            "description": "Look up specific products by UPC barcode (e.g. 062107004107) — one row per product found. Handy for price and stock monitoring of a fixed list.",
            "items": {
              "type": "string"
            }
          },
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Brand names as shown on the website (e.g. \"Life Brand\", \"CeraVe\", \"L'Oréal Paris\"). On their own they return the brand's whole range; combined with search terms or categories they narrow those results to the brand.",
            "items": {
              "type": "string"
            }
          },
          "fullCatalog": {
            "title": "Entire catalogue",
            "type": "boolean",
            "description": "Scrape every product in the online catalogue (~23,500 at Shoppers Drug Mart, ~22,500 at Pharmaprix). Combine with \"On sale only\" to get every current deal (~4,000 products). Takes about 7–8 minutes.",
            "default": false
          },
          "onlyOnSale": {
            "title": "On sale only",
            "type": "boolean",
            "description": "Keep only products with a sale price or deal right now (percent off, sale price, multi-buy).",
            "default": false
          },
          "onlyPcOptimumOffers": {
            "title": "PC Optimum bonus offers only",
            "type": "boolean",
            "description": "Keep only products with a PC Optimum bonus-points offer right now. With \"On sale only\" also on, a product must match both.",
            "default": false
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "price-asc",
              "price-desc",
              "newest",
              "top-rated"
            ],
            "type": "string",
            "description": "Order in which search and category results are ranked (the \"rank\" field). With a per-query limit, this decides which products you get — e.g. the 50 cheapest.",
            "default": "relevance"
          },
          "maxItemsPerQuery": {
            "title": "Max products per search / category",
            "minimum": 0,
            "type": "integer",
            "description": "Upper limit for each search term and each category. 0 = no limit.",
            "default": 500
          },
          "maxItems": {
            "title": "Max results in total",
            "minimum": 0,
            "type": "integer",
            "description": "Stop the whole run after this many results. 0 = no limit.",
            "default": 0
          },
          "banner": {
            "title": "Store",
            "enum": [
              "shoppers",
              "pharmaprix"
            ],
            "type": "string",
            "description": "Shoppers Drug Mart (rest of Canada) or Pharmaprix (Quebec). They have separate catalogues and prices.",
            "default": "shoppers"
          },
          "language": {
            "title": "Language",
            "enum": [
              "auto",
              "en",
              "fr"
            ],
            "type": "string",
            "description": "Language of product names, descriptions and deal labels. Auto = English for Shoppers Drug Mart, French for Pharmaprix. Search terms work best in the same language.",
            "default": "auto"
          },
          "includeDescription": {
            "title": "Description, ingredients & how to use",
            "type": "boolean",
            "description": "Include the long text fields. No extra requests; switch off for smaller files.",
            "default": true
          },
          "fetchMissingImages": {
            "title": "Fill in missing images",
            "type": "boolean",
            "description": "About a third of products come without an image in the listing; this fetches their product page to get one. Switch off for the fastest entire-catalogue runs.",
            "default": true
          },
          "includeDetails": {
            "title": "Product page details",
            "type": "boolean",
            "description": "Fetch every product's page too: all shades/sizes with their own price and stock, canonical URL, ratings for products the listing has none for, bonus-points text. One extra request per product — slower.",
            "default": false
          },
          "storeLocations": {
            "title": "📍 Store locator",
            "type": "array",
            "description": "Also list the 50 stores nearest each location: a Canadian city (\"Toronto\", \"Montreal\", \"Calgary\"…) or \"latitude,longitude\". Returns address, phone, opening hours and open/closed status. Use the Pharmaprix store for Quebec locations.",
            "items": {
              "type": "string"
            }
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "How many requests run at once.",
            "default": 12
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy works well and is the default. If requests start getting blocked the run switches to residential proxy automatically.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}