{
  "openapi": "3.0.1",
  "info": {
    "title": "Canada Computers & Memory Express Stock & Price Scraper",
    "description": "PC parts prices and per-store stock from Canada Computers and Memory Express: price, sale price, UPC, MPN, specs, and exact units at every store. Search, category or product URLs. Changes-only mode returns just restocks, sell-outs and price changes for scheduled GPU/CPU alerts.",
    "version": "0.1",
    "x-build-id": "feDP1nnZJv79aSaDt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yugenox~canada-pc-parts-stock-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yugenox-canada-pc-parts-stock-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~canada-pc-parts-stock-scraper/runs": {
      "post": {
        "operationId": "runs-sync-yugenox-canada-pc-parts-stock-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~canada-pc-parts-stock-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-yugenox-canada-pc-parts-stock-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, e.g. \"rtx 5070\", \"ddr5 ram\", \"4tb nvme\". Each term is searched separately on every store selected below. A UPC or a Memory Express item number (MX…) returns that exact product.",
            "items": {
              "type": "string"
            }
          },
          "retailers": {
            "title": "🏬 Stores to search",
            "type": "array",
            "description": "Which stores the search terms run on. Memory Express pages load more slowly (about 3–50 s each), so it is off unless you tick it. URLs below always run on the store they belong to.",
            "items": {
              "type": "string",
              "enum": [
                "canadacomputers",
                "memoryexpress"
              ],
              "enumTitles": [
                "Canada Computers",
                "Memory Express"
              ]
            },
            "default": [
              "canadacomputers"
            ]
          },
          "startUrls": {
            "title": "🔗 Canada Computers / Memory Express URLs",
            "type": "array",
            "description": "Search result, category or product pages from canadacomputers.com or memoryexpress.com, e.g. https://www.canadacomputers.com/en/931/desktop-computers, https://www.memoryexpress.com/Category/VideoCards or a product page. Product URLs are ideal for watching a fixed list of items.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItemsPerQuery": {
            "title": "🔢 Max products per search / URL",
            "minimum": 0,
            "type": "integer",
            "description": "How many products to take from each search term or listing URL (in the store's own order). 0 = all results.",
            "default": 100
          },
          "maxItems": {
            "title": "Max products in total",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on products for the whole run. 0 = no cap.",
            "default": 0
          },
          "sortBy": {
            "title": "↕️ Sort",
            "enum": [
              "relevance",
              "priceLowToHigh",
              "priceHighToLow",
              "bestSelling",
              "topRated"
            ],
            "type": "string",
            "description": "Order of search and category results (matters when you cap the number of products). \"Top rated\" applies to Canada Computers only.",
            "default": "relevance"
          },
          "includeStoreInventory": {
            "title": "📦 Include per-store stock",
            "type": "boolean",
            "description": "Adds a stores list to every Canada Computers product: exact units at each of its ~42 stores (new, open-box and demo), with store address, phone and coordinates. Free: it comes with the search results. Turn off for smaller, price-only rows.",
            "default": true
          },
          "memoryExpressStoreInventory": {
            "title": "📦 Memory Express per-store stock",
            "type": "boolean",
            "description": "Also fetch each Memory Express product page to get availability at all its stores (exact counts up to 9, then \"10+\"), plus the manufacturer part number and sale end date. One extra page per product (billed as a Memory Express store stock event), so it is slower. Search results alone include price, UPC and brand. Memory Express product URLs and exact UPC / item-number searches always include store stock, because they load the product page anyway.",
            "default": false
          },
          "maxMemoryExpressProductPages": {
            "title": "Max Memory Express product pages",
            "minimum": 0,
            "type": "integer",
            "description": "Upper limit on Memory Express product pages fetched for store stock in one run. Products beyond it are returned without store stock. 0 = no limit.",
            "default": 100
          },
          "storeFilter": {
            "title": "📍 Only these stores",
            "type": "array",
            "description": "Keep only matching stores in each product's stock list. Use store codes (e.g. KI), cities (e.g. Toronto, Calgary), store names, or provinces (ON, Alberta). Leave empty for all stores.",
            "items": {
              "type": "string"
            }
          },
          "hideOutOfStockStores": {
            "title": "Hide stores with no stock",
            "type": "boolean",
            "description": "Drop stores with zero units from each product's stock list (the counts still cover all selected stores).",
            "default": false
          },
          "onlyInStock": {
            "title": "✅ Only in-stock products",
            "type": "boolean",
            "description": "Skip products that are not in stock at any selected store or online. With a store filter, a product must be in stock at one of those stores.",
            "default": false
          },
          "onlyOnSale": {
            "title": "🏷️ Only products on sale",
            "type": "boolean",
            "description": "Skip products that are at their regular price (a mail-in rebate also counts as a deal).",
            "default": false
          },
          "minPrice": {
            "title": "Min price ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Only products at or above this price (CAD)."
          },
          "maxPrice": {
            "title": "Max price ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Only products at or below this price (CAD)."
          },
          "outputMode": {
            "title": "📄 Output layout",
            "enum": [
              "product",
              "productStore"
            ],
            "type": "string",
            "description": "One row per product with a stores list, or one row per product and store (easier for spreadsheets and alerts).",
            "default": "product"
          },
          "changesOnly": {
            "title": "🔔 Only changes since the last run",
            "type": "boolean",
            "description": "For scheduled monitoring: return only products whose price or stock changed since the previous run with the same settings (restocks, sell-outs, price drops/increases, quantity changes). Each row gets changeTypes and a changes list. The first run records a baseline and returns everything, marked \"new\". Products checked but not returned are billed at the lower Product checked rate.",
            "default": false
          },
          "monitorId": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional. Runs with the same monitor name share one baseline, even if you edit the search terms. Leave empty to key the baseline on the settings."
          },
          "concurrency": {
            "title": "Parallel requests per store",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many pages to fetch at once from each store.",
            "default": 4
          },
          "_noUnblocker": {
            "title": "Run without the UNBLOCKER proxy",
            "type": "boolean",
            "description": "Internal (canaries): behave exactly like an account without the UNBLOCKER proxy group.",
            "default": false
          },
          "_noResidential": {
            "title": "Run as an account without residential proxies",
            "type": "boolean",
            "description": "Internal (canaries): behave exactly like an account without the RESIDENTIAL proxy group.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}