{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Today's Deals Scraper: Deal Countdown & New Arrivals",
    "description": "Amazon Today's Deals Scraper extracts Amazon deal listings with countdown timers, discounts, prices, product details, ratings, availability, and new arrivals. Ideal for deal tracking, price monitoring, product research, competitor analysis, and e-commerce insights.",
    "version": "0.1",
    "x-build-id": "U7Ck4mbShvaErv3vk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~amazon-todays-deals-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-amazon-todays-deals-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/scrapier~amazon-todays-deals-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-amazon-todays-deals-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/scrapier~amazon-todays-deals-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-amazon-todays-deals-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": {
          "maxDeals": {
            "title": "🧮 How many deals to collect",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Number of deals to collect from Amazon's Today's Deals feed. ⚠️ Amazon's promotions surface exposes a hard 500-deal window (its own totalCount is always 500), so anything above 500 is capped at 500 and the cap is logged. Example: 100 → up to 100 deals. Default is 100.",
            "default": 100
          },
          "endsWithinHours": {
            "title": "⏰ Only deals ending within X hours",
            "minimum": 0,
            "maximum": 8760,
            "type": "integer",
            "description": "Keep only deals whose end time is this many hours away or less — your 'act now' shortlist. Set 0 to turn the filter off. ⚠️ Reality check from live data: Amazon deal windows are long (4 to 30 days, median ~12 days remaining), so 24 typically keeps only a handful of rows out of hundreds. Example: 24 → ends in the next day. Default is 0 (off).",
            "default": 0
          },
          "startedWithinHours": {
            "title": "🆕 Only deals that started within X hours",
            "minimum": 0,
            "maximum": 8760,
            "type": "integer",
            "description": "Keep only deals that went live in the last X hours — the 'just landed' shortlist, based on Amazon's own deal start time (no previous run needed). Set 0 to turn the filter off. Example: 24 → deals that started today. Default is 0 (off).",
            "default": 0
          },
          "excludeNonDealRows": {
            "title": "🧹 Drop carousel filler rows that are not deals",
            "type": "boolean",
            "description": "Amazon's deals feed mixes in promotional slots that carry no deal at all — no deal type, no price, no start/end window (about 1 row in 9 in live samples). Leave this on to keep them out of your dataset. Turn it off to see the raw feed exactly as Amazon returns it. Default is true.",
            "default": true
          },
          "trackChangesBetweenRuns": {
            "title": "🔁 Compare this run with the previous run",
            "type": "boolean",
            "description": "Saves a snapshot of every deal it collects to a named key-value store and compares the next run against it, filling in isNewSinceLastRun, endedSinceLastRun and priceChangeSinceLastRun. The very first run has no baseline, so those columns come back null with isFirstRun = true — never a fabricated 'new'. Default is true.",
            "default": true
          },
          "trackingStoreName": {
            "title": "🗄️ Tracking store name",
            "type": "string",
            "description": "Name of the Apify key-value store that holds the previous run's snapshot. Use different names to track several independent deal watchlists side by side. Example: electronics-deal-watch. Default is amazon-deal-tracker.",
            "default": "amazon-deal-tracker"
          },
          "includeDisappearedDeals": {
            "title": "🔚 Also output deals that vanished since last run",
            "type": "boolean",
            "description": "Adds one extra row per deal that was in your previous run but is missing from this one, marked rowType = disappeared. Each carries a disappearedReason: EXPIRED (its end time has passed) or ROTATED_OUT_STILL_LIVE (it dropped out of Amazon's ranked window but has not expired). Default is true.",
            "default": true
          },
          "onlyNewDeals": {
            "title": "✨ Output only the newly appeared deals",
            "type": "boolean",
            "description": "Keeps only rows where isNewSinceLastRun is true, so a scheduled run emits nothing but the fresh arrivals. Has no effect on the first run (there is no baseline to compare against yet). Default is false.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy configuration",
            "type": "object",
            "description": "Optional. Route the Amazon requests through an Apify proxy. The scraper works without a proxy; enable this only if you see block responses in the log."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}