{
  "openapi": "3.0.1",
  "info": {
    "title": "Keepa Price History",
    "description": "Amazon price history, sales rank, and price statistics for a list of ASINs, read on your own Keepa API key from the official Keepa API. One row per product.",
    "version": "0.1",
    "x-build-id": "mHM6Mgk8qIibFWCPv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mambalabs~keepa-price-history/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mambalabs-keepa-price-history",
        "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/mambalabs~keepa-price-history/runs": {
      "post": {
        "operationId": "runs-sync-mambalabs-keepa-price-history",
        "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/mambalabs~keepa-price-history/run-sync": {
      "post": {
        "operationId": "run-sync-mambalabs-keepa-price-history",
        "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": {
          "api_key": {
            "title": "Your Keepa API key",
            "type": "string",
            "description": "Your own Keepa API access key, 64 characters, from keepa.com/#!api (needs an active Keepa API plan). It is stored encrypted by Apify, sent only to api.keepa.com, and never written to a row or a log. With no key the run writes one free row and reads nothing."
          },
          "asins": {
            "title": "ASINs or Amazon product URLs",
            "type": "array",
            "description": "ASINs (for example B00M0QVG3W) or Amazon product URLs. Repeats are read once. In Clay, put the column inside a one item list.",
            "items": {
              "type": "string"
            }
          },
          "marketplace": {
            "title": "Amazon marketplace",
            "type": "string",
            "description": "Which Amazon store to read: com (default), co.uk, de, fr, co.jp, ca, it, es, in, com.mx, or com.br. A product URL's own marketplace wins over this setting.",
            "default": "com"
          },
          "include_history": {
            "title": "Include price history",
            "type": "string",
            "description": "yes (default) or no. With no, rows carry current prices and statistics only, and the history column is empty. Keepa charges the same tokens either way.",
            "default": "yes"
          },
          "history_types": {
            "title": "History types",
            "type": "array",
            "description": "Which histories to decode into the history column: amazon, new, used, sales_rank, list_price, offers_new, offers_used, rating, review_count, lightning_deal, warehouse, buy_box. Default amazon, new, sales_rank. rating and review_count need include_rating; warehouse and buy_box come only when Keepa already holds offer data for the product.",
            "items": {
              "type": "string"
            },
            "default": [
              "amazon",
              "new",
              "sales_rank"
            ]
          },
          "history_days": {
            "title": "History window (days)",
            "type": "string",
            "description": "Number, default 90. Limits the history column to the last N days (1 to 9999). 0 returns the full history Keepa holds. Averages and all time lows are not affected.",
            "default": "90"
          },
          "include_rating": {
            "title": "Include rating and review count",
            "type": "string",
            "description": "yes or no (default). With yes, rows carry Keepa's latest rating and review count, which costs up to 1 extra Keepa token per product.",
            "default": "no"
          },
          "max_age_hours": {
            "title": "Maximum data age (hours)",
            "type": "string",
            "description": "Number, default 24. Keepa refreshes a product from Amazon first when its data is older than this. 0 always refreshes (1 extra Keepa token when the data is under 1 hour old). Higher values are faster.",
            "default": "24"
          },
          "max_asins": {
            "title": "Maximum ASINs",
            "type": "string",
            "description": "Number, default 100, at most 10000. ASINs past this count are not read.",
            "default": "100"
          },
          "max_wait_seconds": {
            "title": "Maximum wait for Keepa tokens (seconds)",
            "type": "string",
            "description": "Number, default 300, at most 3000. When your Keepa token bucket is empty, the actor waits for it to refill. Waiting is earned at 20 seconds per product row delivered in this run, up to this many seconds in total, so an empty bucket at the start ends the run at once with one free row. After that the remaining ASINs get one free row that says so.",
            "default": "300"
          },
          "max_charge_usd": {
            "title": "Maximum charge for this run (USD)",
            "type": "string",
            "description": "Optional. The run stops before a charge that would pass this amount. Summary rows are always returned."
          },
          "source_tag": {
            "title": "Source tag",
            "type": "string",
            "description": "Internal attribution tag. Leave empty."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}