Download as pdf or txt
Download as pdf or txt
You are on page 1of 55

keepa Documentation

Release 1.3.0

Alex Kaszynski

Sep 03, 2021


Contents:

1 Queries 1
1.1 Connecting to KeepaAPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Product History Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Offer Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 Category Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.5 Product Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2 keepa.Api Methods 7

3 keepa 43
3.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.3 Brief Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.4 Brief Example using async . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.5 Detailed Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.6 Credits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.7 License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

4 Indices and tables 49

Index 51

i
ii
CHAPTER 1

Queries

Interfacing with the keepa requires a valid access key. This requires a monthly subscription from Pricing. Here’s a
brief description of the subscription model from their website.
All plans are prepaid for 1 month with a subscription model. A subscription can be canceled at any time. Multiple
plans can be active on the same account and an upgrade is possible at any time, a downgrade once per month. The
plans differentiate by the number of tokens generated per minute. For example: With a single token you can retrieve
the complete data set for one product. Unused tokens expire after one hour. You can find more information on how
our plans work in our documentation.

1.1 Connecting to KeepaAPI

Import interface and establish connection to server:

import keepa
accesskey = 'XXXXXXXXXXXXXXXX' # enter real access key here
api = keepa.Keepa(accesskey)

1.2 Product History Query

The product data for a single ASIN can be queried using:

products = api.query('059035342X')
product = products[0]

where products is always a list of products, even with a single request.


You can query using ISBN-10 or ASIN like the above example by default, or by using UPC, EAN, and ISBN-
13 codes by setting product_code_is_asin to False:

1
keepa Documentation, Release 1.3.0

products = api.query('978-0786222728', product_code_is_asin=False)

Multiple products can be queried using a list or numpy array:

asins = ['0022841350', '0022841369', '0022841369', '0022841369']


asins = np.asarray(['0022841350', '0022841369', '0022841369', '0022841369'])
products = api.query(asins)
product = products[0]

The products variable is a list of product data with one entry per successful result from the Keepa server. Each
entry is a dictionary containing the same product data available from Amazon:

# Available keys
print(products[0].keys())

# Print ASIN and title


print('ASIN is ' + products[0]['asin'])
print('Title is ' + products[0]['title'])

When the parameter history is True (enabled by default), each product contains a The raw data is contained within
each product result. Raw data is stored as a dictionary with each key paired with its associated time history.

# Access new price history and associated time data


newprice = product['data']['NEW']
newpricetime = product['data']['NEW_time']

# print the first 10 prices


print('%20s %s' % ('Date', 'Price'))
for i in range(10):
print('%20s $%.2f' % (newpricetime[i], newprice[i]))

Date Price
2014-07-31 05:00:00 $55.00
2014-08-02 11:00:00 $56.19
2014-08-04 02:00:00 $56.22
2014-08-04 06:00:00 $54.99
2014-08-08 01:00:00 $49.99
2014-08-08 16:00:00 $55.66
2014-08-10 02:00:00 $49.99
2014-08-10 07:00:00 $55.66
2014-08-10 18:00:00 $57.00
2014-08-10 20:00:00 $52.51

Each time a user makes a query to keepa as well as other points in time, an entry is stored on their servers. This means
that there will sometimes be gaps in the history followed by closely spaced entries like in this example data.
The data dictionary contains keys for each type of history available for the product. These keys include:
AMAZON Amazon price history
NEW Marketplace/3rd party New price history - Amazon is considered to be part of the marketplace as
well, so if Amazon has the overall lowest new (!) price, the marketplace new price in the corre-
sponding time interval will be identical to the Amazon price (except if there is only one marketplace
offer). Shipping and Handling costs not included!
USED Marketplace/3rd party Used price history
SALES Sales Rank history. Not every product has a Sales Rank.

2 Chapter 1. Queries
keepa Documentation, Release 1.3.0

LISTPRICE List Price history


COLLECTIBLE Collectible Price history
REFURBISHED Refurbished Price history
NEW_FBM_SHIPPING 3rd party (not including Amazon) New price history including shipping costs,
only fulfilled by merchant (FBM).
LIGHTNING_DEAL 3rd party (not including Amazon) New price history including shipping costs,
only fulfilled by merchant (FBM).
WAREHOUSE Amazon Warehouse Deals price history. Mostly of used condition, rarely new.
NEW_FBA Price history of the lowest 3rd party (not including Amazon/Warehouse) New offer that is
fulfilled by Amazon
COUNT_NEW New offer count history
COUNT_USED Used offer count history
COUNT_REFURBISHED Refurbished offer count history
COUNT_COLLECTIBLE Collectible offer count history
RATING The product’s rating history. A rating is an integer from 0 to 50 (e.g. 45 = 4.5 stars)
COUNT_REVIEWS The product’s review count history.
BUY_BOX_SHIPPING The price history of the buy box. If no offer qualified for the buy box the price
has the value -1. Including shipping costs.
USED_NEW_SHIPPING “Used - Like New” price history including shipping costs.
USED_VERY_GOOD_SHIPPING “Used - Very Good” price history including shipping costs.
USED_GOOD_SHIPPING “Used - Good” price history including shipping costs.
USED_ACCEPTABLE_SHIPPING “Used - Acceptable” price history including shipping costs.
COLLECTIBLE_NEW_SHIPPING “Collectible - Like New” price history including shipping costs.
COLLECTIBLE_VERY_GOOD_SHIPPING “Collectible - Very Good” price history including ship-
ping costs.
COLLECTIBLE_GOOD_SHIPPING “Collectible - Good” price history including shipping costs.
COLLECTIBLE_ACCEPTABLE_SHIPPING “Collectible - Acceptable” price history including
shipping costs.
REFURBISHED_SHIPPING Refurbished price history including shipping costs.
TRADE_IN The trade in price history. Amazon trade-in is not available for every locale.
Each data key has a corresponding _time key containing the time values of each key. These can be plotted with:

import matplotlib.pyplot as plt


key = 'TRADE_IN'
history = product['data']
plt.step(history[key], history[key + '_time'], where='pre')

Historical data should be plotted as a step plot since the data is discontinuous. Values are unknown between each entry.
The product history can also be plotted from the module if matplotlib is installed

keepa.plot_product(product)

1.2. Product History Query 3


keepa Documentation, Release 1.3.0

1.3 Offer Queries

You can obtain the offers history for an ASIN (or multiple ASINs) using the offers parameter. See the documenta-
tion at Request Products for further details. Offer queries use more tokens than a normal request. Here’s an example
query

asin = '1454857935'
products = api.query(asin, offers=20)
product = products[0]
offers = product['offers']

# each offer contains the price history of each offer


offer = offers[0]
csv = offer['offerCSV']

# convert these values to numpy arrays


times, prices = keepa.convert_offer_history(csv)

# print the first 10 prices


print('%20s %s' % ('Date', 'Price'))
for i in range(10):
print('%20s $%.2f' % (times[i], prices[i]))

Date Price
2017-01-17 11:22:00 $155.41
2017-04-07 10:40:00 $165.51
2017-06-30 18:56:00 $171.94
2017-09-13 03:30:00 $234.99
2017-09-16 12:16:00 $170.95
2018-01-30 08:44:00 $259.21
2018-02-01 08:40:00 $255.97
2018-02-02 08:36:00 $211.91
2018-02-03 08:32:00 $203.48
2018-02-04 08:40:00 $217.37

Not all offers are active and some are only historical. The following example plots the historyof active offers for a
single Amazon product.

# for a list of active offers, use


indices = product['liveOffersOrder']

# with this you can loop through active offers:


indices = product['liveOffersOrder']
offer_times = []
offer_prices = []
for index in indices:
csv = offers[index]['offerCSV']
times, prices = keepa.convert_offer_history(csv)
offer_times.append(times)
offer_prices.append(prices)p

# you can aggregrate these using np.hstack or plot at the history individually
import matplotlib.pyplot as plt
for i in range(len(offer_prices)):
plt.step(offer_times[i], offer_prices[i])

(continues on next page)

4 Chapter 1. Queries
keepa Documentation, Release 1.3.0

(continued from previous page)


plt.xlabel('Date')
plt.ylabel('Offer Price')
plt.show()

1.4 Category Queries

You can retrieve an ASIN list of the most popular products based on sales in a specific category or product group.
Here’s an example that assumes you’ve already setup your api.

# get category id numbers for chairs


if test_categories:
categories = api.search_for_categories('chairs')

# print the first 5 catIds


catids = list(categories.keys())
for catid in catids[:5]:
print(catid, categories[catid]['name'])

# query the best sellers for "Arm Chairs"


bestsellers = api.best_sellers_query('402283011')

print('\nBest Sellers:')
for bestseller in bestsellers:
print(bestseller)

8728936011 Stools, Chairs & Seat Cushions


16053799011 Mamagreen Outdoor Dining Chairs
8297445011 Medical Chairs
(continues on next page)

1.4. Category Queries 5


keepa Documentation, Release 1.3.0

(continued from previous page)


3290537011 kitchen chairs
5769032011 Office Chairs

Best Sellers:
B00HGE0MT2
B006W6U006
B006Z8RD60
B006Z8S6UC
B009UVKXY8
B009FXIVMC
B0077LGFTK
B0078NISRY
B00ESI56B8
B00EOQ5W8G

1.5 Product Search

You can search for products using keepa using the product_finder method. There are many parameters you can
search using. See help(api.product_finder) or check the description of the function at keepa.Api Methods.

Query for all of Jim Butcher's books:

import keepa
api = keepa.Keepa('ENTER_ACTUAL_KEY_HERE')
product_parms = {'author': 'jim butcher'}
products = api.product_finder(product_parms)

6 Chapter 1. Queries
CHAPTER 2

keepa.Api Methods

class keepa.Keepa(accesskey, timeout=10)


Support a synchronous Python interface to keepa server.
Initializes API with access key. Access key can be obtained by signing up for a reoccurring or one time plan at:
https://keepa.com/#!api
Parameters
• accesskey (str) – 64 character access key string.
• timeout (float, optional) – Default timeout when issuing any request. This is not
a time limit on the entire response download; rather, an exception is raised if the server has
not issued a response for timeout seconds. Setting this to 0 disables the timeout, but will
cause any request to hang indefiantly should keepa.com be down

Examples

Create the api object

>>> import keepa


>>> mykey = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
>>> api = keepa.Keepa(mykey)

Request data from two ASINs

>>> products = api.query(['0439064872', '1426208081'])

Print item details

>>> print('Item 1')


>>> print(' ASIN: {:s}'.format(products[0]['asin']))
>>> print(' Title: {:s}'.format(products[0]['title']))

Print item price

7
keepa Documentation, Release 1.3.0

>>> usedprice = products[0]['data']['MarketplaceUsed']


>>> usedtimes = products[0]['data']['MarketplaceUsed_time']
>>> print(' Used price: ${:.2f}'.format(usedprice[-1]))
>>> print(' as of: {:s}'.format(str(usedtimes[-1])))

best_sellers_query(category, rank_avg_range=0, domain=’US’, wait=True)


Retrieve an ASIN list of the most popular products based on sales in a specific category or product group.
See “search_for_categories” for information on how to get a category.
Root category lists (e.g. “Home & Kitchen”) or product group lists contain up to 100,000 ASINs.
Sub-category lists (e.g. “Home Entertainment Furniture”) contain up to 3,000 ASINs. As we only have
access to the product’s primary sales rank and not the ones of all categories it is listed in, the sub-category
lists are created by us based on the product’s primary sales rank and do not reflect the actual ordering on
Amazon.
Lists are ordered, starting with the best selling product.
Lists are updated daily. If a product does not have an accessible sales rank it will not be included in the
lists. This in particular affects many products in the Clothing and Sports & Outdoors categories.
We can not correctly identify the sales rank reference category in all cases, so some products may be
misplaced.
Parameters
• category (str) – The category node id of the category you want to request the best sell-
ers list for. You can find category node ids via the category search “search_for_categories”
• domain (str) – Amazon locale you want to access. Must be one of the following RE-
SERVED, US, GB, DE, FR, JP, CA, CN, IT, ES, IN, MX Default US
• wait (bool, optional) – Wait available token before doing effective query. Defaults
to True.
Returns best_sellers – List of best seller ASINs
Return type list
category_lookup(category_id, domain=’US’, include_parents=0, wait=True)
Return root categories given a categoryId.
Parameters
• category_id (int) – ID for specific category or 0 to return a list of root categories.
• domain (str) – Amazon locale you want to access. Must be one of the following RE-
SERVED, US, GB, DE, FR, JP, CA, CN, IT, ES, IN, MX Default US
• include_parents (int) – Include parents.
• wait (bool, optional) – Wait available token before doing effective query. Defaults
to True.
Returns categories – Output format is the same as search_for_categories.
Return type list

Examples

Use 0 to return all root categories >>> categories = api.category_lookup(0)


Print all root categories >>> for cat_id in categories: >>> print(cat_id, categories[cat_id][‘name’])

8 Chapter 2. keepa.Api Methods


keepa Documentation, Release 1.3.0

deals(deal_parms, domain=’US’, wait=True)


Query the Keepa API for product deals.
You can find products that recently changed and match your search criteria. A single request will return a
maximum of 150 deals. Try out the deals page to first get accustomed to the options: https://keepa.com/#!
deals
For more details please visit: https://keepa.com/#!discuss/t/browsing-deals/338
Parameters
• deal_parms (dict) – Dictionary containing one or more of the following keys:
– "page": int
– "domainId": int
– "excludeCategories": list
– "includeCategories": list
– "priceTypes": list
– "deltaRange": list
– "deltaPercentRange": list
– "deltaLastRange": list
– "salesRankRange": list
– "currentRange": list
– "minRating": int
– "isLowest": bool
– "isLowestOffer": bool
– "isOutOfStock": bool
– "titleSearch": String
– "isRangeEnabled": bool
– "isFilterEnabled": bool
– "hasReviews": bool
– "filterErotic": bool
– "sortType": int
– "dateRange": int
• domain (str, optional) – One of the following Amazon domains: RESERVED,
US, GB, DE, FR, JP, CA, CN, IT, ES, IN, MX Defaults to US.
• wait (bool, optional) – Wait available token before doing effective query, Defaults
to True.

Examples

9
keepa Documentation, Release 1.3.0

>>> import keepa


>>> api = keepa.AsyncKeepa('ENTER_YOUR_KEY_HERE')
>>> deal_parms = {"page": 0,
"domainId": 1,
"excludeCategories": [1064954, 11091801],
"includeCategories": [16310101]}
>>> deals = api.deals(deal_parms)
>>> print(deals[:5])
['B00U20FN1Y', 'B078HR932T', 'B00L88ERK2',
'B07G5TDMZ7', 'B00GYMQAM0']

product_finder(product_parms, domain=’US’, wait=True)


Query the keepa product database to find products matching your criteria. Almost all product fields can be
searched for and sorted by.
Parameters
• product_parms (dict) – Dictionary containing one or more of the following keys:
– 'author': str
– 'availabilityAmazon': int
– 'avg180_AMAZON_lte': int
– 'avg180_AMAZON_gte': int
– 'avg180_BUY_BOX_SHIPPING_lte': int
– 'avg180_BUY_BOX_SHIPPING_gte': int
– 'avg180_COLLECTIBLE_lte': int
– 'avg180_COLLECTIBLE_gte': int
– 'avg180_COUNT_COLLECTIBLE_lte': int
– 'avg180_COUNT_COLLECTIBLE_gte': int
– 'avg180_COUNT_NEW_lte': int
– 'avg180_COUNT_NEW_gte': int
– 'avg180_COUNT_REFURBISHED_lte': int
– 'avg180_COUNT_REFURBISHED_gte': int
– 'avg180_COUNT_REVIEWS_lte': int
– 'avg180_COUNT_REVIEWS_gte': int
– 'avg180_COUNT_USED_lte': int
– 'avg180_COUNT_USED_gte': int
– 'avg180_EBAY_NEW_SHIPPING_lte': int
– 'avg180_EBAY_NEW_SHIPPING_gte': int
– 'avg180_EBAY_USED_SHIPPING_lte': int
– 'avg180_EBAY_USED_SHIPPING_gte': int
– 'avg180_LIGHTNING_DEAL_lte': int
– 'avg180_LIGHTNING_DEAL_gte': int
– 'avg180_LISTPRICE_lte': int

10 Chapter 2. keepa.Api Methods


keepa Documentation, Release 1.3.0

– 'avg180_LISTPRICE_gte': int
– 'avg180_NEW_lte': int
– 'avg180_NEW_gte': int
– 'avg180_NEW_FBA_lte': int
– 'avg180_NEW_FBA_gte': int
– 'avg180_NEW_FBM_SHIPPING_lte': int
– 'avg180_NEW_FBM_SHIPPING_gte': int
– 'avg180_RATING_lte': int
– 'avg180_RATING_gte': int
– 'avg180_REFURBISHED_lte': int
– 'avg180_REFURBISHED_gte': int
– 'avg180_REFURBISHED_SHIPPING_lte': int
– 'avg180_REFURBISHED_SHIPPING_gte': int
– 'avg180_RENT_lte': int
– 'avg180_RENT_gte': int
– 'avg180_SALES_lte': int
– 'avg180_SALES_gte': int
– 'avg180_TRADE_IN_lte': int
– 'avg180_TRADE_IN_gte': int
– 'avg180_USED_lte': int
– 'avg180_USED_gte': int
– 'avg180_USED_ACCEPTABLE_SHIPPING_lte': int
– 'avg180_USED_ACCEPTABLE_SHIPPING_gte': int
– 'avg180_USED_GOOD_SHIPPING_lte': int
– 'avg180_USED_GOOD_SHIPPING_gte': int
– 'avg180_USED_NEW_SHIPPING_lte': int
– 'avg180_USED_NEW_SHIPPING_gte': int
– 'avg180_USED_VERY_GOOD_SHIPPING_lte': int
– 'avg180_USED_VERY_GOOD_SHIPPING_gte': int
– 'avg180_WAREHOUSE_lte': int
– 'avg180_WAREHOUSE_gte': int
– 'avg1_AMAZON_lte': int
– 'avg1_AMAZON_gte': int
– 'avg1_BUY_BOX_SHIPPING_lte': int
– 'avg1_BUY_BOX_SHIPPING_gte': int
– 'avg1_COLLECTIBLE_lte': int

11
keepa Documentation, Release 1.3.0

– 'avg1_COLLECTIBLE_gte': int
– 'avg1_COUNT_COLLECTIBLE_lte': int
– 'avg1_COUNT_COLLECTIBLE_gte': int
– 'avg1_COUNT_NEW_lte': int
– 'avg1_COUNT_NEW_gte': int
– 'avg1_COUNT_REFURBISHED_lte': int
– 'avg1_COUNT_REFURBISHED_gte': int
– 'avg1_COUNT_REVIEWS_lte': int
– 'avg1_COUNT_REVIEWS_gte': int
– 'avg1_COUNT_USED_lte': int
– 'avg1_COUNT_USED_gte': int
– 'avg1_EBAY_NEW_SHIPPING_lte': int
– 'avg1_EBAY_NEW_SHIPPING_gte': int
– 'avg1_EBAY_USED_SHIPPING_lte': int
– 'avg1_EBAY_USED_SHIPPING_gte': int
– 'avg1_LIGHTNING_DEAL_lte': int
– 'avg1_LIGHTNING_DEAL_gte': int
– 'avg1_LISTPRICE_lte': int
– 'avg1_LISTPRICE_gte': int
– 'avg1_NEW_lte': int
– 'avg1_NEW_gte': int
– 'avg1_NEW_FBA_lte': int
– 'avg1_NEW_FBA_gte': int
– 'avg1_NEW_FBM_SHIPPING_lte': int
– 'avg1_NEW_FBM_SHIPPING_gte': int
– 'avg1_RATING_lte': int
– 'avg1_RATING_gte': int
– 'avg1_REFURBISHED_lte': int
– 'avg1_REFURBISHED_gte': int
– 'avg1_REFURBISHED_SHIPPING_lte': int
– 'avg1_REFURBISHED_SHIPPING_gte': int
– 'avg1_RENT_lte': int
– 'avg1_RENT_gte': int
– 'avg1_SALES_lte': int
– 'avg1_SALES_lte': int
– 'avg1_SALES_gte': int

12 Chapter 2. keepa.Api Methods


keepa Documentation, Release 1.3.0

– 'avg1_TRADE_IN_lte': int
– 'avg1_TRADE_IN_gte': int
– 'avg1_USED_lte': int
– 'avg1_USED_gte': int
– 'avg1_USED_ACCEPTABLE_SHIPPING_lte': int
– 'avg1_USED_ACCEPTABLE_SHIPPING_gte': int
– 'avg1_USED_GOOD_SHIPPING_lte': int
– 'avg1_USED_GOOD_SHIPPING_gte': int
– 'avg1_USED_NEW_SHIPPING_lte': int
– 'avg1_USED_NEW_SHIPPING_gte': int
– 'avg1_USED_VERY_GOOD_SHIPPING_lte': int
– 'avg1_USED_VERY_GOOD_SHIPPING_gte': int
– 'avg1_WAREHOUSE_lte': int
– 'avg1_WAREHOUSE_gte': int
– 'avg30_AMAZON_lte': int
– 'avg30_AMAZON_gte': int
– 'avg30_BUY_BOX_SHIPPING_lte': int
– 'avg30_BUY_BOX_SHIPPING_gte': int
– 'avg30_COLLECTIBLE_lte': int
– 'avg30_COLLECTIBLE_gte': int
– 'avg30_COUNT_COLLECTIBLE_lte': int
– 'avg30_COUNT_COLLECTIBLE_gte': int
– 'avg30_COUNT_NEW_lte': int
– 'avg30_COUNT_NEW_gte': int
– 'avg30_COUNT_REFURBISHED_lte': int
– 'avg30_COUNT_REFURBISHED_gte': int
– 'avg30_COUNT_REVIEWS_lte': int
– 'avg30_COUNT_REVIEWS_gte': int
– 'avg30_COUNT_USED_lte': int
– 'avg30_COUNT_USED_gte': int
– 'avg30_EBAY_NEW_SHIPPING_lte': int
– 'avg30_EBAY_NEW_SHIPPING_gte': int
– 'avg30_EBAY_USED_SHIPPING_lte': int
– 'avg30_EBAY_USED_SHIPPING_gte': int
– 'avg30_LIGHTNING_DEAL_lte': int
– 'avg30_LIGHTNING_DEAL_gte': int

13
keepa Documentation, Release 1.3.0

– 'avg30_LISTPRICE_lte': int
– 'avg30_LISTPRICE_gte': int
– 'avg30_NEW_lte': int
– 'avg30_NEW_gte': int
– 'avg30_NEW_FBA_lte': int
– 'avg30_NEW_FBA_gte': int
– 'avg30_NEW_FBM_SHIPPING_lte': int
– 'avg30_NEW_FBM_SHIPPING_gte': int
– 'avg30_RATING_lte': int
– 'avg30_RATING_gte': int
– 'avg30_REFURBISHED_lte': int
– 'avg30_REFURBISHED_gte': int
– 'avg30_REFURBISHED_SHIPPING_lte': int
– 'avg30_REFURBISHED_SHIPPING_gte': int
– 'avg30_RENT_lte': int
– 'avg30_RENT_gte': int
– 'avg30_SALES_lte': int
– 'avg30_SALES_gte': int
– 'avg30_TRADE_IN_lte': int
– 'avg30_TRADE_IN_gte': int
– 'avg30_USED_lte': int
– 'avg30_USED_gte': int
– 'avg30_USED_ACCEPTABLE_SHIPPING_lte': int
– 'avg30_USED_ACCEPTABLE_SHIPPING_gte': int
– 'avg30_USED_GOOD_SHIPPING_lte': int
– 'avg30_USED_GOOD_SHIPPING_gte': int
– 'avg30_USED_NEW_SHIPPING_lte': int
– 'avg30_USED_NEW_SHIPPING_gte': int
– 'avg30_USED_VERY_GOOD_SHIPPING_lte': int
– 'avg30_USED_VERY_GOOD_SHIPPING_gte': int
– 'avg30_WAREHOUSE_lte': int
– 'avg30_WAREHOUSE_gte': int
– 'avg7_AMAZON_lte': int
– 'avg7_AMAZON_gte': int
– 'avg7_BUY_BOX_SHIPPING_lte': int
– 'avg7_BUY_BOX_SHIPPING_gte': int

14 Chapter 2. keepa.Api Methods


keepa Documentation, Release 1.3.0

– 'avg7_COLLECTIBLE_lte': int
– 'avg7_COLLECTIBLE_gte': int
– 'avg7_COUNT_COLLECTIBLE_lte': int
– 'avg7_COUNT_COLLECTIBLE_gte': int
– 'avg7_COUNT_NEW_lte': int
– 'avg7_COUNT_NEW_gte': int
– 'avg7_COUNT_REFURBISHED_lte': int
– 'avg7_COUNT_REFURBISHED_gte': int
– 'avg7_COUNT_REVIEWS_lte': int
– 'avg7_COUNT_REVIEWS_gte': int
– 'avg7_COUNT_USED_lte': int
– 'avg7_COUNT_USED_gte': int
– 'avg7_EBAY_NEW_SHIPPING_lte': int
– 'avg7_EBAY_NEW_SHIPPING_gte': int
– 'avg7_EBAY_USED_SHIPPING_lte': int
– 'avg7_EBAY_USED_SHIPPING_gte': int
– 'avg7_LIGHTNING_DEAL_lte': int
– 'avg7_LIGHTNING_DEAL_gte': int
– 'avg7_LISTPRICE_lte': int
– 'avg7_LISTPRICE_gte': int
– 'avg7_NEW_lte': int
– 'avg7_NEW_gte': int
– 'avg7_NEW_FBA_lte': int
– 'avg7_NEW_FBA_gte': int
– 'avg7_NEW_FBM_SHIPPING_lte': int
– 'avg7_NEW_FBM_SHIPPING_gte': int
– 'avg7_RATING_lte': int
– 'avg7_RATING_gte': int
– 'avg7_REFURBISHED_lte': int
– 'avg7_REFURBISHED_gte': int
– 'avg7_REFURBISHED_SHIPPING_lte': int
– 'avg7_REFURBISHED_SHIPPING_gte': int
– 'avg7_RENT_lte': int
– 'avg7_RENT_gte': int
– 'avg7_SALES_lte': int
– 'avg7_SALES_gte': int

15
keepa Documentation, Release 1.3.0

– 'avg7_TRADE_IN_lte': int
– 'avg7_TRADE_IN_gte': int
– 'avg7_USED_lte': int
– 'avg7_USED_gte': int
– 'avg7_USED_ACCEPTABLE_SHIPPING_lte': int
– 'avg7_USED_ACCEPTABLE_SHIPPING_gte': int
– 'avg7_USED_GOOD_SHIPPING_lte': int
– 'avg7_USED_GOOD_SHIPPING_gte': int
– 'avg7_USED_NEW_SHIPPING_lte': int
– 'avg7_USED_NEW_SHIPPING_gte': int
– 'avg7_USED_VERY_GOOD_SHIPPING_lte': int
– 'avg7_USED_VERY_GOOD_SHIPPING_gte': int
– 'avg7_WAREHOUSE_lte': int
– 'avg7_WAREHOUSE_gte': int
– 'avg90_AMAZON_lte': int
– 'avg90_AMAZON_gte': int
– 'avg90_BUY_BOX_SHIPPING_lte': int
– 'avg90_BUY_BOX_SHIPPING_gte': int
– 'avg90_COLLECTIBLE_lte': int
– 'avg90_COLLECTIBLE_gte': int
– 'avg90_COUNT_COLLECTIBLE_lte': int
– 'avg90_COUNT_COLLECTIBLE_gte': int
– 'avg90_COUNT_NEW_lte': int
– 'avg90_COUNT_NEW_gte': int
– 'avg90_COUNT_REFURBISHED_lte': int
– 'avg90_COUNT_REFURBISHED_gte': int
– 'avg90_COUNT_REVIEWS_lte': int
– 'avg90_COUNT_REVIEWS_gte': int
– 'avg90_COUNT_USED_lte': int
– 'avg90_COUNT_USED_gte': int
– 'avg90_EBAY_NEW_SHIPPING_lte': int
– 'avg90_EBAY_NEW_SHIPPING_gte': int
– 'avg90_EBAY_USED_SHIPPING_lte': int
– 'avg90_EBAY_USED_SHIPPING_gte': int
– 'avg90_LIGHTNING_DEAL_lte': int
– 'avg90_LIGHTNING_DEAL_gte': int

16 Chapter 2. keepa.Api Methods


keepa Documentation, Release 1.3.0

– 'avg90_LISTPRICE_lte': int
– 'avg90_LISTPRICE_gte': int
– 'avg90_NEW_lte': int
– 'avg90_NEW_gte': int
– 'avg90_NEW_FBA_lte': int
– 'avg90_NEW_FBA_gte': int
– 'avg90_NEW_FBM_SHIPPING_lte': int
– 'avg90_NEW_FBM_SHIPPING_gte': int
– 'avg90_RATING_lte': int
– 'avg90_RATING_gte': int
– 'avg90_REFURBISHED_lte': int
– 'avg90_REFURBISHED_gte': int
– 'avg90_REFURBISHED_SHIPPING_lte': int
– 'avg90_REFURBISHED_SHIPPING_gte': int
– 'avg90_RENT_lte': int
– 'avg90_RENT_gte': int
– 'avg90_SALES_lte': int
– 'avg90_SALES_gte': int
– 'avg90_TRADE_IN_lte': int
– 'avg90_TRADE_IN_gte': int
– 'avg90_USED_lte': int
– 'avg90_USED_gte': int
– 'avg90_USED_ACCEPTABLE_SHIPPING_lte': int
– 'avg90_USED_ACCEPTABLE_SHIPPING_gte': int
– 'avg90_USED_GOOD_SHIPPING_lte': int
– 'avg90_USED_GOOD_SHIPPING_gte': int
– 'avg90_USED_NEW_SHIPPING_lte': int
– 'avg90_USED_NEW_SHIPPING_gte': int
– 'avg90_USED_VERY_GOOD_SHIPPING_lte': int
– 'avg90_USED_VERY_GOOD_SHIPPING_gte': int
– 'avg90_WAREHOUSE_lte': int
– 'avg90_WAREHOUSE_gte': int
– 'backInStock_AMAZON': bool
– 'backInStock_BUY_BOX_SHIPPING': bool
– 'backInStock_COLLECTIBLE': bool
– 'backInStock_COUNT_COLLECTIBLE': bool

17
keepa Documentation, Release 1.3.0

– 'backInStock_COUNT_NEW': bool
– 'backInStock_COUNT_REFURBISHED': bool
– 'backInStock_COUNT_REVIEWS': bool
– 'backInStock_COUNT_USED': bool
– 'backInStock_EBAY_NEW_SHIPPING': bool
– 'backInStock_EBAY_USED_SHIPPING': bool
– 'backInStock_LIGHTNING_DEAL': bool
– 'backInStock_LISTPRICE': bool
– 'backInStock_NEW': bool
– 'backInStock_NEW_FBA': bool
– 'backInStock_NEW_FBM_SHIPPING': bool
– 'backInStock_RATING': bool
– 'backInStock_REFURBISHED': bool
– 'backInStock_REFURBISHED_SHIPPING': bool
– 'backInStock_RENT': bool
– 'backInStock_SALES': bool
– 'backInStock_TRADE_IN': bool
– 'backInStock_USED': bool
– 'backInStock_USED_ACCEPTABLE_SHIPPING': bool
– 'backInStock_USED_GOOD_SHIPPING': bool
– 'backInStock_USED_NEW_SHIPPING': bool
– 'backInStock_USED_VERY_GOOD_SHIPPING': bool
– 'backInStock_WAREHOUSE': bool
– 'binding': str
– 'brand': str
– 'buyBoxSellerId': str
– 'color': str
– 'couponOneTimeAbsolute_lte': int
– 'couponOneTimeAbsolute_gte': int
– 'couponOneTimePercent_lte': int
– 'couponOneTimePercent_gte': int
– 'couponSNSAbsolute_lte': int
– 'couponSNSAbsolute_gte': int
– 'couponSNSPercent_lte': int
– 'couponSNSPercent_gte': int
– 'current_AMAZON_lte': int

18 Chapter 2. keepa.Api Methods


keepa Documentation, Release 1.3.0

– 'current_AMAZON_gte': int
– 'current_BUY_BOX_SHIPPING_lte': int
– 'current_BUY_BOX_SHIPPING_gte': int
– 'current_COLLECTIBLE_lte': int
– 'current_COLLECTIBLE_gte': int
– 'current_COUNT_COLLECTIBLE_lte': int
– 'current_COUNT_COLLECTIBLE_gte': int
– 'current_COUNT_NEW_lte': int
– 'current_COUNT_NEW_gte': int
– 'current_COUNT_REFURBISHED_lte': int
– 'current_COUNT_REFURBISHED_gte': int
– 'current_COUNT_REVIEWS_lte': int
– 'current_COUNT_REVIEWS_gte': int
– 'current_COUNT_USED_lte': int
– 'current_COUNT_USED_gte': int
– 'current_EBAY_NEW_SHIPPING_lte': int
– 'current_EBAY_NEW_SHIPPING_gte': int
– 'current_EBAY_USED_SHIPPING_lte': int
– 'current_EBAY_USED_SHIPPING_gte': int
– 'current_LIGHTNING_DEAL_lte': int
– 'current_LIGHTNING_DEAL_gte': int
– 'current_LISTPRICE_lte': int
– 'current_LISTPRICE_gte': int
– 'current_NEW_lte': int
– 'current_NEW_gte': int
– 'current_NEW_FBA_lte': int
– 'current_NEW_FBA_gte': int
– 'current_NEW_FBM_SHIPPING_lte': int
– 'current_NEW_FBM_SHIPPING_gte': int
– 'current_RATING_lte': int
– 'current_RATING_gte': int
– 'current_REFURBISHED_lte': int
– 'current_REFURBISHED_gte': int
– 'current_REFURBISHED_SHIPPING_lte': int
– 'current_REFURBISHED_SHIPPING_gte': int
– 'current_RENT_lte': int

19
keepa Documentation, Release 1.3.0

– 'current_RENT_gte': int
– 'current_SALES_lte': int
– 'current_SALES_gte': int
– 'current_TRADE_IN_lte': int
– 'current_TRADE_IN_gte': int
– 'current_USED_lte': int
– 'current_USED_gte': int
– 'current_USED_ACCEPTABLE_SHIPPING_lte': int
– 'current_USED_ACCEPTABLE_SHIPPING_gte': int
– 'current_USED_GOOD_SHIPPING_lte': int
– 'current_USED_GOOD_SHIPPING_gte': int
– 'current_USED_NEW_SHIPPING_lte': int
– 'current_USED_NEW_SHIPPING_gte': int
– 'current_USED_VERY_GOOD_SHIPPING_lte': int
– 'current_USED_VERY_GOOD_SHIPPING_gte': int
– 'current_WAREHOUSE_lte': int
– 'current_WAREHOUSE_gte': int
– 'delta1_AMAZON_lte': int
– 'delta1_AMAZON_gte': int
– 'delta1_BUY_BOX_SHIPPING_lte': int
– 'delta1_BUY_BOX_SHIPPING_gte': int
– 'delta1_COLLECTIBLE_lte': int
– 'delta1_COLLECTIBLE_gte': int
– 'delta1_COUNT_COLLECTIBLE_lte': int
– 'delta1_COUNT_COLLECTIBLE_gte': int
– 'delta1_COUNT_NEW_lte': int
– 'delta1_COUNT_NEW_gte': int
– 'delta1_COUNT_REFURBISHED_lte': int
– 'delta1_COUNT_REFURBISHED_gte': int
– 'delta1_COUNT_REVIEWS_lte': int
– 'delta1_COUNT_REVIEWS_gte': int
– 'delta1_COUNT_USED_lte': int
– 'delta1_COUNT_USED_gte': int
– 'delta1_EBAY_NEW_SHIPPING_lte': int
– 'delta1_EBAY_NEW_SHIPPING_gte': int
– 'delta1_EBAY_USED_SHIPPING_lte': int

20 Chapter 2. keepa.Api Methods


keepa Documentation, Release 1.3.0

– 'delta1_EBAY_USED_SHIPPING_gte': int
– 'delta1_LIGHTNING_DEAL_lte': int
– 'delta1_LIGHTNING_DEAL_gte': int
– 'delta1_LISTPRICE_lte': int
– 'delta1_LISTPRICE_gte': int
– 'delta1_NEW_lte': int
– 'delta1_NEW_gte': int
– 'delta1_NEW_FBA_lte': int
– 'delta1_NEW_FBA_gte': int
– 'delta1_NEW_FBM_SHIPPING_lte': int
– 'delta1_NEW_FBM_SHIPPING_gte': int
– 'delta1_RATING_lte': int
– 'delta1_RATING_gte': int
– 'delta1_REFURBISHED_lte': int
– 'delta1_REFURBISHED_gte': int
– 'delta1_REFURBISHED_SHIPPING_lte': int
– 'delta1_REFURBISHED_SHIPPING_gte': int
– 'delta1_RENT_lte': int
– 'delta1_RENT_gte': int
– 'delta1_SALES_lte': int
– 'delta1_SALES_gte': int
– 'delta1_TRADE_IN_lte': int
– 'delta1_TRADE_IN_gte': int
– 'delta1_USED_lte': int
– 'delta1_USED_gte': int
– 'delta1_USED_ACCEPTABLE_SHIPPING_lte': int
– 'delta1_USED_ACCEPTABLE_SHIPPING_gte': int
– 'delta1_USED_GOOD_SHIPPING_lte': int
– 'delta1_USED_GOOD_SHIPPING_gte': int
– 'delta1_USED_NEW_SHIPPING_lte': int
– 'delta1_USED_NEW_SHIPPING_gte': int
– 'delta1_USED_VERY_GOOD_SHIPPING_lte': int
– 'delta1_USED_VERY_GOOD_SHIPPING_gte': int
– 'delta1_WAREHOUSE_lte': int
– 'delta1_WAREHOUSE_gte': int
– 'delta30_AMAZON_lte': int

21
keepa Documentation, Release 1.3.0

– 'delta30_AMAZON_gte': int
– 'delta30_BUY_BOX_SHIPPING_lte': int
– 'delta30_BUY_BOX_SHIPPING_gte': int
– 'delta30_COLLECTIBLE_lte': int
– 'delta30_COLLECTIBLE_gte': int
– 'delta30_COUNT_COLLECTIBLE_lte': int
– 'delta30_COUNT_COLLECTIBLE_gte': int
– 'delta30_COUNT_NEW_lte': int
– 'delta30_COUNT_NEW_gte': int
– 'delta30_COUNT_REFURBISHED_lte': int
– 'delta30_COUNT_REFURBISHED_gte': int
– 'delta30_COUNT_REVIEWS_lte': int
– 'delta30_COUNT_REVIEWS_gte': int
– 'delta30_COUNT_USED_lte': int
– 'delta30_COUNT_USED_gte': int
– 'delta30_EBAY_NEW_SHIPPING_lte': int
– 'delta30_EBAY_NEW_SHIPPING_gte': int
– 'delta30_EBAY_USED_SHIPPING_lte': int
– 'delta30_EBAY_USED_SHIPPING_gte': int
– 'delta30_LIGHTNING_DEAL_lte': int
– 'delta30_LIGHTNING_DEAL_gte': int
– 'delta30_LISTPRICE_lte': int
– 'delta30_LISTPRICE_gte': int
– 'delta30_NEW_lte': int
– 'delta30_NEW_gte': int
– 'delta30_NEW_FBA_lte': int
– 'delta30_NEW_FBA_gte': int
– 'delta30_NEW_FBM_SHIPPING_lte': int
– 'delta30_NEW_FBM_SHIPPING_gte': int
– 'delta30_RATING_lte': int
– 'delta30_RATING_gte': int
– 'delta30_REFURBISHED_lte': int
– 'delta30_REFURBISHED_gte': int
– 'delta30_REFURBISHED_SHIPPING_lte': int
– 'delta30_REFURBISHED_SHIPPING_gte': int
– 'delta30_RENT_lte': int

22 Chapter 2. keepa.Api Methods


keepa Documentation, Release 1.3.0

– 'delta30_RENT_gte': int
– 'delta30_SALES_lte': int
– 'delta30_SALES_gte': int
– 'delta30_TRADE_IN_lte': int
– 'delta30_TRADE_IN_gte': int
– 'delta30_USED_lte': int
– 'delta30_USED_gte': int
– 'delta30_USED_ACCEPTABLE_SHIPPING_lte': int
– 'delta30_USED_ACCEPTABLE_SHIPPING_gte': int
– 'delta30_USED_GOOD_SHIPPING_lte': int
– 'delta30_USED_GOOD_SHIPPING_gte': int
– 'delta30_USED_NEW_SHIPPING_lte': int
– 'delta30_USED_NEW_SHIPPING_gte': int
– 'delta30_USED_VERY_GOOD_SHIPPING_lte': int
– 'delta30_USED_VERY_GOOD_SHIPPING_gte': int
– 'delta30_WAREHOUSE_lte': int
– 'delta30_WAREHOUSE_gte': int
– 'delta7_AMAZON_lte': int
– 'delta7_AMAZON_gte': int
– 'delta7_BUY_BOX_SHIPPING_lte': int
– 'delta7_BUY_BOX_SHIPPING_gte': int
– 'delta7_COLLECTIBLE_lte': int
– 'delta7_COLLECTIBLE_gte': int
– 'delta7_COUNT_COLLECTIBLE_lte': int
– 'delta7_COUNT_COLLECTIBLE_gte': int
– 'delta7_COUNT_NEW_lte': int
– 'delta7_COUNT_NEW_gte': int
– 'delta7_COUNT_REFURBISHED_lte': int
– 'delta7_COUNT_REFURBISHED_gte': int
– 'delta7_COUNT_REVIEWS_lte': int
– 'delta7_COUNT_REVIEWS_gte': int
– 'delta7_COUNT_USED_lte': int
– 'delta7_COUNT_USED_gte': int
– 'delta7_EBAY_NEW_SHIPPING_lte': int
– 'delta7_EBAY_NEW_SHIPPING_gte': int
– 'delta7_EBAY_USED_SHIPPING_lte': int

23
keepa Documentation, Release 1.3.0

– 'delta7_EBAY_USED_SHIPPING_gte': int
– 'delta7_LIGHTNING_DEAL_lte': int
– 'delta7_LIGHTNING_DEAL_gte': int
– 'delta7_LISTPRICE_lte': int
– 'delta7_LISTPRICE_gte': int
– 'delta7_NEW_lte': int
– 'delta7_NEW_gte': int
– 'delta7_NEW_FBA_lte': int
– 'delta7_NEW_FBA_gte': int
– 'delta7_NEW_FBM_SHIPPING_lte': int
– 'delta7_NEW_FBM_SHIPPING_gte': int
– 'delta7_RATING_lte': int
– 'delta7_RATING_gte': int
– 'delta7_REFURBISHED_lte': int
– 'delta7_REFURBISHED_gte': int
– 'delta7_REFURBISHED_SHIPPING_lte': int
– 'delta7_REFURBISHED_SHIPPING_gte': int
– 'delta7_RENT_lte': int
– 'delta7_RENT_gte': int
– 'delta7_SALES_lte': int
– 'delta7_SALES_gte': int
– 'delta7_TRADE_IN_lte': int
– 'delta7_TRADE_IN_gte': int
– 'delta7_USED_lte': int
– 'delta7_USED_gte': int
– 'delta7_USED_ACCEPTABLE_SHIPPING_lte': int
– 'delta7_USED_ACCEPTABLE_SHIPPING_gte': int
– 'delta7_USED_GOOD_SHIPPING_lte': int
– 'delta7_USED_GOOD_SHIPPING_gte': int
– 'delta7_USED_NEW_SHIPPING_lte': int
– 'delta7_USED_NEW_SHIPPING_gte': int
– 'delta7_USED_VERY_GOOD_SHIPPING_lte': int
– 'delta7_USED_VERY_GOOD_SHIPPING_gte': int
– 'delta7_WAREHOUSE_lte': int
– 'delta7_WAREHOUSE_gte': int
– 'delta90_AMAZON_lte': int

24 Chapter 2. keepa.Api Methods


keepa Documentation, Release 1.3.0

– 'delta90_AMAZON_gte': int
– 'delta90_BUY_BOX_SHIPPING_lte': int
– 'delta90_BUY_BOX_SHIPPING_gte': int
– 'delta90_COLLECTIBLE_lte': int
– 'delta90_COLLECTIBLE_gte': int
– 'delta90_COUNT_COLLECTIBLE_lte': int
– 'delta90_COUNT_COLLECTIBLE_gte': int
– 'delta90_COUNT_NEW_lte': int
– 'delta90_COUNT_NEW_gte': int
– 'delta90_COUNT_REFURBISHED_lte': int
– 'delta90_COUNT_REFURBISHED_gte': int
– 'delta90_COUNT_REVIEWS_lte': int
– 'delta90_COUNT_REVIEWS_gte': int
– 'delta90_COUNT_USED_lte': int
– 'delta90_COUNT_USED_gte': int
– 'delta90_EBAY_NEW_SHIPPING_lte': int
– 'delta90_EBAY_NEW_SHIPPING_gte': int
– 'delta90_EBAY_USED_SHIPPING_lte': int
– 'delta90_EBAY_USED_SHIPPING_gte': int
– 'delta90_LIGHTNING_DEAL_lte': int
– 'delta90_LIGHTNING_DEAL_gte': int
– 'delta90_LISTPRICE_lte': int
– 'delta90_LISTPRICE_gte': int
– 'delta90_NEW_lte': int
– 'delta90_NEW_gte': int
– 'delta90_NEW_FBA_lte': int
– 'delta90_NEW_FBA_gte': int
– 'delta90_NEW_FBM_SHIPPING_lte': int
– 'delta90_NEW_FBM_SHIPPING_gte': int
– 'delta90_RATING_lte': int
– 'delta90_RATING_gte': int
– 'delta90_REFURBISHED_lte': int
– 'delta90_REFURBISHED_gte': int
– 'delta90_REFURBISHED_SHIPPING_lte': int
– 'delta90_REFURBISHED_SHIPPING_gte': int
– 'delta90_RENT_lte': int

25
keepa Documentation, Release 1.3.0

– 'delta90_RENT_gte': int
– 'delta90_SALES_lte': int
– 'delta90_SALES_gte': int
– 'delta90_TRADE_IN_lte': int
– 'delta90_TRADE_IN_gte': int
– 'delta90_USED_lte': int
– 'delta90_USED_gte': int
– 'delta90_USED_ACCEPTABLE_SHIPPING_lte': int
– 'delta90_USED_ACCEPTABLE_SHIPPING_gte': int
– 'delta90_USED_GOOD_SHIPPING_lte': int
– 'delta90_USED_GOOD_SHIPPING_gte': int
– 'delta90_USED_NEW_SHIPPING_lte': int
– 'delta90_USED_NEW_SHIPPING_gte': int
– 'delta90_USED_VERY_GOOD_SHIPPING_lte': int
– 'delta90_USED_VERY_GOOD_SHIPPING_gte': int
– 'delta90_WAREHOUSE_lte': int
– 'delta90_WAREHOUSE_gte': int
– 'deltaLast_AMAZON_lte': int
– 'deltaLast_AMAZON_gte': int
– 'deltaLast_BUY_BOX_SHIPPING_lte': int
– 'deltaLast_BUY_BOX_SHIPPING_gte': int
– 'deltaLast_COLLECTIBLE_lte': int
– 'deltaLast_COLLECTIBLE_gte': int
– 'deltaLast_COUNT_COLLECTIBLE_lte': int
– 'deltaLast_COUNT_COLLECTIBLE_gte': int
– 'deltaLast_COUNT_NEW_lte': int
– 'deltaLast_COUNT_NEW_gte': int
– 'deltaLast_COUNT_REFURBISHED_lte': int
– 'deltaLast_COUNT_REFURBISHED_gte': int
– 'deltaLast_COUNT_REVIEWS_lte': int
– 'deltaLast_COUNT_REVIEWS_gte': int
– 'deltaLast_COUNT_USED_lte': int
– 'deltaLast_COUNT_USED_gte': int
– 'deltaLast_EBAY_NEW_SHIPPING_lte': int
– 'deltaLast_EBAY_NEW_SHIPPING_gte': int
– 'deltaLast_EBAY_USED_SHIPPING_lte': int

26 Chapter 2. keepa.Api Methods


keepa Documentation, Release 1.3.0

– 'deltaLast_EBAY_USED_SHIPPING_gte': int
– 'deltaLast_LIGHTNING_DEAL_lte': int
– 'deltaLast_LIGHTNING_DEAL_gte': int
– 'deltaLast_LISTPRICE_lte': int
– 'deltaLast_LISTPRICE_gte': int
– 'deltaLast_NEW_lte': int
– 'deltaLast_NEW_gte': int
– 'deltaLast_NEW_FBA_lte': int
– 'deltaLast_NEW_FBA_gte': int
– 'deltaLast_NEW_FBM_SHIPPING_lte': int
– 'deltaLast_NEW_FBM_SHIPPING_gte': int
– 'deltaLast_RATING_lte': int
– 'deltaLast_RATING_gte': int
– 'deltaLast_REFURBISHED_lte': int
– 'deltaLast_REFURBISHED_gte': int
– 'deltaLast_REFURBISHED_SHIPPING_lte': int
– 'deltaLast_REFURBISHED_SHIPPING_gte': int
– 'deltaLast_RENT_lte': int
– 'deltaLast_RENT_gte': int
– 'deltaLast_SALES_lte': int
– 'deltaLast_SALES_gte': int
– 'deltaLast_TRADE_IN_lte': int
– 'deltaLast_TRADE_IN_gte': int
– 'deltaLast_USED_lte': int
– 'deltaLast_USED_gte': int
– 'deltaLast_USED_ACCEPTABLE_SHIPPING_lte': int
– 'deltaLast_USED_ACCEPTABLE_SHIPPING_gte': int
– 'deltaLast_USED_GOOD_SHIPPING_lte': int
– 'deltaLast_USED_GOOD_SHIPPING_gte': int
– 'deltaLast_USED_NEW_SHIPPING_lte': int
– 'deltaLast_USED_NEW_SHIPPING_gte': int
– 'deltaLast_USED_VERY_GOOD_SHIPPING_lte': int
– 'deltaLast_USED_VERY_GOOD_SHIPPING_gte': int
– 'deltaLast_WAREHOUSE_lte': int
– 'deltaLast_WAREHOUSE_gte': int
– 'deltaPercent1_AMAZON_lte': int

27
keepa Documentation, Release 1.3.0

– 'deltaPercent1_AMAZON_gte': int
– 'deltaPercent1_BUY_BOX_SHIPPING_lte': int
– 'deltaPercent1_BUY_BOX_SHIPPING_gte': int
– 'deltaPercent1_COLLECTIBLE_lte': int
– 'deltaPercent1_COLLECTIBLE_gte': int
– 'deltaPercent1_COUNT_COLLECTIBLE_lte': int
– 'deltaPercent1_COUNT_COLLECTIBLE_gte': int
– 'deltaPercent1_COUNT_NEW_lte': int
– 'deltaPercent1_COUNT_NEW_gte': int
– 'deltaPercent1_COUNT_REFURBISHED_lte': int
– 'deltaPercent1_COUNT_REFURBISHED_gte': int
– 'deltaPercent1_COUNT_REVIEWS_lte': int
– 'deltaPercent1_COUNT_REVIEWS_gte': int
– 'deltaPercent1_COUNT_USED_lte': int
– 'deltaPercent1_COUNT_USED_gte': int
– 'deltaPercent1_EBAY_NEW_SHIPPING_lte': int
– 'deltaPercent1_EBAY_NEW_SHIPPING_gte': int
– 'deltaPercent1_EBAY_USED_SHIPPING_lte': int
– 'deltaPercent1_EBAY_USED_SHIPPING_gte': int
– 'deltaPercent1_LIGHTNING_DEAL_lte': int
– 'deltaPercent1_LIGHTNING_DEAL_gte': int
– 'deltaPercent1_LISTPRICE_lte': int
– 'deltaPercent1_LISTPRICE_gte': int
– 'deltaPercent1_NEW_lte': int
– 'deltaPercent1_NEW_gte': int
– 'deltaPercent1_NEW_FBA_lte': int
– 'deltaPercent1_NEW_FBA_gte': int
– 'deltaPercent1_NEW_FBM_SHIPPING_lte': int
– 'deltaPercent1_NEW_FBM_SHIPPING_gte': int
– 'deltaPercent1_RATING_lte': int
– 'deltaPercent1_RATING_gte': int
– 'deltaPercent1_REFURBISHED_lte': int
– 'deltaPercent1_REFURBISHED_gte': int
– 'deltaPercent1_REFURBISHED_SHIPPING_lte': int
– 'deltaPercent1_REFURBISHED_SHIPPING_gte': int
– 'deltaPercent1_RENT_lte': int

28 Chapter 2. keepa.Api Methods


keepa Documentation, Release 1.3.0

– 'deltaPercent1_RENT_gte': int
– 'deltaPercent1_SALES_lte': int
– 'deltaPercent1_SALES_gte': int
– 'deltaPercent1_TRADE_IN_lte': int
– 'deltaPercent1_TRADE_IN_gte': int
– 'deltaPercent1_USED_lte': int
– 'deltaPercent1_USED_gte': int
– 'deltaPercent1_USED_ACCEPTABLE_SHIPPING_lte': int
– 'deltaPercent1_USED_ACCEPTABLE_SHIPPING_gte': int
– 'deltaPercent1_USED_GOOD_SHIPPING_lte': int
– 'deltaPercent1_USED_GOOD_SHIPPING_gte': int
– 'deltaPercent1_USED_NEW_SHIPPING_lte': int
– 'deltaPercent1_USED_NEW_SHIPPING_gte': int
– 'deltaPercent1_USED_VERY_GOOD_SHIPPING_lte': int
– 'deltaPercent1_USED_VERY_GOOD_SHIPPING_gte': int
– 'deltaPercent1_WAREHOUSE_lte': int
– 'deltaPercent1_WAREHOUSE_gte': int
– 'deltaPercent30_AMAZON_lte': int
– 'deltaPercent30_AMAZON_gte': int
– 'deltaPercent30_BUY_BOX_SHIPPING_lte': int
– 'deltaPercent30_BUY_BOX_SHIPPING_gte': int
– 'deltaPercent30_COLLECTIBLE_lte': int
– 'deltaPercent30_COLLECTIBLE_gte': int
– 'deltaPercent30_COUNT_COLLECTIBLE_lte': int
– 'deltaPercent30_COUNT_COLLECTIBLE_gte': int
– 'deltaPercent30_COUNT_NEW_lte': int
– 'deltaPercent30_COUNT_NEW_gte': int
– 'deltaPercent30_COUNT_REFURBISHED_lte': int
– 'deltaPercent30_COUNT_REFURBISHED_gte': int
– 'deltaPercent30_COUNT_REVIEWS_lte': int
– 'deltaPercent30_COUNT_REVIEWS_gte': int
– 'deltaPercent30_COUNT_USED_lte': int
– 'deltaPercent30_COUNT_USED_gte': int
– 'deltaPercent30_EBAY_NEW_SHIPPING_lte': int
– 'deltaPercent30_EBAY_NEW_SHIPPING_gte': int
– 'deltaPercent30_EBAY_USED_SHIPPING_lte': int

29
keepa Documentation, Release 1.3.0

– 'deltaPercent30_EBAY_USED_SHIPPING_gte': int
– 'deltaPercent30_LIGHTNING_DEAL_lte': int
– 'deltaPercent30_LIGHTNING_DEAL_gte': int
– 'deltaPercent30_LISTPRICE_lte': int
– 'deltaPercent30_LISTPRICE_gte': int
– 'deltaPercent30_NEW_lte': int
– 'deltaPercent30_NEW_gte': int
– 'deltaPercent30_NEW_FBA_lte': int
– 'deltaPercent30_NEW_FBA_gte': int
– 'deltaPercent30_NEW_FBM_SHIPPING_lte': int
– 'deltaPercent30_NEW_FBM_SHIPPING_gte': int
– 'deltaPercent30_RATING_lte': int
– 'deltaPercent30_RATING_gte': int
– 'deltaPercent30_REFURBISHED_lte': int
– 'deltaPercent30_REFURBISHED_gte': int
– 'deltaPercent30_REFURBISHED_SHIPPING_lte': int
– 'deltaPercent30_REFURBISHED_SHIPPING_gte': int
– 'deltaPercent30_RENT_lte': int
– 'deltaPercent30_RENT_gte': int
– 'deltaPercent30_SALES_lte': int
– 'deltaPercent30_SALES_gte': int
– 'deltaPercent30_TRADE_IN_lte': int
– 'deltaPercent30_TRADE_IN_gte': int
– 'deltaPercent30_USED_lte': int
– 'deltaPercent30_USED_gte': int
– 'deltaPercent30_USED_ACCEPTABLE_SHIPPING_lte': int
– 'deltaPercent30_USED_ACCEPTABLE_SHIPPING_gte': int
– 'deltaPercent30_USED_GOOD_SHIPPING_lte': int
– 'deltaPercent30_USED_GOOD_SHIPPING_gte': int
– 'deltaPercent30_USED_NEW_SHIPPING_lte': int
– 'deltaPercent30_USED_NEW_SHIPPING_gte': int
– 'deltaPercent30_USED_VERY_GOOD_SHIPPING_lte': int
– 'deltaPercent30_USED_VERY_GOOD_SHIPPING_gte': int
– 'deltaPercent30_WAREHOUSE_lte': int
– 'deltaPercent30_WAREHOUSE_gte': int
– 'deltaPercent7_AMAZON_lte': int

30 Chapter 2. keepa.Api Methods


keepa Documentation, Release 1.3.0

– 'deltaPercent7_AMAZON_gte': int
– 'deltaPercent7_BUY_BOX_SHIPPING_lte': int
– 'deltaPercent7_BUY_BOX_SHIPPING_gte': int
– 'deltaPercent7_COLLECTIBLE_lte': int
– 'deltaPercent7_COLLECTIBLE_gte': int
– 'deltaPercent7_COUNT_COLLECTIBLE_lte': int
– 'deltaPercent7_COUNT_COLLECTIBLE_gte': int
– 'deltaPercent7_COUNT_NEW_lte': int
– 'deltaPercent7_COUNT_NEW_gte': int
– 'deltaPercent7_COUNT_REFURBISHED_lte': int
– 'deltaPercent7_COUNT_REFURBISHED_gte': int
– 'deltaPercent7_COUNT_REVIEWS_lte': int
– 'deltaPercent7_COUNT_REVIEWS_gte': int
– 'deltaPercent7_COUNT_USED_lte': int
– 'deltaPercent7_COUNT_USED_gte': int
– 'deltaPercent7_EBAY_NEW_SHIPPING_lte': int
– 'deltaPercent7_EBAY_NEW_SHIPPING_gte': int
– 'deltaPercent7_EBAY_USED_SHIPPING_lte': int
– 'deltaPercent7_EBAY_USED_SHIPPING_gte': int
– 'deltaPercent7_LIGHTNING_DEAL_lte': int
– 'deltaPercent7_LIGHTNING_DEAL_gte': int
– 'deltaPercent7_LISTPRICE_lte': int
– 'deltaPercent7_LISTPRICE_gte': int
– 'deltaPercent7_NEW_lte': int
– 'deltaPercent7_NEW_gte': int
– 'deltaPercent7_NEW_FBA_lte': int
– 'deltaPercent7_NEW_FBA_gte': int
– 'deltaPercent7_NEW_FBM_SHIPPING_lte': int
– 'deltaPercent7_NEW_FBM_SHIPPING_gte': int
– 'deltaPercent7_RATING_lte': int
– 'deltaPercent7_RATING_gte': int
– 'deltaPercent7_REFURBISHED_lte': int
– 'deltaPercent7_REFURBISHED_gte': int
– 'deltaPercent7_REFURBISHED_SHIPPING_lte': int
– 'deltaPercent7_REFURBISHED_SHIPPING_gte': int
– 'deltaPercent7_RENT_lte': int

31
keepa Documentation, Release 1.3.0

– 'deltaPercent7_RENT_gte': int
– 'deltaPercent7_SALES_lte': int
– 'deltaPercent7_SALES_gte': int
– 'deltaPercent7_TRADE_IN_lte': int
– 'deltaPercent7_TRADE_IN_gte': int
– 'deltaPercent7_USED_lte': int
– 'deltaPercent7_USED_gte': int
– 'deltaPercent7_USED_ACCEPTABLE_SHIPPING_lte': int
– 'deltaPercent7_USED_ACCEPTABLE_SHIPPING_gte': int
– 'deltaPercent7_USED_GOOD_SHIPPING_lte': int
– 'deltaPercent7_USED_GOOD_SHIPPING_gte': int
– 'deltaPercent7_USED_NEW_SHIPPING_lte': int
– 'deltaPercent7_USED_NEW_SHIPPING_gte': int
– 'deltaPercent7_USED_VERY_GOOD_SHIPPING_lte': int
– 'deltaPercent7_USED_VERY_GOOD_SHIPPING_gte': int
– 'deltaPercent7_WAREHOUSE_lte': int
– 'deltaPercent7_WAREHOUSE_gte': int
– 'deltaPercent90_AMAZON_lte': int
– 'deltaPercent90_AMAZON_gte': int
– 'deltaPercent90_BUY_BOX_SHIPPING_lte': int
– 'deltaPercent90_BUY_BOX_SHIPPING_gte': int
– 'deltaPercent90_COLLECTIBLE_lte': int
– 'deltaPercent90_COLLECTIBLE_gte': int
– 'deltaPercent90_COUNT_COLLECTIBLE_lte': int
– 'deltaPercent90_COUNT_COLLECTIBLE_gte': int
– 'deltaPercent90_COUNT_NEW_lte': int
– 'deltaPercent90_COUNT_NEW_gte': int
– 'deltaPercent90_COUNT_REFURBISHED_lte': int
– 'deltaPercent90_COUNT_REFURBISHED_gte': int
– 'deltaPercent90_COUNT_REVIEWS_lte': int
– 'deltaPercent90_COUNT_REVIEWS_gte': int
– 'deltaPercent90_COUNT_USED_lte': int
– 'deltaPercent90_COUNT_USED_gte': int
– 'deltaPercent90_EBAY_NEW_SHIPPING_lte': int
– 'deltaPercent90_EBAY_NEW_SHIPPING_gte': int
– 'deltaPercent90_EBAY_USED_SHIPPING_lte': int

32 Chapter 2. keepa.Api Methods


keepa Documentation, Release 1.3.0

– 'deltaPercent90_EBAY_USED_SHIPPING_gte': int
– 'deltaPercent90_LIGHTNING_DEAL_lte': int
– 'deltaPercent90_LIGHTNING_DEAL_gte': int
– 'deltaPercent90_LISTPRICE_lte': int
– 'deltaPercent90_LISTPRICE_gte': int
– 'deltaPercent90_NEW_lte': int
– 'deltaPercent90_NEW_gte': int
– 'deltaPercent90_NEW_FBA_lte': int
– 'deltaPercent90_NEW_FBA_gte': int
– 'deltaPercent90_NEW_FBM_SHIPPING_lte': int
– 'deltaPercent90_NEW_FBM_SHIPPING_gte': int
– 'deltaPercent90_RATING_lte': int
– 'deltaPercent90_RATING_gte': int
– 'deltaPercent90_REFURBISHED_lte': int
– 'deltaPercent90_REFURBISHED_gte': int
– 'deltaPercent90_REFURBISHED_SHIPPING_lte': int
– 'deltaPercent90_REFURBISHED_SHIPPING_gte': int
– 'deltaPercent90_RENT_lte': int
– 'deltaPercent90_RENT_gte': int
– 'deltaPercent90_SALES_lte': int
– 'deltaPercent90_SALES_gte': int
– 'deltaPercent90_TRADE_IN_lte': int
– 'deltaPercent90_TRADE_IN_gte': int
– 'deltaPercent90_USED_lte': int
– 'deltaPercent90_USED_gte': int
– 'deltaPercent90_USED_ACCEPTABLE_SHIPPING_lte': int
– 'deltaPercent90_USED_ACCEPTABLE_SHIPPING_gte': int
– 'deltaPercent90_USED_GOOD_SHIPPING_lte': int
– 'deltaPercent90_USED_GOOD_SHIPPING_gte': int
– 'deltaPercent90_USED_NEW_SHIPPING_lte': int
– 'deltaPercent90_USED_NEW_SHIPPING_gte': int
– 'deltaPercent90_USED_VERY_GOOD_SHIPPING_lte': int
– 'deltaPercent90_USED_VERY_GOOD_SHIPPING_gte': int
– 'deltaPercent90_WAREHOUSE_lte': int
– 'deltaPercent90_WAREHOUSE_gte': int
– 'department': str

33
keepa Documentation, Release 1.3.0

– 'edition': str
– 'fbaFees_lte': int
– 'fbaFees_gte': int
– 'format': str
– 'genre': str
– 'hasParentASIN': bool
– 'hasReviews': bool
– 'hazardousMaterialType_lte': int
– 'hazardousMaterialType_gte': int
– 'isAdultProduct': bool
– 'isEligibleForSuperSaverShipping': bool
– 'isEligibleForTradeIn': bool
– 'isHighestOffer': bool
– 'isHighest_AMAZON': bool
– 'isHighest_BUY_BOX_SHIPPING': bool
– 'isHighest_COLLECTIBLE': bool
– 'isHighest_COUNT_COLLECTIBLE': bool
– 'isHighest_COUNT_NEW': bool
– 'isHighest_COUNT_REFURBISHED': bool
– 'isHighest_COUNT_REVIEWS': bool
– 'isHighest_COUNT_USED': bool
– 'isHighest_EBAY_NEW_SHIPPING': bool
– 'isHighest_EBAY_USED_SHIPPING': bool
– 'isHighest_LIGHTNING_DEAL': bool
– 'isHighest_LISTPRICE': bool
– 'isHighest_NEW': bool
– 'isHighest_NEW_FBA': bool
– 'isHighest_NEW_FBM_SHIPPING': bool
– 'isHighest_RATING': bool
– 'isHighest_REFURBISHED': bool
– 'isHighest_REFURBISHED_SHIPPING': bool
– 'isHighest_RENT': bool
– 'isHighest_SALES': bool
– 'isHighest_TRADE_IN': bool
– 'isHighest_USED': bool
– 'isHighest_USED_ACCEPTABLE_SHIPPING': bool

34 Chapter 2. keepa.Api Methods


keepa Documentation, Release 1.3.0

– 'isHighest_USED_GOOD_SHIPPING': bool
– 'isHighest_USED_NEW_SHIPPING': bool
– 'isHighest_USED_VERY_GOOD_SHIPPING': bool
– 'isHighest_WAREHOUSE': bool
– 'isLowestOffer': bool
– 'isLowest_AMAZON': bool
– 'isLowest_BUY_BOX_SHIPPING': bool
– 'isLowest_COLLECTIBLE': bool
– 'isLowest_COUNT_COLLECTIBLE': bool
– 'isLowest_COUNT_NEW': bool
– 'isLowest_COUNT_REFURBISHED': bool
– 'isLowest_COUNT_REVIEWS': bool
– 'isLowest_COUNT_USED': bool
– 'isLowest_EBAY_NEW_SHIPPING': bool
– 'isLowest_EBAY_USED_SHIPPING': bool
– 'isLowest_LIGHTNING_DEAL': bool
– 'isLowest_LISTPRICE': bool
– 'isLowest_NEW': bool
– 'isLowest_NEW_FBA': bool
– 'isLowest_NEW_FBM_SHIPPING': bool
– 'isLowest_RATING': bool
– 'isLowest_REFURBISHED': bool
– 'isLowest_REFURBISHED_SHIPPING': bool
– 'isLowest_RENT': bool
– 'isLowest_SALES': bool
– 'isLowest_TRADE_IN': bool
– 'isLowest_USED': bool
– 'isLowest_USED_ACCEPTABLE_SHIPPING': bool
– 'isLowest_USED_GOOD_SHIPPING': bool
– 'isLowest_USED_NEW_SHIPPING': bool
– 'isLowest_USED_VERY_GOOD_SHIPPING': bool
– 'isLowest_WAREHOUSE': bool
– 'isPrimeExclusive': bool
– 'isSNS': bool
– 'label': str
– 'languages': str

35
keepa Documentation, Release 1.3.0

– 'lastOffersUpdate_lte': int
– 'lastOffersUpdate_gte': int
– 'lastPriceChange_lte': int
– 'lastPriceChange_gte': int
– 'lastRatingUpdate_lte': int
– 'lastRatingUpdate_gte': int
– 'lastUpdate_lte': int
– 'lastUpdate_gte': int
– 'lightningEnd_lte': int
– 'lightningEnd_gte': int
– 'lightningStart_lte': int
– 'lightningStart_gte': int
– 'listedSince_lte': int
– 'listedSince_gte': int
– 'manufacturer': str
– 'model': str
– 'newPriceIsMAP': bool
– 'nextUpdate_lte': int
– 'nextUpdate_gte': int
– 'numberOfItems_lte': int
– 'numberOfItems_gte': int
– 'numberOfPages_lte': int
– 'numberOfPages_gte': int
– 'numberOfTrackings_lte': int
– 'numberOfTrackings_gte': int
– 'offerCountFBA_lte': int
– 'offerCountFBA_gte': int
– 'offerCountFBM_lte': int
– 'offerCountFBM_gte': int
– 'outOfStockPercentageInInterval_lte': int
– 'outOfStockPercentageInInterval_gte': int
– 'packageDimension_lte': int
– 'packageDimension_gte': int
– 'packageHeight_lte': int
– 'packageHeight_gte': int
– 'packageLength_lte': int

36 Chapter 2. keepa.Api Methods


keepa Documentation, Release 1.3.0

– 'packageLength_gte': int
– 'packageQuantity_lte': int
– 'packageQuantity_gte': int
– 'packageWeight_lte': int
– 'packageWeight_gte': int
– 'packageWidth_lte': int
– 'packageWidth_gte': int
– 'partNumber': str
– 'platform': str
– 'productGroup': str
– 'productType': int
– 'promotions': int
– 'publicationDate_lte': int
– 'publicationDate_gte': int
– 'publisher': str
– 'releaseDate_lte': int
– 'releaseDate_gte': int
– 'rootCategory': int
– 'sellerIds': str
– 'sellerIdsLowestFBA': str
– 'sellerIdsLowestFBM': str
– 'size': str
– 'salesRankDrops180_lte': int
– 'salesRankDrops180_gte': int
– 'salesRankDrops90_lte': int
– 'salesRankDrops90_gte': int
– 'salesRankDrops30_lte': int
– 'salesRankDrops30_gte': int
– 'stockAmazon_lte': int
– 'stockAmazon_gte': int
– 'stockBuyBox_lte': int
– 'stockBuyBox_gte': int
– 'studio': str
– 'title': str
– 'title_flag': str
– 'trackingSince_lte': int

37
keepa Documentation, Release 1.3.0

– 'trackingSince_gte': int
– 'type': str
– 'mpn': str
– 'outOfStockPercentage90_lte': int
– 'outOfStockPercentage90_gte': int
– 'categories_include': int
– 'categories_exclude': int
• domain (str, optional) – One of the following Amazon domains: RESERVED,
US, GB, DE, FR, JP, CA, CN, IT, ES, IN, MX Defaults to US.
• wait (bool, optional) – Wait available token before doing effective query, Defaults
to True.

Examples

Query for all of Jim Butcher’s books

>>> import keepa


>>> api = keepa.AsyncKeepa('ENTER_ACTUAL_KEY_HERE')
>>> product_parms = {'author': 'jim butcher'}
>>> products = api.product_finder(product_parms)

query(items, stats=None, domain=’US’, history=True, offers=None, update=None, to_datetime=True,


rating=False, out_of_stock_as_nan=True, stock=False, product_code_is_asin=True,
progress_bar=True, buybox=False, wait=True, days=None, only_live_offers=None,
raw=False)
Performs a product query of a list, array, or single ASIN.
Returns a list of product data with one entry for each product.
Parameters
• items (str, list, np.ndarray) – A list, array, or single asin, UPC, EAN, or
ISBN-13 identifying a product. ASINs should be 10 characters and match a product on
Amazon. Items not matching Amazon product or duplicate Items will return no data.
When using non-ASIN items, set product_code_is_asin to False
• stats (int or date, optional) – No extra token cost. If specified the product
object will have a stats field with quick access to current prices, min/max prices and the
weighted mean values. If the offers parameter was used it will also provide stock counts
and buy box information.
You can provide the stats parameter in two forms:
Last x days (positive integer value): calculates the stats of the last x days, where x is the
value of the stats parameter. Interval: You can provide a date range for the stats calculation.
You can specify the range via two timestamps (unix epoch time milliseconds) or two date
strings (ISO8601, with or without time in UTC).
• domain (str, optional) – One of the following Amazon domains: RESERVED,
US, GB, DE, FR, JP, CA, CN, IT, ES, IN, MX Defaults to US.
• offers (int, optional) – Adds available offers to product data. Default 0. Must
be between 20 and 100.

38 Chapter 2. keepa.Api Methods


keepa Documentation, Release 1.3.0

• update (int, optional) – if data is older than the input integer, keepa will update
their database and return live data. If set to 0 (live data), request may cost an additional
token. Default None
• history (bool, optional) – When set to True includes the price, sales, and offer
history of a product. Set to False to reduce request time if data is not required. Default
True
• rating (bool, optional) – When set to to True, includes the existing RATING and
COUNT_REVIEWS history of the csv field. Default False
• to_datetime (bool, optional) – Modifies numpy minutes to datetime.datetime
values. Default True.
• out_of_stock_as_nan (bool, optional) – When True, prices are NAN when
price category is out of stock. When False, prices are -0.01 Default True
• stock (bool, optional) – Can only be used if the offers parameter is also True. If
True, the stock will be collected for all retrieved live offers. Note: We can only determine
stock up 10 qty. Stock retrieval takes additional time, expect the request to take longer.
Existing stock history will be included whether or not the stock parameter is used.
• product_code_is_asin (bool, optional) – The type of product code you are
requesting. True when product code is an ASIN, an Amazon standard identification num-
ber, or ‘code’, for UPC, EAN, or ISBN-13 codes.
• progress_bar (bool, optional) – Display a progress bar using tqdm. Defaults
to True.
• buybox (bool, optional) – Additional token cost: 2 per product). When true the
product and statistics object will include all available buy box related data:
– current price, price history, and statistical values
– buyBoxSellerIdHistory
– all buy box fields in the statistics object
The buybox parameter does not trigger a fresh data collection. If the offers parameter is
used the buybox parameter is ignored, as the offers parameter also provides access to all
buy box related data. To access the statistics object the stats parameter is required.
• wait (bool, optional) – Wait available token before doing effective query, Defaults
to True.
• only_live_offers (bool, optional) – If set to True, the product object will
only include live marketplace offers (when used in combination with the offers parameter).
If you do not need historical offers use this to have them removed from the response. This
can improve processing time and considerably decrease the size of the response. Default
None
• days (int, optional) – Any positive integer value. If specified and has positive
value X the product object will limit all historical data to the recent X days. This includes
the csv, buyBoxSellerIdHistory, salesRanks, offers and offers.offerCSV fields. If you do
not need old historical data use this to have it removed from the response. This can improve
processing time and considerably decrease the size of the response. The parameter does
not use calendar days - so 1 day equals the last 24 hours. The oldest data point of each
field may have a date value which is out of the specified range. This means the value of
the field has not changed since that date and is still active. Default None
• raw (bool, optional) – When True, return the raw request response. This is only
available in the non-async class.

39
keepa Documentation, Release 1.3.0

Returns
List of products when raw=False. Each product within the list is a dictionary. The keys
of each item may vary, so see the keys within each product for further details.
Each product should contain at a minimum a “data” key containing a formatted dictionary.
For the available fields see the notes section
When raw=True, a list of unparsed responses are returned as requests.models.
Response.
See: https://keepa.com/#!discuss/t/product-object/116
Return type list

Notes

The following are data fields a product dictionary


AMAZON Amazon price history
NEW Marketplace/3rd party New price history - Amazon is considered to be part of the marketplace as
well, so if Amazon has the overall lowest new (!) price, the marketplace new price in the correspond-
ing time interval will be identical to the Amazon price (except if there is only one marketplace offer).
Shipping and Handling costs not included!
USED Marketplace/3rd party Used price history
SALES Sales Rank history. Not every product has a Sales Rank.
LISTPRICE List Price history
COLLECTIBLE Collectible Price history
REFURBISHED Refurbished Price history
NEW_FBM_SHIPPING 3rd party (not including Amazon) New price history including shipping costs,
only fulfilled by merchant (FBM).
LIGHTNING_DEAL 3rd party (not including Amazon) New price history including shipping costs, only
fulfilled by merchant (FBM).
WAREHOUSE Amazon Warehouse Deals price history. Mostly of used condition, rarely new.
NEW_FBA Price history of the lowest 3rd party (not including Amazon/Warehouse) New offer that is
fulfilled by Amazon
COUNT_NEW New offer count history
COUNT_USED Used offer count history
COUNT_REFURBISHED Refurbished offer count history
COUNT_COLLECTIBLE Collectible offer count history
RATING The product’s rating history. A rating is an integer from 0 to 50 (e.g. 45 = 4.5 stars)
COUNT_REVIEWS The product’s review count history.
BUY_BOX_SHIPPING The price history of the buy box. If no offer qualified for the buy box the price
has the value -1. Including shipping costs.
USED_NEW_SHIPPING “Used - Like New” price history including shipping costs.
USED_VERY_GOOD_SHIPPING “Used - Very Good” price history including shipping costs.

40 Chapter 2. keepa.Api Methods


keepa Documentation, Release 1.3.0

USED_GOOD_SHIPPING “Used - Good” price history including shipping costs.


USED_ACCEPTABLE_SHIPPING “Used - Acceptable” price history including shipping costs.
COLLECTIBLE_NEW_SHIPPING “Collectible - Like New” price history including shipping costs.
COLLECTIBLE_VERY_GOOD_SHIPPING “Collectible - Very Good” price history including ship-
ping costs.
COLLECTIBLE_GOOD_SHIPPING “Collectible - Good” price history including shipping costs.
COLLECTIBLE_ACCEPTABLE_SHIPPING “Collectible - Acceptable” price history including ship-
ping costs.
REFURBISHED_SHIPPING Refurbished price history including shipping costs.
TRADE_IN The trade in price history. Amazon trade-in is not available for every locale.
BUY_BOX_SHIPPING The price history of the buy box. If no offer qualified for the buy box the price
has the value -1. Including shipping costs. The buybox parameter must be True for this field to be
in the data.
search_for_categories(searchterm, domain=’US’, wait=True)
Searches for categories from Amazon.
Parameters
• searchterm (str) – Input search term.
• wait (bool, optional) – Wait available token before doing effective query. Defaults
to True.
Returns categories – The response contains a categories list with all matching categories.
Return type list

Examples

Print all categories from science

>>> categories = api.search_for_categories('science')


>>> for cat_id in categories:
>>> print(cat_id, categories[cat_id]['name'])

seller_query(seller_id, domain=’US’, to_datetime=True, storefront=False, update=None,


wait=True)
Receives seller information for a given seller id. If a seller is not found no tokens will be consumed.
Token cost: 1 per requested seller
Parameters
• seller_id (str or list) – The seller id of the merchant you want to request. For
batch requests, you may submit a list of 100 seller_ids. The seller id can also be found on
Amazon on seller profile pages in the seller parameter of the URL as well as in the offers
results from a product query.
• domain (str, optional) – One of the following Amazon domains: RESERVED,
US, GB, DE, FR, JP, CA, CN, IT, ES, IN, MX Defaults to US.
• storefront (bool, optional) – If specified the seller object will contain addi-
tional information about what items the seller is listing on Amazon. This includes a list of
ASINs as well as the total amount of items the seller has listed. The following seller object

41
keepa Documentation, Release 1.3.0

fields will be set if data is available: asinList, asinListLastSeen, totalStorefrontAsinsCSV.


If no data is available no additional tokens will be consumed. The ASIN list can contain
up to 100,000 items. As using the storefront parameter does not trigger any new collection
it does not increase the processing time of the request, though the response may be much
bigger in size. The total storefront ASIN count will not be updated, only historical data
will be provided (when available).
• update (int, optional) – Positive integer value. If the last live data collection from
the Amazon storefront page is older than update hours force a new collection. Use this
parameter in conjunction with the storefront parameter. Token cost will only be applied if
a new collection is triggered.
Using this parameter you can achieve the following:
– Retrieve data from Amazon: a storefront ASIN list containing up to 2,400 ASINs, in
addition to all ASINs already collected through our database.
– Force a refresh: Always retrieve live data with the value 0.
– Retrieve the total number of listings of this seller: the totalStorefrontAsinsCSV field of
the seller object will be updated.
• wait (bool, optional) – Wait available token before doing effective query. Defaults
to True.
Returns seller_info – Dictionary containing one entry per input seller_id.
Return type dict

Examples

>>> seller_info = api.seller_query('A2L77EE7U53NWQ', 'US')

Notes

Seller data is not available for Amazon China.


time_to_refill
Returns the time to refill in seconds
update_status()
Updates available tokens
wait_for_tokens()
Checks any remaining tokens and waits if none are available.

42 Chapter 2. keepa.Api Methods


CHAPTER 3

keepa

This Python module allows you to interface with the API at Keepa to query for Amazon product information and
history. It also contains a plotting module to allow for plotting of a product.
See API pricing at Keepa API
Documentation can be found on readthedocs at keepa Documentation.

3.1 Requirements

Module is compatible with Python >= 3.6 and requires:


• numpy
• aiohttp
• matplotlib
• tqdm
Product history can be plotted from the raw data when matplotlib is installed.
Interfacing with the keepa requires an access key and a monthly subscription from Keepa API

3.2 Installation

Module can be installed from PyPi with:

43
keepa Documentation, Release 1.3.0

pip install keepa

Source code can also be downloaded from GitHub and installed using: python setup.py install or pip
install .

3.3 Brief Example

import keepa
accesskey = 'XXXXXXXXXXXXXXXX' # enter real access key here
api = keepa.Keepa(accesskey)

# Single ASIN query


products = api.query('B0088PUEPK') # returns list of product data

# Plot result (requires matplotlib)


keepa.plot_product(products[0])

Fig. 1: Product Price Plot

3.4 Brief Example using async

Here’s an example of obtaining a product and plotting its price and offer history using the async interface:
import keepa

# establish interface with keepa (this is not a real key)


mykey = '0000000000000000000000000000000000000000000000000000000000000000'
api = await keepa.AsyncKeepa.create(mykey)
(continues on next page)

44 Chapter 3. keepa
keepa Documentation, Release 1.3.0

Fig. 2: Product Offers Plot

(continued from previous page)

# plot product request


request = 'B0088PUEPK'
products = await api.query(request)
product = products[0]
keepa.plot_product(product)

3.5 Detailed Examples

Import interface and establish connection to server

import keepa
accesskey = 'XXXXXXXXXXXXXXXX' # enter real access key here
api = keepa.Keepa(accesskey)

Single ASIN query

products = api.query('059035342X')

# See help(api.query) for available options when querying the API

You can use keepa witch async / await too

import keepa
accesskey = 'XXXXXXXXXXXXXXXX' # enter real access key here
api = await keepa.AsyncKeepa.create(accesskey)

Single ASIN query (async)

3.5. Detailed Examples 45


keepa Documentation, Release 1.3.0

products = await api.query('059035342X')

Multiple ASIN query from List


asins = ['0022841350', '0022841369', '0022841369', '0022841369']
products = api.query(asins)

Multiple ASIN query from numpy array


asins = np.asarray(['0022841350', '0022841369', '0022841369', '0022841369'])
products = api.query(asins)

Products is a list of product data with one entry per successful result from the Keepa server. Each entry is a dictionary
containing the same product data available from Amazon.
# Available keys
print(products[0].keys())

# Print ASIN and title


print('ASIN is ' + products[0]['asin'])
print('Title is ' + products[0]['title'])

The raw data is contained within each product result. Raw data is stored as a dictionary with each key paired with its
associated time history.
# Access new price history and associated time data
newprice = products[0]['data']['NEW']
newpricetime = products[0]['data']['NEW_time']

# Can be plotted with matplotlib using:


import matplotlib.pyplot as plt
plt.step(newpricetime, newprice, where='pre')

# Keys can be listed by


print(products[0]['data'].keys())

The product history can also be plotted from the module if matplotlib is installed
keepa.plot_product(products[0])

You can obtain the offers history for an ASIN (or multiple ASINs) using the offers parameter. See the documenta-
tion at Request Products for further details.
products = api.query(asins, offers=20)
product = products[0]
offers = product['offers']

# each offer contains the price history of each offer


offer = offers[0]
csv = offer['offerCSV']

# convert these values to numpy arrays


times, prices = keepa.convert_offer_history(csv)

# for a list of active offers, see


indices = product['liveOffersOrder']

(continues on next page)

46 Chapter 3. keepa
keepa Documentation, Release 1.3.0

(continued from previous page)


# with this you can loop through active offers:
indices = product['liveOffersOrder']
offer_times = []
offer_prices = []
for index in indices:
csv = offers[index]['offerCSV']
times, prices = keepa.convert_offer_history(csv)
offer_times.append(times)
offer_prices.append(prices)

# you can aggregate these using np.hstack or plot at the history individually
import matplotlib.pyplot as plt
for i in range(len(offer_prices)):
plt.step(offer_times[i], offer_prices[i])
plt.show()

If you plan to do a lot of simulatneous query, you might want to speedup query using wait=False arguments.

products = await api.query('059035342X', wait=False)

3.6 Credits

This Python module, written by Alex Kaszynski and several contribitors, is based on Java code written by Marius
Johann, CEO keepa. Java source is can be found at api_backend.

3.7 License

Apache License, please see license file. Work is credited to both Alex Kaszynski and Marius Johann.

3.6. Credits 47
keepa Documentation, Release 1.3.0

48 Chapter 3. keepa
CHAPTER 4

Indices and tables

• genindex
• modindex
• search

49
keepa Documentation, Release 1.3.0

50 Chapter 4. Indices and tables


Index

B
best_sellers_query() (keepa.Keepa method), 8

C
category_lookup() (keepa.Keepa method), 8

D
deals() (keepa.Keepa method), 8

K
Keepa (class in keepa), 7

P
product_finder() (keepa.Keepa method), 10

Q
query() (keepa.Keepa method), 38

S
search_for_categories() (keepa.Keepa
method), 41
seller_query() (keepa.Keepa method), 41

T
time_to_refill (keepa.Keepa attribute), 42

U
update_status() (keepa.Keepa method), 42

W
wait_for_tokens() (keepa.Keepa method), 42

51

You might also like