{
  "openapi": "3.0.1",
  "info": {
    "title": "Best Buy Stock Checker: In-Store Inventory & Restock Alerts",
    "description": "Check Best Buy stock in the stores near any US ZIP code: in stock or not, units when 3 or fewer are left, pickup date, price and online status. Only Best Buy's own offer, no marketplace resellers. Scheduled runs return restocks, sell-outs and price drops for Pokémon cards, GPUs, consoles.",
    "version": "0.1",
    "x-build-id": "0DwurvfKhDfk0ptN1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s_actors~best-buy-stock-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s_actors-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/s_actors~best-buy-stock-checker/runs": {
      "post": {
        "operationId": "runs-sync-s_actors-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/s_actors~best-buy-stock-checker/run-sync": {
      "post": {
        "operationId": "run-sync-s_actors-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": {
          "mode": {
            "title": "📋 What to do",
            "enum": [
              "search",
              "products",
              "stores"
            ],
            "type": "string",
            "description": "Search: keywords or bestbuy.com search/category links, every product with price, online status and stock in your stores. Check products: exact items by SKU or link (best for a restock watchlist). Find stores: Best Buy stores near a ZIP code with their numbers.",
            "default": "search"
          },
          "keywords": {
            "title": "🔎 Keywords",
            "type": "array",
            "description": "Search mode: what to search on bestbuy.com, one per line (e.g. \"pokemon elite trainer box\", \"rtx 5090\", \"nintendo switch 2\").",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "🔗 Search or category links",
            "type": "array",
            "description": "Search mode: bestbuy.com search or category links, with filters (brand...) if you set them on the site. The page number is added automatically.",
            "items": {
              "type": "string"
            }
          },
          "products": {
            "title": "🏷️ Products",
            "type": "array",
            "description": "Check products mode: Best Buy SKUs (7 digits, shown on every product page) or product links, one per line. A marketplace seller's SKU is replaced by Best Buy's own offer of the same product when \"Only Best Buy's own offer\" is on.",
            "items": {
              "type": "string"
            }
          },
          "zipCode": {
            "title": "📍 ZIP code",
            "type": "string",
            "description": "US ZIP code: stock is checked in the Best Buy stores nearest to it. Empty = online status only."
          },
          "maxStores": {
            "title": "🏬 Number of stores",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "How many of the nearest stores to check (one row per product and store).",
            "default": 5
          },
          "radiusMiles": {
            "title": "📏 Search radius (miles)",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "Only stores within this distance of the ZIP code.",
            "default": 30
          },
          "storeIds": {
            "title": "🔢 Store numbers",
            "type": "array",
            "description": "Exact Best Buy store numbers instead of the nearest stores (find them with \"Find stores near a ZIP code\"; up to 25).",
            "items": {
              "type": "string"
            }
          },
          "onlySoldByBestBuy": {
            "title": "🏪 Only Best Buy's own offer",
            "type": "boolean",
            "description": "On: only products Best Buy sells itself, at Best Buy's price. Best Buy's marketplace lists resellers first on many hot items (a $49.99 Pokémon Elite Trainer Box shows as $97.99); this keeps them out. Off: marketplace listings too.",
            "default": true
          },
          "maxProductsPerSearch": {
            "title": "🔢 Max products per search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Search mode: how many products to take from each keyword or link.",
            "default": 50
          },
          "sortBy": {
            "title": "↕️ Sort",
            "enum": [
              "best_match",
              "best_selling",
              "price_low",
              "price_high",
              "new",
              "rating",
              "discount"
            ],
            "type": "string",
            "description": "Search mode: order of the products, as on bestbuy.com.",
            "default": "best_match"
          },
          "onlyInStock": {
            "title": "✅ Only in stock",
            "type": "boolean",
            "description": "Return only rows where the store has the product (or, without a ZIP code, products you can buy now).",
            "default": false
          },
          "maxPrice": {
            "title": "💲 Maximum price ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Return only products at or below this price. Empty = any price."
          },
          "onlyChanges": {
            "title": "🔔 Only report changes",
            "type": "boolean",
            "description": "For scheduled runs. The first run saves stock and prices; later runs return only what changed: back in stock at a store, sold out, low stock (3 or fewer left), back online, price changes, new products. Each row also carries the restock history seen by this monitor and the usual restock weekday. You pay only for the changes returned.",
            "default": false
          },
          "monitorName": {
            "title": "🏷️ Monitor name",
            "type": "string",
            "description": "Separate monitors keep separate memory. Use a different name for each scheduled task.",
            "default": "default"
          },
          "maxConcurrency": {
            "title": "⚡ Parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many requests run at the same time.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}