Overview
Amazon have a huge product hierachy and to make navigating this easier Rainforest API provides the Categories API to allow you to retrieve category_id values for different levels of the Amazon hierarchy.
category_id values returned by the Categories API can be used in subsequent category, search, deals and bestsellers API requests to limit the category listings, search results, deals results or bestsellers results returned to just products in a given category.
This is useful for use-cases such as "iterating all of the products in a category", or "showing search results within a specific category".
Listing the Contents of a Category It's a common use-case to want to iterate through the contents of a category to retrieve all products. Note that pagination using type=category or type=search for top-level (i.e. is_root=true ) categories is not supported by the Amazon sites. If you wish to iterate the contents of a category the recommended approach is to pick the lowest level categories to perform your iteration / pagination on.
Whilst most of the time the category_id 's returned by the Categories API are "static", it's expected that Amazon's category hierarchy will change over time. Rainforest API continuously updates the Categories API dataset to capture these changes. It's advised that, if your code relies on showing the category hierarchy to users, you periodically refresh your cached hierarchy from the Categories API.
Categories API Cost & Rate Limits Each request to the Categories API counts against your monthly request quota so it's recommended that you cache the Categories API response locally and use your local copy for lookups within your app.
The Categories API has a rate limit of 2000 requests per minute.
As well as interacting with the Categories API programmatically Rainforest API provides a visual categories browser on the Dashboard, as shown below. You can use this to visually explore the Amazon hierarchy for a given Amazon domain and generate sample category, search, deals and bestsellers API requests.
You can browse the category hierarchy for a given Amazon Domain visually using the categories browser.
The Categories API can return Amazon standard categories (for use with type=category and type=search requests), bestseller categories (for use with type=bestsellers requests) and deals categories (for use with type=deals requests). Availability of standard, bestsellers and deals categories, per Amazon domain, is shown below:
Country | Value | Standard Categories | Bestsellers Categories | Deals Categories |
---|---|---|---|---|
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
| |
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
Next Steps Listing & Searching Categories