{
  "openapi": "3.0.1",
  "info": {
    "title": "Princess Auto Scraper — Prices, Clearance & Store Stock",
    "description": "Scrape Princess Auto (Canada) by search, category, URL or item number: prices, clearance, Hot Buys and sales, plus stock at every store and online. Optional UPC, MPN, specs, weight and live stock check. Whole catalogue in about 2 minutes.",
    "version": "0.1",
    "x-build-id": "B2vPDDA3qyS0wulwI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yugenox~princess-auto-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yugenox-princess-auto-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~princess-auto-scraper/runs": {
      "post": {
        "operationId": "runs-sync-yugenox-princess-auto-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~princess-auto-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-yugenox-princess-auto-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 like the search box on princessauto.com (e.g. \"drill\", \"air compressor\", \"trailer hitch\"). Each term runs its own search.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "🗂️ Categories",
            "type": "array",
            "description": "Category names, paths or numbers: \"Hand Tools\", \"Trailer\", \"Air and Power > Compressors\", \"Welding\", or \"9718\" (the number in a /category/ URL). A department with more than 10,000 products is split into sub-categories automatically.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🔗 Princess Auto URLs",
            "type": "array",
            "description": "Pages from princessauto.com: search results (/en/search?q=…), categories (/en/category/9718 or /en/air-and-power/…), Clearance (/en/clearance), Hot Buys (/en/hot-buy), brand pages (/en/brands/powerfist/1676) and product pages (/en/product/…).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "skus": {
            "title": "🏷️ Item numbers",
            "type": "array",
            "description": "Specific products to track: the 7-digit item number shown on the product page (e.g. 8634669) or the product code (e.g. PA1000002512, returns every variation). Great for daily price and stock monitoring.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "🔢 Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum rows across the whole run. 0 = no limit. If you leave search terms, categories, URLs and item numbers all empty, the actor scrapes the whole catalogue (about 38,000 variations), or only the deals you tick below.",
            "default": 1000
          },
          "maxItemsPerQuery": {
            "title": "🔢 Max results per search / category / URL",
            "minimum": 0,
            "type": "integer",
            "description": "Cap for each individual search term, category or URL. 0 = no per-query limit.",
            "default": 0
          },
          "clearanceOnly": {
            "title": "🏷️ Clearance only",
            "type": "boolean",
            "description": "Only clearance items. With no search terms or categories, this scrapes the whole Clearance section.",
            "default": false
          },
          "hotBuyOnly": {
            "title": "🔥 Hot Buys only",
            "type": "boolean",
            "description": "Only Hot Buy items.",
            "default": false
          },
          "onSaleOnly": {
            "title": "💲 On sale only",
            "type": "boolean",
            "description": "Only items currently on sale.",
            "default": false
          },
          "newArrivalsOnly": {
            "title": "✨ New arrivals only",
            "type": "boolean",
            "description": "Only items flagged as new arrivals.",
            "default": false
          },
          "stores": {
            "title": "📍 Stores",
            "type": "array",
            "description": "Stores you care about: store name (\"Mississauga\", \"Winnipeg East\"), city (\"Calgary\" = both Calgary stores), province (\"ON\", \"Quebec\") or store number (\"71\"). Each row then shows stock at these stores. Leave empty for all 60 stores.",
            "items": {
              "type": "string"
            }
          },
          "inStockOnly": {
            "title": "✅ In stock only",
            "type": "boolean",
            "description": "Only items in stock at the stores above (or, with no stores given, in stock at any store or online).",
            "default": false
          },
          "brands": {
            "title": "🏭 Brands",
            "type": "array",
            "description": "Only these brands, e.g. \"Powerfist\", \"DEWALT\", \"Makita\" (not case-sensitive).",
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Min price (CAD)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest price to include, in dollars."
          },
          "maxPrice": {
            "title": "Max price (CAD)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest price to include, in dollars."
          },
          "sort": {
            "title": "↕️ Sort",
            "enum": [
              "auto",
              "newest",
              "oldest",
              "priceLowHigh",
              "priceHighLow",
              "rating",
              "relevance"
            ],
            "type": "string",
            "description": "Order of results. \"Best match\" returns the most relevant search results first and still collects every result when you ask for more than one page. Price sorts use each product's lowest price.",
            "default": "auto"
          },
          "storeInventory": {
            "title": "📦 Store stock in each row",
            "enum": [
              "inStock",
              "all",
              "none"
            ],
            "type": "string",
            "description": "How much per-store stock to include. Every row always has online stock, the number of stores that have it and the total store quantity.",
            "default": "inStock"
          },
          "splitVariants": {
            "title": "One row per variation",
            "type": "boolean",
            "description": "On: every size/variation is its own row with its own item number, price and stock (recommended). Off: one row per product with a \"variants\" list.",
            "default": true
          },
          "includeDetails": {
            "title": "📋 Include product details",
            "type": "boolean",
            "description": "Adds UPC, manufacturer part number, GTIN, description, features, full specifications, weight, dimensions, country of origin, manuals and all images. Opens each product page, so it is slower.",
            "default": false
          },
          "liveInventoryCheck": {
            "title": "⏱️ Live stock check",
            "type": "boolean",
            "description": "Re-checks every row's stock against the store inventory system at run time (the default stock figures are already refreshed throughout the day). Adds about one request per 10 products.",
            "default": false
          },
          "language": {
            "title": "🌐 Language",
            "enum": [
              "en",
              "fr"
            ],
            "type": "string",
            "description": "Product names, categories, descriptions and URLs in English or French.",
            "default": "en"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel requests. The default is fast and safe.",
            "default": 8
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy (datacenter) works well. A residential fallback is used automatically if requests start failing. If you pick Residential here, search uses it, but the store list, category list and product pages still load over Apify Proxy datacenter. Product pages (Include product details) never use residential; if they can't load, details are skipped and not charged.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}