# Amazon Price History API - Sales Rank, Buy Box, Offers, Sellers (`nabeelbaghoor/amazon-price-history-api`) Actor

Amazon price history API: decoded Keepa price and sales rank history per ASIN, UPC or EAN, daily price rows, buy box and live seller offers, 30/90/180 day averages, best sellers, Product Finder, seller profiles and categories for 11 Amazon marketplaces. Read only. Bring your own key.

- **URL**: https://apify.com/nabeelbaghoor/amazon-price-history-api.md
- **Developed by:** [Nabeel Hassan](https://apify.com/nabeelbaghoor) (community)
- **Categories:** E-commerce, Business, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 product or seller record returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Amazon Price History API - Sales Rank, Buy Box, Offers, Sellers

Export Amazon price history, sales rank and live seller offers for any ASIN on 11 Amazon marketplaces, decoded into plain prices, dates and daily rows ready for a spreadsheet, a warehouse or a repricing rule.

### What it collects

- **Amazon price history per ASIN**: the Amazon price, lowest new and used price, buy box price, list price, FBA and merchant fulfilled new prices, warehouse deals, collectible, refurbished, trade-in, Prime exclusive and eBay prices, plus sales rank, rating, review count and offer counts, each as a time series with real dates and prices in the marketplace currency.
- **Current values and statistics on every product row**: current price of every type, 30, 90 and 180 day averages, lowest and highest price ever and within your window, Amazon out of stock percentage over 90 days, total offer count, buy box seller, Amazon availability, monthly units sold where Amazon shows it, tracking start and last price change.
- **Three row shapes**: one row per product with history nested, one row per product per day (each price and rank as it stood at the end of that UTC day), or one row per marketplace offer with seller id, condition, price, shipping, landed price, Prime, FBA, MAP, stock and live listing position.
- **Lookups by ASIN, Amazon product URL, UPC, EAN or ISBN-13**, in batches of up to 100.
- **Finding products**: keyword product search, the Product Finder with the provider's own filters, and best seller lists by category ranked on current or 30, 90 or 180 day average sales rank. Found ASINs can be read in full in the same run.
- **Sellers and categories**: seller profiles with rating, rating counts, FBA status, business name and address, buy box ownership and storefront ASINs; the most rated sellers of a marketplace; category lookup and keyword search with product counts, rank ranges and average buy box price.
- Token aware, read only, pay per result, bring your own key.

### Input

| Field | What it does |
| --- | --- |
| What to read | Amazon price history (default), product search, Product Finder, best sellers, seller profile, most rated sellers, category lookup or category search. |
| Amazon marketplace | amazon.com, .co.uk, .de, .fr, .co.jp, .ca, .it, .es, .in, .com.mx or .com.br. |
| ASINs, product codes, seller ids or category ids | One per line. |
| Identifier type | ASIN, or product code (UPC, EAN, ISBN-13). |
| One row per | Product, day or offer. |
| History window in days | How far back history reaches, 90 by default, 0 for all of it. |
| History types | Which price, rank and count histories to include. |
| Include nested history | Product rows: add the time series, or keep the row light. |
| Marketplace offers to read | 0, or 20 to 100 offers per product. |
| Live offers only / Collect offer stock | Offer options. |
| Buy box data / Rating history | Extra histories the provider already holds. |
| Refresh data older than hours | Ask for fresh data from Amazon when the stored copy is older. |
| Search term | Product search and category search. |
| Product Finder selection | The finder query as JSON. |
| Best seller category / Rank basis / All variations / Rank by sub-category rank | Best seller options. |
| Read product details for found ASINs | Turn a finder or best seller list into full product rows. |
| Seller storefront ASINs / Include category path | Seller and category options. |
| Maximum results | Row cap for the run, 100 by default. |
| Token wait limit in minutes | Longest wait for tokens to refill before stopping cleanly. |
| API access key | Your own key, as a secret input. |

### FAQ

#### What is an Amazon price history API used for?

Getting the price and sales rank history behind a product into the tools that decide what to buy, stock or charge. An Amazon seller checks whether a product's buy box price has held above a target over 90 days before sourcing it. A repricing script reads the lowest FBA new price and the buy box seller every morning. A brand team charts its ASINs' Amazon price against list price to spot discounting and MAP breaches. An analyst loads daily prices and sales rank for a category's best sellers into BigQuery to estimate demand.

#### Which data source does this actor read?

The Keepa API at api.keepa.com, through its documented read requests: products (`/product`), product and category search (`/search`), the Product Finder (`/query`), best sellers (`/bestsellers`), seller information (`/seller`), most rated sellers (`/topseller`), category lookup (`/category`) and the token status (`/token`). The request parameters and every decoded field follow the provider's reference and its official Java and Python clients.

#### Do I need an API key?

Yes. This actor is bring-your-own-key and never ships one. Your API access key is the 64 character code on the API page of your provider account, and the account needs an active API subscription. Paste it into the input or set it once as the `DATA_API_KEY` environment secret. A missing key, a malformed key or a key without an active plan ends the run cleanly with a message saying which it was, and the key is never written to a row or the log.

#### How are Keepa prices and dates decoded?

The provider stores times as minutes since 1 January 2011 and prices as integers in the smallest currency unit. This actor turns every time into an ISO 8601 date and every price into a decimal amount in the marketplace currency (cents divided by 100, yen as they are on amazon.co.jp). A price of -1, which means no offer at that time, becomes null. Ratings become stars (45 becomes 4.5). For the buy box, merchant fulfilled new, used buy box and eBay histories the value is the price plus shipping, with the shipping also given on its own.

#### What does one row per day mean?

Each price on Amazon changes at irregular moments, so the provider records a new point only when a value changes. Day rows read every chosen history as it stood at the end of each calendar day in UTC, carrying a price forward until it changes. A 90 day window gives up to 90 rows per product, each with the Amazon, new, used, buy box and list price, sales rank, offer count, rating and review count of that day.

#### How do tokens work, and what happens when they run out?

The provider meters requests in tokens that refill every minute at the rate of your plan. Each product or seller read uses tokens, and the provider documents extra token costs for the buy box parameter and for live refreshes. The run reads your token balance first, which is free, and when the balance runs out it waits for the refill the provider announces. If that wait is longer than the token wait limit, the run stops cleanly and keeps every row collected so far.

#### What happens when there is nothing for an ASIN or id?

It becomes its own row with `found: false` and a note: an ASIN the provider marks invalid, a code that matches no product on that marketplace, an unknown seller id or category id, or a product with no history of the chosen types in the window. Those rows are never charged.

#### Can this actor change anything in my account?

No. Every request is a GET that reads data. The provider also documents a tracking request that creates and deletes price watches and webhooks on your account, and it is not wired anywhere in this actor.

#### How is it priced?

Pay per result, with two row prices. A full product record or seller profile is one price. A lighter row, such as one product on one day, one marketplace offer, one ranked ASIN or seller id, or one category, is a lower price. Rows for identifiers that produced nothing are free. Your provider subscription and its tokens apply separately.

### Example output

```json
{
  "service": "product",
  "serviceLabel": "Amazon price history by ASIN or product code",
  "requested": "B00M0QVG3W",
  "found": true,
  "marketplace": "amazon.com",
  "domainId": 1,
  "currency": "USD",
  "asin": "B00M0QVG3W",
  "title": "Stainless Steel Insulated Water Bottle, 32 oz",
  "brand": "ExampleBrand",
  "productGroup": "Kitchen",
  "categoryPath": "Home & Kitchen > Kitchen & Dining > Travel & To-Go Drinkware",
  "productUrl": "https://www.amazon.com/dp/B00M0QVG3W",
  "monthlySold": 2000,
  "amazonPrice": 24.99,
  "newPrice": 23.49,
  "usedPrice": 18.7,
  "buyBoxPrice": 24.99,
  "listPrice": 34.99,
  "salesRank": 1843,
  "rating": 4.7,
  "reviewCount": 15210,
  "newOfferCount": 12,
  "amazonAvg30": 25.61,
  "amazonAvg90": 26.4,
  "amazonAvg180": 27.12,
  "amazonLowestEver": 19.99,
  "amazonHighestEver": 34.99,
  "amazonOutOfStockPercent90": 3,
  "amazonAvailability": "in stock",
  "lastPriceChange": "2026-09-27T14:02:00.000Z",
  "history": {
    "amazon": [
      { "time": "2026-09-20T08:14:00.000Z", "value": 26.99 },
      { "time": "2026-09-27T14:02:00.000Z", "value": 24.99 }
    ],
    "buyBox": [
      { "time": "2026-09-27T14:02:00.000Z", "value": 24.99, "shipping": 0 }
    ]
  },
  "retrievedAt": "2026-09-28T09:14:52.118Z",
  "note": null
}
```

Values are illustrative; every source field is one the provider documents.

### Keyword map

Amazon price history API, Keepa API, Amazon price tracker, ASIN price history, Amazon sales rank history, buy box price history, Amazon seller offers API, FBA price data, Amazon best sellers API, Amazon product finder, Amazon seller lookup, UPC to ASIN, EAN to ASIN, Amazon repricing data, Amazon category tree API.

# Actor input Schema

## `service` (type: `string`):

Amazon price history reads each ASIN or product code you give: current prices, averages, extremes and the decoded price and sales rank history, as one row per product, per day, or per live offer. Product search, Product Finder and best sellers find ASINs and can read their details too. Seller profile, most rated sellers, category lookup and category search read the rest.

## `domain` (type: `string`):

The Amazon marketplace to read. Prices are returned in its currency.

## `identifiers` (type: `array`):

One per line. For Amazon price history, ASINs (Amazon product URLs work too) or, with the identifier type set to product code, UPC, EAN or ISBN-13 codes. For seller profile, Amazon seller ids such as A2L77EE7U53NWQ. For category lookup, category node ids; leave empty to list the root categories.

## `identifierType` (type: `string`):

Amazon price history only: whether the identifiers are ASINs or product codes (UPC, EAN, ISBN-13). One code can match several ASINs, and each becomes its own row.

## `rowPer` (type: `string`):

For every service that reads products. Product gives one row per product with current values, averages, extremes and the history as nested time series. Day gives one row per product per calendar day (UTC) with each chosen price and rank as it stood at the end of that day, which is easy to chart or load into a spreadsheet. Offer gives one row per marketplace offer with seller, condition, price, shipping and fulfilment, and asks the provider for at least 20 offers.

## `historyDays` (type: `integer`):

How far back the price and rank history reaches, and the window the lowest and highest in window values cover. 0 reads the full history the provider holds, which for day rows can mean thousands of rows per product.

## `series` (type: `array`):

Which histories go into the nested history and the day rows. Leave empty for Amazon, new, used, buy box and list price, sales rank, new offer count, rating and review count. The buy box history needs the buy box data or offers input, and rating and review count histories need the rating history input.

## `includeHistory` (type: `boolean`):

Product rows only: add the chosen history types as time series under history. Turn off for a lighter row with current values, averages and extremes only.

## `offers` (type: `integer`):

Ask the provider for this many marketplace offers per product, from 20 to 100, which also fills the buy box fields. 0 reads none. A request with offers reads at most 20 products at a time. One row per offer sets 20 when this is 0.

## `liveOffersOnly` (type: `boolean`):

With offers: keep only offers listed now, leaving out offers the provider saw in the past.

## `offerStock` (type: `boolean`):

With offers: ask the provider to collect the stock of each live offer (it can see up to 10 units). Takes longer.

## `buyBox` (type: `boolean`):

Without offers: add the buy box price history and buy box fields from data the provider already holds. The provider charges extra tokens for it; offers include it anyway.

## `includeRating` (type: `boolean`):

Add the rating and review count history the provider already holds.

## `refreshHours` (type: `integer`):

Ask the provider to collect fresh data from Amazon when its copy is older than this many hours. 0 always collects live data and can cost extra tokens. Leave blank to read the stored data. For seller profile it applies to the storefront.

## `searchTerm` (type: `string`):

Product search and category search: the keywords. Category search matches every keyword, each at least 3 characters.

## `finderSelection` (type: `object`):

Product Finder only: the finder query as a JSON object, using the provider's own filter names, such as {"rootCategory": \["172282"], "current\_SALES\_lte": 5000, "sort": \[\["current\_SALES", "asc"]]}. Page and page size are set by the actor.

## `category` (type: `string`):

Best sellers only: the category node id, which category search finds, or a product group name.

## `bestsellerRange` (type: `string`):

Best sellers only: rank by the current sales rank, or by its 30, 90 or 180 day average.

## `bestsellerVariations` (type: `boolean`):

Best sellers only: list every variation instead of one per parent product.

## `bestsellerSublist` (type: `boolean`):

Best sellers only: build a sub-category list from the sub-category sales rank instead of the primary sales rank.

## `fetchProductDetails` (type: `boolean`):

Product Finder and best sellers: instead of one row per ranked ASIN, read each ASIN found (up to maximum results) with the history, offer and row settings above.

## `sellerStorefront` (type: `boolean`):

Seller profile only: add the ASINs the seller lists (up to 10,000 kept per row). Reads one seller per request.

## `includeParents` (type: `boolean`):

Category lookup and search: read each category's parent tree and write its full path.

## `maxResults` (type: `integer`):

Stop after this many rows. With one row per day, a product with a 90 day window is up to 90 rows.

## `maxTokenWaitMinutes` (type: `integer`):

The provider meters requests in tokens that refill every minute. When the balance runs out the run waits for a refill, up to this long for one wait; past that it stops cleanly and keeps the rows collected.

## `requestsPerMinute` (type: `integer`):

Pacing ceiling for calls to the provider, on top of the token meter.

## `apiKey` (type: `string`):

Your own API access key, the 64 character code on the API page of your provider account, which needs an active API subscription. This actor is bring-your-own-key and never ships one. Leave blank to use the DATA\_API\_KEY environment secret instead. It is never written to a row or the log.

## `baseUrl` (type: `string`):

Override the host the actor calls. Only useful for testing against a different environment.

## Actor input object example

```json
{
  "service": "product",
  "domain": "1",
  "identifiers": [
    "B00M0QVG3W"
  ],
  "identifierType": "asin",
  "rowPer": "product",
  "historyDays": 90,
  "includeHistory": true,
  "offers": 0,
  "liveOffersOnly": true,
  "offerStock": false,
  "buyBox": false,
  "includeRating": false,
  "bestsellerRange": "0",
  "bestsellerVariations": false,
  "bestsellerSublist": false,
  "fetchProductDetails": false,
  "sellerStorefront": false,
  "includeParents": false,
  "maxResults": 100,
  "maxTokenWaitMinutes": 10,
  "requestsPerMinute": 60
}
```

# Actor output Schema

## `records` (type: `string`):

One row per product, product day, offer, ranked ASIN, seller or category, alongside the identifier that produced it.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "identifiers": [
        "B00M0QVG3W"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("nabeelbaghoor/amazon-price-history-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "identifiers": ["B00M0QVG3W"] }

# Run the Actor and wait for it to finish
run = client.actor("nabeelbaghoor/amazon-price-history-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "identifiers": [
    "B00M0QVG3W"
  ]
}' |
apify call nabeelbaghoor/amazon-price-history-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nabeelbaghoor/amazon-price-history-api"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/6832wl7FXIgM0fG2a/builds/hNtPn9kK8leTRTWvq/openapi.json
