{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Price History Scraper - ASIN Price Alerts",
    "description": "Track Amazon product prices over time from ASINs or product URLs. Stores observed history in a named KV store and returns deltas, lows, highs, stock, seller, and optional drop alerts. MCP/API-ready.",
    "version": "0.2",
    "x-build-id": "pjwyfCLjkGFeVXw0Z"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~amazon-price-history-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-amazon-price-history-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/khadinakbar~amazon-price-history-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-amazon-price-history-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/khadinakbar~amazon-price-history-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-amazon-price-history-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",
        "required": [
          "products"
        ],
        "properties": {
          "products": {
            "title": "Amazon ASINs or product URLs",
            "type": "array",
            "description": "Use this when you know the exact Amazon products to monitor. Accepts 10-character ASINs like B0CHWRXH8B or product URLs like https://www.amazon.com/dp/B0CHWRXH8B. Defaults to one working ASIN for a quick smoke test. Not a keyword search field.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Amazon marketplace",
            "enum": [
              "US",
              "UK",
              "DE",
              "FR",
              "CA",
              "ES",
              "IT",
              "JP",
              "AU",
              "IN",
              "MX",
              "BR",
              "NL",
              "SE",
              "PL",
              "TR",
              "AE",
              "SG"
            ],
            "type": "string",
            "description": "Use this when the product should be checked on a specific Amazon marketplace. Accepted values include US, UK, DE, FR, CA, JP, IN, AU, and more. Defaults to US. This does not auto-detect the country from a URL.",
            "default": "US"
          },
          "maxProducts": {
            "title": "Max products",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Use this to cap how many unique products are checked from your list. Defaults to 20 and goes up to 500 per run (free plan: 10). This is not a page-count setting.",
            "default": 20
          },
          "historyStoreName": {
            "title": "History store name",
            "pattern": "^[a-zA-Z0-9_-]{3,80}$",
            "type": "string",
            "description": "Use this to keep price history across scheduled runs. The same named key-value store is opened every run, for example amazon-price-history. Defaults to amazon-price-history. This is not the output dataset name.",
            "default": "amazon-price-history"
          },
          "outputHistoryPoints": {
            "title": "Recent history points in output",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Use this to control how many recent observations are embedded in each dataset row. The full retained history stays in the named KV store. Defaults to 30 and maxes at 365. This does not delete older stored history.",
            "default": 30
          },
          "historyRetentionPoints": {
            "title": "Stored history points per ASIN",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Use this to cap stored observations per ASIN in the history KV store. Defaults to 365 and maxes at 2000. Older observations roll off only after this limit is reached. This is not measured in days.",
            "default": 365
          },
          "resetHistory": {
            "title": "Reset history for these ASINs",
            "type": "boolean",
            "description": "Use this when you want to discard prior stored observations for the submitted ASINs before writing this run. Defaults to false for normal scheduled tracking. Set true only for a clean restart. This does not delete unrelated ASIN keys.",
            "default": false
          },
          "alertWebhookUrl": {
            "title": "Alert webhook URL",
            "type": "string",
            "description": "Use this to get a JSON alert posted to your own HTTPS endpoint (Slack, Make, Zapier, n8n or custom). Alerts fire on a price drop, and optionally on a target price, a price rise or back in stock. One alert per product per run. Empty by default; not needed for tracking."
          },
          "alertDropPercent": {
            "title": "Alert drop threshold (%)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Use this with the alert webhook to skip tiny moves. A value of 5 means alert when the price moves at least five percent versus the previous stored price (drops always; rises only if you turn on rise alerts). Defaults to 5. Ignored without a webhook URL.",
            "default": 5
          },
          "alertBelowPrice": {
            "title": "Alert when price is at or below",
            "minimum": 0.01,
            "type": "number",
            "description": "Use this to get an alert when the current price falls to this value or lower (in the marketplace currency), for example 49.99. Needs an alert webhook URL. Leave empty to turn off."
          },
          "alertOnPriceRise": {
            "title": "Also alert on price rises",
            "type": "boolean",
            "description": "Use this to also get an alert when a price goes up by at least the threshold percent. Needs an alert webhook URL. Off by default.",
            "default": false
          },
          "alertOnBackInStock": {
            "title": "Also alert when back in stock",
            "type": "boolean",
            "description": "Use this to get an alert when a product that was out of stock on the last run is available again. Needs an alert webhook URL. Off by default.",
            "default": false
          },
          "importHistory": {
            "title": "Import your own past prices",
            "type": "array",
            "description": "Use this to start with price history you already have, so trends and lows are useful on day one. Each item needs asin, date (for example 2026-05-01) and price; currency is optional. Imported points are free and merged into the stored history. Up to 5,000 items.",
            "items": {
              "type": "object",
              "properties": {
                "asin": {
                  "title": "ASIN",
                  "type": "string",
                  "description": "10-character Amazon ASIN."
                },
                "date": {
                  "title": "Date",
                  "type": "string",
                  "description": "Date of the price, for example 2026-05-01."
                },
                "price": {
                  "title": "Price",
                  "type": "number",
                  "description": "Price on that date in the marketplace currency."
                },
                "currency": {
                  "title": "Currency",
                  "type": "string",
                  "description": "Optional currency code, for example USD."
                }
              }
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Use this to override how many product pages load at once. Leave empty for the automatic setting, which grows with run size. Maximum 30. This is not a product limit."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional custom or Apify proxy settings. When left blank, the Actor picks the cheapest working route for the selected marketplace automatically. Supply your own proxy only when you need to control egress or billing.",
            "default": {
              "useApifyProxy": false
            }
          },
          "routeMode": {
            "title": "Network route (advanced)",
            "enum": [
              "auto",
              "unlocker",
              "pool",
              "apify"
            ],
            "type": "string",
            "description": "Use this only to force one route when debugging. Automatic tries the cheapest working route first and escalates if a page is blocked. Defaults to automatic.",
            "default": "auto"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}