{
  "openapi": "3.0.1",
  "info": {
    "title": "Pokémon Restock Monitor (Target + Best Buy, Discord alerts)",
    "description": "Get alerted when Pokémon cards, Elite Trainer Boxes and other collectibles come back in stock, drop in price or appear at Target and Best Buy. Watches searches and product lists, online and at your nearest Target store, and sends only what changed to Discord, Slack, Telegram or any webhook.",
    "version": "0.1",
    "x-build-id": "euaGdlugBugS6cpn5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/integrative_cafe_8pc~pokemon-restock-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-integrative_cafe_8pc-pokemon-restock-monitor",
        "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/integrative_cafe_8pc~pokemon-restock-monitor/runs": {
      "post": {
        "operationId": "runs-sync-integrative_cafe_8pc-pokemon-restock-monitor",
        "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/integrative_cafe_8pc~pokemon-restock-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-integrative_cafe_8pc-pokemon-restock-monitor",
        "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": "Searches",
            "type": "array",
            "description": "Words you would type in the store's search box, one per line. Each search runs at every retailer selected below and lists up to 'Max products per search' per retailer, including items that are sold out right now (those are the ones that restock). Leave every product field empty to try the Actor with 'pokemon trading card game'.",
            "items": {
              "type": "string"
            }
          },
          "retailers": {
            "title": "Retailers for searches",
            "type": "array",
            "description": "Where the searches run. Product URLs and IDs below always go to their own retailer.",
            "items": {
              "type": "string",
              "enum": [
                "target",
                "bestbuy"
              ],
              "enumTitles": [
                "Target",
                "Best Buy"
              ]
            },
            "default": [
              "target",
              "bestbuy"
            ]
          },
          "targetProducts": {
            "title": "Target products",
            "type": "array",
            "description": "Target product URLs (https://www.target.com/p/.../-/A-95230445) or TCIN numbers (95230445), one per line.",
            "items": {
              "type": "string"
            }
          },
          "bestBuyProducts": {
            "title": "Best Buy products",
            "type": "array",
            "description": "Best Buy product URLs (https://www.bestbuy.com/site/...6606082.p?skuId=6606082 or .../sku/6606082) or SKU numbers (6606082), one per line.",
            "items": {
              "type": "string"
            }
          },
          "soldByRetailerOnly": {
            "title": "Sold by the retailer only",
            "type": "boolean",
            "description": "Searches keep only items Target or Best Buy sell themselves, at retail price. Turn off to also list marketplace resellers (usually marked up and rarely out of stock).",
            "default": true
          },
          "zipCode": {
            "title": "ZIP code (Target store stock)",
            "type": "string",
            "description": "Optional US ZIP code. Target store stock and pickup are checked at the Target store nearest to it. Default 10001 (New York).",
            "default": "10001"
          },
          "maxPrice": {
            "title": "Maximum price (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Products above this price are left out (and not charged). Empty or 0 means no limit."
          },
          "maxItemsPerSearch": {
            "title": "Max products per search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Stop each search after this many products per retailer.",
            "default": 24
          },
          "monitorMode": {
            "title": "Monitor mode (only changes)",
            "type": "boolean",
            "description": "Remember every product's price and stock between runs and return only what changed. Schedule the Actor (for example every 10 minutes) and keep the same input. The first run returns the current snapshot of every product.",
            "default": false
          },
          "notifyOn": {
            "title": "Report these changes",
            "type": "array",
            "description": "Which changes monitor mode returns and sends to the webhook.",
            "items": {
              "type": "string",
              "enum": [
                "backInStock",
                "priceDrop",
                "newProduct",
                "outOfStock",
                "priceIncrease"
              ],
              "enumTitles": [
                "Back in stock",
                "Price drop",
                "New product in a search",
                "Went out of stock",
                "Price increase"
              ]
            },
            "default": [
              "backInStock",
              "priceDrop",
              "newProduct"
            ]
          },
          "stockScope": {
            "title": "What counts as in stock",
            "enum": [
              "any",
              "online",
              "store"
            ],
            "type": "string",
            "description": "Which availability triggers a back-in-stock alert.",
            "default": "any"
          },
          "minPriceDropPercent": {
            "title": "Minimum price drop (%)",
            "minimum": 0,
            "maximum": 99,
            "type": "integer",
            "description": "Ignore price drops smaller than this percentage. 0 reports any drop.",
            "default": 0
          },
          "webhookUrl": {
            "title": "Webhook URL (Discord, Slack, Telegram, any)",
            "type": "string",
            "description": "Optional. Delivered products are POSTed here in batches of 10. A Discord webhook (https://discord.com/api/webhooks/...) gets one rich embed per product with price, stock and link; Slack and Telegram bot sendMessage URLs (with chat_id) get readable text; any other URL gets JSON with 'text' and 'items'. In monitor mode, alerts the webhook refuses are resent on the next run."
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional memory name for this watch list. Leave empty and the input itself is the memory key. Use the same name to keep the memory when you edit the list, or a new name to start fresh."
          },
          "proxy": {
            "title": "Proxy",
            "type": "object",
            "description": "US residential proxy by default. Best Buy blocks datacenter IPs; keep it for reliable runs.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}