{
  "openapi": "3.0.1",
  "info": {
    "title": "Best Buy Stock Checker: In-Store Stock by ZIP & Restock Alerts",
    "description": "Check Best Buy stock at the stores around up to 10 ZIP codes: in stock, units when 3 or fewer, pickup and shipping dates, open-box offers and price history. Scheduled runs alert on restocks, sell-outs and price drops for GPUs, consoles and trading cards. Export JSON or CSV, or send to Slack.",
    "version": "0.1",
    "x-build-id": "jrkPeXmX5crgpCxQn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~best-buy-stock-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-best-buy-stock-checker",
        "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/getascraper~best-buy-stock-checker/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-best-buy-stock-checker",
        "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/getascraper~best-buy-stock-checker/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-best-buy-stock-checker",
        "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": "Keywords",
            "type": "array",
            "description": "Products to look for on bestbuy.com, one per row, for example RTX 5070, PS5 console or pokemon elite trainer box. Best Buy search links also work here. Each keyword is checked at every ZIP code below.",
            "default": [
              "pokemon elite trainer box"
            ],
            "items": {
              "type": "string"
            }
          },
          "skus": {
            "title": "Product numbers or product links",
            "type": "array",
            "description": "Exact products to check: a Best Buy SKU such as 6606082, or the link of a product page. This is the most precise and cheapest way to follow one item.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Search, category or product links",
            "type": "array",
            "description": "Paste links copied from bestbuy.com: a search results page (filters in the link are kept), a category page such as graphics cards, or a product page.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "US ZIP codes to check, one per row (up to 10). Each ZIP code covers about 25 of the nearest stores, so add several to watch more than one area in a single run. A store reached from two ZIP codes is listed once.",
            "default": [
              "10001"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxStoreDistanceMiles": {
            "title": "Maximum store distance (miles)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Ignore stores farther than this from the ZIP code. Leave empty to include every nearby store Best Buy reports, usually within 20 to 70 miles."
          },
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Only keep products from these brands, for example ASUS or Sony. Applied to keyword, search and category results. Leave empty for all brands.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Minimum price (USD)",
            "minimum": 0,
            "maximum": 100000,
            "type": "number",
            "description": "Skip products priced below this amount."
          },
          "maxPrice": {
            "title": "Maximum price (USD)",
            "minimum": 0,
            "maximum": 100000,
            "type": "number",
            "description": "Skip products priced above this amount, useful to ignore scalper-priced marketplace listings."
          },
          "minRating": {
            "title": "Minimum customer rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Skip products with an average customer rating below this value (0 to 5). Products without reviews are skipped when this is set."
          },
          "soldBy": {
            "title": "Sold by",
            "enum": [
              "any",
              "bestbuy",
              "marketplace"
            ],
            "type": "string",
            "description": "Best Buy sells and ships its own stock, while marketplace sellers are third parties whose items are rarely held in stores. Pick Best Buy only to follow real store inventory.",
            "default": "any"
          },
          "onSaleOnly": {
            "title": "Only products on sale",
            "type": "boolean",
            "description": "Keep only products currently priced below their regular price.",
            "default": false
          },
          "inStockOnly": {
            "title": "Only products I can buy now",
            "type": "boolean",
            "description": "Keep only products that are in stock at a nearby store or can be ordered online right now.",
            "default": false
          },
          "sortBy": {
            "title": "Sort search results by",
            "enum": [
              "Best-Match",
              "Best-Selling",
              "Best-Discount",
              "Price-Low-To-High",
              "Price-High-To-Low",
              "Customer-Rating",
              "New-Arrivals"
            ],
            "type": "string",
            "description": "Order of the products taken from keyword and category searches. Newest arrivals is the best choice to catch new set drops.",
            "default": "Best-Match"
          },
          "maxProductsPerSearch": {
            "title": "Products per keyword or link",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many products to take from each keyword, search link or category link, after the filters above. Every product is then checked at every ZIP code.",
            "default": 10
          },
          "outputShape": {
            "title": "Result layout",
            "enum": [
              "perProduct",
              "perStore"
            ],
            "type": "string",
            "description": "One row per product answers where is it in stock in a single line: the stores holding it are listed inside the row. One row per product and store gives a flat table with a row for each store.",
            "default": "perProduct"
          },
          "storesToInclude": {
            "title": "Stores to list",
            "enum": [
              "inStock",
              "all"
            ],
            "type": "string",
            "description": "Only stores that have it keeps results short. A product that is in stock nowhere nearby still gets a row, with zero stores in stock.",
            "default": "inStock"
          },
          "includeOpenBox": {
            "title": "Include open-box offers",
            "type": "boolean",
            "description": "Add the open-box offers of each product (condition, price and savings, for example Excellent, Good, Fair). Makes the search step slower.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop after this many rows. Free-plan runs are limited to 25 rows.",
            "default": 20
          },
          "onlyChanges": {
            "title": "Only return changes since the last run",
            "type": "boolean",
            "description": "Turn this on for scheduled runs. The Actor remembers each product between runs and returns only products with an alert below, so a quiet run returns no rows. The first run saves the starting state and returns every product.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of the saved history. Use a different name for each separate watch list. When changes-only is on and this is empty, the name default is used."
          },
          "alertOn": {
            "title": "Alert me about",
            "type": "array",
            "description": "Which changes count as an alert when only changes are returned. Without changes-only every product is returned and the changes are shown on the row.",
            "items": {
              "type": "string",
              "enum": [
                "new_listing",
                "back_in_stock",
                "sold_out",
                "low_stock",
                "price_drop",
                "price_increase",
                "target_price_hit"
              ],
              "enumTitles": [
                "New product appears in a search",
                "Back in stock",
                "Sold out",
                "Low stock (3 or fewer left at a store)",
                "Price drop",
                "Price increase",
                "Price reached my target"
              ]
            },
            "default": [
              "new_listing",
              "back_in_stock",
              "sold_out",
              "low_stock",
              "price_drop",
              "target_price_hit"
            ]
          },
          "targetPrice": {
            "title": "Target price (USD)",
            "minimum": 0,
            "maximum": 100000,
            "type": "number",
            "description": "Raise a price-reached-my-target alert when a product falls to this price or lower. Leave empty to turn it off."
          },
          "minDiscountPercent": {
            "title": "Minimum discount for price drops (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Only raise price-drop alerts when the product is at least this many percent below its regular price. Leave empty to alert on any drop."
          },
          "webhookUrl": {
            "title": "Notification link (optional)",
            "type": "string",
            "description": "A Slack, Discord or other web address that receives a message when alerts are found. It must start with https:// and is never required."
          },
          "maxConcurrency": {
            "title": "Parallel checks",
            "minimum": 1,
            "maximum": 6,
            "type": "integer",
            "description": "How many products are checked at the same time. Higher is faster but more likely to be slowed down by Best Buy.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Requests go out directly first, and the Actor switches to a proxy by itself only if Best Buy refuses them. Choose a proxy here to use it from the start.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}