# Overview

Source: https://env.7xmtools.com/api-docs/

Everything you need to integrate Keepa data into your application: how to get access, make your first request, and where each endpoint and response object is documented.

Token-based access · JSON responses

The Keepa API delivers Keepa's data on Amazon marketplaces straight to your application: complete price histories, detailed product data, marketplace offers, deals, best seller lists and seller information — plus tracking, which notifies you with updated price data for the products you select. All requests are issued over HTTPS and every response is JSON. Find out more about the API on [keepa.com](https://env.7xmtools.com/api).

Base URL: `https://api.keepa.com/`

## Quick start

### 1. Get an API key

Subscribe to an API plan at [keepa.com/api](https://env.7xmtools.com/api). Every request requires your API access key as a parameter; you can view and change your key on the [API page](https://env.7xmtools.com/api) of your Keepa account.

### 2. Make your first request

All requests are issued over HTTPS and must accept gzip encoding; [zstd is supported as well](https://env.7xmtools.com/api-docs/request-basics.html#compression) and recommended. GET works for every endpoint; endpoints that take a large JSON query ([Product Finder](https://env.7xmtools.com/api-docs/product-finder.html), [Seller Finder](https://env.7xmtools.com/api-docs/seller-finder.html), [Browsing Deals](https://env.7xmtools.com/api-docs/deals.html), [Add Tracking](https://env.7xmtools.com/api-docs/tracking.html#add-tracking)) also accept POST. If possible, use a Keep-Alive connection; multiple requests can be made in parallel to increase throughput. The following request fetches product data and price history for one ASIN on amazon.com (`domain=1`):

**Java**

```java
KeepaAPI api = new KeepaAPI("YOUR_API_KEY");
Request r = Request.getProductRequest(AmazonLocale.US, null, null, "B0F3GWXLTS");
api.sendRequest(r)
    .done(result -> {
        if (result.status == ResponseStatus.OK) {
            System.out.println(result.products[0].title);
        }
    })
    .fail(failure -> System.out.println(failure));
```

**PHP**

```php
<?php
use Keepa\KeepaAPI;
use Keepa\API\Request;
use Keepa\API\ResponseStatus;
use Keepa\objects\AmazonLocale;

$api = new KeepaAPI("YOUR_API_KEY");
$response = $api->sendRequestWithRetry(Request::getProductRequest(AmazonLocale::US, null, null, null, 1, true, ['B0F3GWXLTS']));
if ($response->status == ResponseStatus::OK) {
    echo $response->products[0]->title;
}
```

**Python**

```python
import requests

params = {"key": "YOUR_API_KEY", "domain": 1, "asin": "B0F3GWXLTS"}
r = requests.get("https://api.keepa.com/product", params=params)
data = r.json()
print(data["products"][0]["title"])
print("Tokens left:", data["tokensLeft"])
```

**Node.js**

```javascript
const res = await fetch("https://api.keepa.com/product?key=YOUR_API_KEY&domain=1&asin=B0F3GWXLTS");
const data = await res.json();
console.log(data.products[0].title);
console.log("Tokens left:", data.tokensLeft);
```

**cURL**

```bash
curl -s --compressed "https://api.keepa.com/product?key=YOUR_API_KEY&domain=1&asin=B0F3GWXLTS"
```

Every response is JSON and always includes the current state of your token bucket alongside the payload:

```json
{
  "refillRate": 5,
  "refillIn": 41260,
  "tokensLeft": 295,
  "tokensConsumed": 1,
  "tokenFlowReduction": 0.0,
  "processingTimeInMs": 32,
  "products": [
    {
      "asin": "B0F3GWXLTS",
      "domainId": 1,
      "title": "Example Product Title"
    }
  ]
}
```

*Response shortened for readability; illustrative values.*

Details on the response format, the token bucket fields and the possible HTTP status codes are covered in [Making Requests](https://env.7xmtools.com/api-docs/request-basics.html).

### 3. Understand tokens

API access is metered with a token bucket: your plan generates a fixed number of tokens per minute (24/7, whether you make requests or not), and each request consumes tokens — for example, one token per requested product. This allows request bursts and a constant request rate throughout your plan's duration. Every response tells you how many tokens you have left (`tokensLeft`) and when the bucket refills (`refillIn`), so you can plan your requests.

> **Important:** Unused tokens expire after 60 minutes.

Read [Plans & Tokens](https://env.7xmtools.com/api-docs/plans-tokens.html) for how plans, subscriptions and token costs work in detail.

## Endpoints

The API offers numerous endpoints, each documented on its own page. All paths are relative to the base URL `https://api.keepa.com/`.

| Endpoint | Path | Token cost | Description |
| --- | --- | --- | --- |
| [Product Request](https://env.7xmtools.com/api-docs/product.html) | `/product` | 1 token per product (more with optional parameters) | Retrieve products, including price history, by ASIN or product code. |
| [Product Search](https://env.7xmtools.com/api-docs/product-search.html) | `/search?type=product` | 10 tokens per search (up to 20 results) | Search for Amazon products by keyword. |
| [Product Finder](https://env.7xmtools.com/api-docs/product-finder.html) | `/query` | 10 + 1 per 100 ASINs | Query the product database with complex filter criteria. |
| [Browsing Deals](https://env.7xmtools.com/api-docs/deals.html) | `/deal` | 5 tokens per request (up to 150 deals) | Browse recent price drops and deals. |
| [Best Sellers](https://env.7xmtools.com/api-docs/best-sellers.html) | `/bestsellers` | 50 tokens per request | Retrieve the best sellers list of a category. |
| [Category Lookup](https://env.7xmtools.com/api-docs/category-lookup.html) | `/category` | 1 token per request (up to 10 categories) | Look up category objects by category ID. |
| [Category Search](https://env.7xmtools.com/api-docs/category-search.html) | `/search?type=category` | 1 token per search | Search for Amazon categories by name. |
| [Seller Information](https://env.7xmtools.com/api-docs/seller.html) | `/seller` | 1 token per seller (+9 for storefront) | Retrieve information about marketplace sellers. |
| [Seller Finder](https://env.7xmtools.com/api-docs/seller-finder.html) | `/sellerquery` | 10 + 1 per 100 seller IDs | Query the seller database with complex filter criteria. |
| [Most Rated Sellers](https://env.7xmtools.com/api-docs/most-rated-sellers.html) | `/topseller` | 50 tokens per request | Retrieve the list of most rated marketplace sellers. |
| [Lightning Deals](https://env.7xmtools.com/api-docs/lightning-deals.html) | `/lightningdeal` | 1 token per ASIN · 500 tokens for the full list | Retrieve Amazon lightning deals. |
| [Graph Image API](https://env.7xmtools.com/api-docs/graph-image.html) | `/graphimage` | 1 token per image | Render price history charts as images. |
| [Tracking API](https://env.7xmtools.com/api-docs/tracking.html) | `/tracking` | varies per tracked product | Create and manage product trackings and receive notifications. |

Each endpoint page documents its token cost in detail, including the options that change it.

## Response objects

All objects returned by API requests are explained on the following pages.

- [Product Object](https://env.7xmtools.com/api-docs/product-object.html): The core object with product data and price history for a single ASIN.
- [Statistics Object](https://env.7xmtools.com/api-docs/statistics-object.html): Pre-computed statistics for a product, returned on request with product data.
- [Marketplace Offer Object](https://env.7xmtools.com/api-docs/offer-object.html): A single marketplace offer of a product, including seller and condition.
- [Category Object](https://env.7xmtools.com/api-docs/category-object.html): An Amazon category node as returned by category lookups and searches.
- [Deal Object](https://env.7xmtools.com/api-docs/deal-object.html): A price-drop entry returned by the Browsing Deals request.
- [Best Sellers Object](https://env.7xmtools.com/api-docs/best-sellers-object.html): The ranked ASIN list of a category's best sellers.
- [Seller Object](https://env.7xmtools.com/api-docs/seller-object.html): Information about a marketplace seller.
- [Lightning Deal Object](https://env.7xmtools.com/api-docs/lightning-deal-object.html): State and timing of an Amazon lightning deal.
- [Search Insights Object](https://env.7xmtools.com/api-docs/search-insights-object.html): Search insights data returned by the API.
- [Tracking Object](https://env.7xmtools.com/api-docs/tracking-object.html): Represents an active product tracking.
- [Tracking Creation Object](https://env.7xmtools.com/api-docs/tracking-creation-object.html): The object submitted to the Tracking API to create a new tracking.
- [Notification Object](https://env.7xmtools.com/api-docs/notification-object.html): A notification event fired by one of your trackings.

## Official clients & libraries

Keepa provides clients for [Java](https://github.com/keepacom/api_backend) and [PHP](https://packagist.org/packages/keepa/php_api) for fast integration. Even if you do not use Java or PHP, these resources might still be helpful for insights and examples. There is also a community-developed [Python client](https://github.com/akaszynski/keepa) available.

| Library | Maintainer | Where |
| --- | --- | --- |
| Java client | Keepa (official) | [github.com/keepacom/api\_backend](https://github.com/keepacom/api_backend) |
| PHP client | Keepa (official) | [packagist.org/packages/keepa/php\_api](https://packagist.org/packages/keepa/php_api) |
| Python client | Community | [github.com/akaszynski/keepa](https://github.com/akaszynski/keepa) |

## AI assistants (MCP)

Not writing code at all? Keepa also operates a hosted [MCP Server](https://env.7xmtools.com/api-docs/mcp.html) that hands AI assistants like Claude the same data directly — price histories, deals and seller information — authenticated with the same API key, metered by the same tokens, with nothing to install. For an assistant that writes code against the API, these docs come as Markdown too: start with the [quick reference](https://env.7xmtools.com/api-docs/quick-reference.md) or [llms.txt](https://env.7xmtools.com/api-docs/llms.txt).

> **Note:** Plans, pricing and your personal API access key are managed in your [Keepa API dashboard](https://env.7xmtools.com/api).
