{
  "openapi": "3.0.1",
  "info": {
    "title": "SAQ Scraper — Quebec Wine & Spirits Prices, Sales & Store Stock",
    "description": "Scrape the SAQ (saq.com) catalogue: wine, spirits, beer and cider with prices, sales, bonus points, UPC, producer, import agent, grapes, tasting notes, ratings and store-level stock with quantities. Search, categories, SAQ codes or nearest stores. English or French, no login.",
    "version": "0.1",
    "x-build-id": "dYvAB0sDhBgmnqifk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yugenox~saq-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yugenox-saq-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~saq-scraper/runs": {
      "post": {
        "operationId": "runs-sync-yugenox-saq-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~saq-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-yugenox-saq-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": {
          "mode": {
            "title": "🧭 What to scrape",
            "enum": [
              "products",
              "stores"
            ],
            "type": "string",
            "description": "Products: wine, spirits, beer, cider… with prices and stock. Stores: the SAQ store directory (address, phone, hours, services, GPS), optionally only the stores nearest to a location.",
            "default": "products"
          },
          "searchTerms": {
            "title": "🔍 Search terms",
            "type": "array",
            "description": "Keywords, exactly like the saq.com search box: a grape (merlot), a product (gin, rosé), a producer or brand (Tanqueray), a region (Rioja)… Each term runs its own search.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "🗂️ Categories",
            "type": "array",
            "description": "Category names or paths, in English or French: \"Red wine\", \"vin blanc\", \"Spirit\", products/spirit/gin, produits/biere… Every product in the category is listed (combine with the filters below).",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🔗 saq.com URLs",
            "type": "array",
            "description": "Paste saq.com pages: a category (https://www.saq.com/en/products/wine/red-wine), a search (https://www.saq.com/en/catalogsearch/result/?q=merlot) or a product (https://www.saq.com/en/11184968).",
            "items": {
              "type": "string"
            }
          },
          "skus": {
            "title": "🏷️ SAQ codes",
            "type": "array",
            "description": "Look up specific products by their SAQ code (the number in the product URL, e.g. 11184968). Ideal for daily price and stock tracking of a watch-list.",
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "🌐 Language",
            "enum": [
              "en",
              "fr"
            ],
            "type": "string",
            "description": "Language of names, product types, countries and tasting notes. Category paths and names are translated automatically.",
            "default": "en"
          },
          "availability": {
            "title": "📦 Availability",
            "enum": [
              "any",
              "inStock",
              "online",
              "inStore"
            ],
            "type": "string",
            "description": "Only products that can be bought online, in stores, or either.",
            "default": "any"
          },
          "onSaleOnly": {
            "title": "💸 On sale only",
            "type": "boolean",
            "description": "Only products with a current SAQ rebate (price below the regular price).",
            "default": false
          },
          "minPrice": {
            "title": "Minimum price ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest price, in Canadian dollars."
          },
          "maxPrice": {
            "title": "Maximum price ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest price, in Canadian dollars (inclusive)."
          },
          "countries": {
            "title": "🌍 Countries of origin",
            "type": "array",
            "description": "Only products from these countries, spelled as on saq.com in the chosen language (English: Italy, France, United States… French: Italie, France, États-Unis…).",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "📍 Location",
            "type": "string",
            "description": "A Canadian postal code (H2X 1Y4), a city (Sherbrooke, QC) or \"latitude,longitude\". Used to find the nearest stores, and to sort each product's store stock by distance."
          },
          "nearestStores": {
            "title": "🏬 Nearest stores",
            "minimum": 0,
            "maximum": 400,
            "type": "integer",
            "description": "Products mode: only products in stock at the N stores nearest to the location. Stores mode: list only the N nearest stores. 0 = off.",
            "default": 0
          },
          "storeIds": {
            "title": "🏪 Store IDs",
            "type": "array",
            "description": "Only products in stock at any of these stores (5-digit SAQ store IDs, e.g. 23134 — run the Stores mode to get them).",
            "items": {
              "type": "string"
            }
          },
          "includeStoreInventory": {
            "title": "🔢 Include store quantities",
            "type": "boolean",
            "description": "Add the stores holding each product with the exact quantity on hand, address, phone and distance (nearest first). One extra request per product — billed per store row.",
            "default": false
          },
          "maxStoresPerProduct": {
            "title": "Stores per product",
            "minimum": 1,
            "maximum": 400,
            "type": "integer",
            "description": "How many stores (nearest first) to list per product when store quantities are included.",
            "default": 10
          },
          "maxItems": {
            "title": "🔢 Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of products (or stores) for the whole run. Leave empty for no limit — the full SAQ catalogue is about 26,700 products."
          },
          "maxItemsPerQuery": {
            "title": "Max results per search / category",
            "minimum": 1,
            "type": "integer",
            "description": "Cap for each individual search term, category or URL. Leave empty for no per-query limit."
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many requests run at the same time.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy is recommended (automatic selection works well).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}