{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Price History & Sales Rank Tracker",
    "description": "Get years of Amazon price history, sales rank history and rating history for any ASIN - going back to 2011, not just from your first run. Amazon, New, Used, FBA, Buy Box and offer-count time series in 13 marketplaces. Export wide or one row per data point. Errors are never charged.",
    "version": "0.1",
    "x-build-id": "a0eyPR9kpklTdJLaE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cyprusapi~amazon-price-history/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cyprusapi-amazon-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/cyprusapi~amazon-price-history/runs": {
      "post": {
        "operationId": "runs-sync-cyprusapi-amazon-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/cyprusapi~amazon-price-history/run-sync": {
      "post": {
        "operationId": "run-sync-cyprusapi-amazon-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": {
          "asins": {
            "title": "ASINs",
            "type": "array",
            "description": "Amazon product IDs to get history for. Up to 100 are bundled into a single request. You are charged once per ASIN, no matter how many data points its history contains.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "marketplace": {
            "title": "Marketplace",
            "enum": [
              "com",
              "co.uk",
              "de",
              "fr",
              "it",
              "es",
              "nl",
              "ca",
              "com.mx",
              "com.br",
              "com.au",
              "co.jp",
              "in"
            ],
            "type": "string",
            "description": "Which Amazon marketplace to read. Prices and currency always follow the marketplace you pick.",
            "default": "com"
          },
          "maxItems": {
            "title": "Maximum products",
            "minimum": 0,
            "type": "integer",
            "description": "Safety cap on how many products this run may return. Set to 0 to process the whole input list.",
            "default": 10
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "wide",
              "long"
            ],
            "type": "string",
            "description": "'One row per product' nests each time series inside the product - best for JSON. 'One row per data point' emits a flat row for every single observation - best for CSV, Excel and databases.",
            "default": "wide"
          },
          "series": {
            "title": "Time series to include",
            "type": "array",
            "description": "Which histories to return. The six defaults are included in the base price. Series marked (+) need extra data from the source and are charged as separate events, but only when that data actually arrives: rating and reviewCount (+), buyBox and buyBoxUsed (++). Series marked (offers) additionally require the 'Include offer-based series' option below.",
            "items": {
              "type": "string",
              "enum": [
                "amazon",
                "new",
                "used",
                "salesRank",
                "listPrice",
                "collectible",
                "refurbished",
                "lightningDeal",
                "offerCountNew",
                "offerCountUsed",
                "offerCountRefurbished",
                "offerCountCollectible",
                "offerCountNewFba",
                "offerCountNewFbm",
                "ebayNew",
                "ebayUsed",
                "tradeIn",
                "rating",
                "reviewCount",
                "buyBox",
                "buyBoxUsed",
                "newFba",
                "newFbm",
                "warehouse",
                "primeExclusive",
                "usedLikeNew",
                "usedVeryGood",
                "usedGood",
                "usedAcceptable"
              ]
            },
            "default": [
              "amazon",
              "new",
              "used",
              "salesRank",
              "listPrice",
              "offerCountNew"
            ]
          },
          "includeOfferSeries": {
            "title": "Include offer-based series (costs more)",
            "type": "boolean",
            "description": "Unlocks FBA, FBM, Warehouse and Prime-exclusive price histories. These require pulling live marketplace offers, which is the most expensive data this source provides and is priced per product, not per run. Leave off unless you specifically need these series - without it they are skipped and you are not charged for them.",
            "default": false
          },
          "days": {
            "title": "Limit history to the last N days",
            "minimum": 0,
            "type": "integer",
            "description": "Return only the most recent N days of history. Free of charge, and it makes runs much faster - ideal for topping up data you already have. Leave at 0 for the complete history.",
            "default": 0
          },
          "includeSummary": {
            "title": "Include per-series summary",
            "type": "boolean",
            "description": "Adds first, last, lowest and highest observed value per series, each with its date. Free of charge.",
            "default": true
          },
          "salesRankByCategory": {
            "title": "Include sales rank per category",
            "type": "boolean",
            "description": "Adds a separate rank history for every category the product is listed in, instead of just the main one. Free of charge.",
            "default": false
          },
          "dataFreshnessHours": {
            "title": "Refresh data older than (hours)",
            "minimum": 0,
            "maximum": 8760,
            "type": "integer",
            "description": "Refresh a product only when its stored data is older than this. History itself is unaffected - this only controls how current the last data point is.",
            "default": 24
          },
          "maxWaitSeconds": {
            "title": "Maximum wait for capacity (seconds)",
            "minimum": 0,
            "maximum": 900,
            "type": "integer",
            "description": "If the shared data capacity is momentarily used up, wait up to this long for it to refill. Anything still unserved afterwards is reported as currently unavailable - and never charged.",
            "default": 60
          },
          "apiKey": {
            "title": "Your own data provider key (optional)",
            "type": "string",
            "description": "Advanced: run this Actor against your own upstream account instead of the bundled capacity. Leave empty to use the included capacity."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}