Core APIs
...
Parameters
Deals & Bestsellers
Bestsellers
4min
bestsellers parameters get get /request the bestsellers parameters are applicable when making a request with type=bestsellers to retrieve bestseller results from an amazon bestsellers page the bestsellers page is specified either using the category id and amazon domain parameters (where category id is a category id returned from the categories api https //docs trajectdata com/rainforestapi/categories api/overview , or by using the url parameter the parameters should be appended as querystring parameters to the product data api get http request note that, if using the url parameter it should be url encoded bestsellers results are retrieved from the bestsellers listing page https //www amazon com/best sellers appliances/zgbs/appliances/ref=zg bs nav 0 on amazon rainforest supports all types of amazon bestseller pages, bestsellers https //www amazon com/best sellers appliances/zgbs/appliances/ref=zg bs nav 0 , new releases https //www amazon com/gp/new releases/appliances/ref=zg bsnr nav 0 , movers & shakers https //www amazon com/gp/movers and shakers/appliances/ref=zg bsms nav 0 , most wished for https //www amazon com/gp/most wished for/appliances/ref=zg mw nav 0 and gift ideas https //www amazon com/gp/most gifted/appliances/ref=zg mg nav 0 for example, to request bestsellers results for the "appliances" bestsellers page, using category id=bestsellers appliances on amazon domain=amazon com , the request would be http https //api rainforestapi com/request?api key=demo\&type=bestsellers\&category id=bestsellers appliances\&amazon domain=amazon comcurl l get https //api rainforestapi com/request \\ d api key="demo" \\ d type="bestsellers" \\ d amazon domain="amazon com" \\ d category id="bestsellers appliances"const axios = require('axios'); // set up the request parameters const params = { api key "demo", type "bestsellers", amazon domain "amazon com", category id "bestsellers appliances" } // make the http get request to rainforest api axios get('https //api rainforestapi com/request', { params }) then(response => { // print the json response from rainforest api console log(json stringify(response data, 0, 2)); }) catch(error => { // catch and print the error console log(error); })import requests import json \# set up the request parameters params = { 'api key' 'demo', 'type' 'bestsellers', 'amazon domain' 'amazon com', 'category id' 'bestsellers appliances' } \# make the http get request to rainforest api api result = requests get('https //api rainforestapi com/request', params) \# print the json response from rainforest api print(json dumps(api result json()))\<?php \# set up the request parameters $querystring = http build query(\[ 'api key' => 'demo', 'type' =>'bestsellers', 'amazon domain' => 'amazon com', 'category id' => 'bestsellers appliances' ]); \# make the http get request to rainforest api $ch = curl init(sprintf('%s?%s', 'https //api rainforestapi com/request', $querystring)); curl setopt($ch, curlopt returntransfer, true); curl setopt($ch, curlopt followlocation, true); \# the following options are required if you're using an outdated openssl version \# more details https //www openssl org/blog/blog/2021/09/13/letsencryptrootcertexpire/ curl setopt($ch, curlopt ssl verifyhost, false); curl setopt($ch, curlopt ssl verifypeer, false); curl setopt($ch, curlopt timeout, 180); $api result = curl exec($ch); curl close($ch); \# print the json response from rainforest api echo $api result; ?> bestsellers parameters the following parameters are available for all requests made when type=bestsellers parameter required description category id optional a category id to retrieve bestsellers results from you must supply a category id returned from the categories api https //docs trajectdata com/rainforestapi/categories api/overview in to the category id parameter amazon domain optional the amazon domain to retrieve bestsellers results from for a full list of supported amazon domains see supported amazon domains https //docs trajectdata com/rainforestapi/product data api/reference/amazon domains url optional the amazon bestsellesr results page url to retrieve bestsellers results from note the url parameter should be url encoded note either the url or category id & amazon domain parameters can be used top free optional set to true to retrieve the "top 100 free" version of the specified bestsellers category id or url see screenshot below for how the top 100 paid / top 100 free bestsellers for a given category are displayed on the amazon site note not every bestsellers category has a "top 100 free" list page optional the current page of bestsellers results to retrieve inspect the pagination total pages property in the bestsellers results https //docs trajectdata com/rainforestapi/product data api/results/bestsellers to see how many pages of bestsellers results are available max page optional use the max page parameter to get multiple pages of results in one request the api will automatically paginate through pages and concatenate the results into one response see the pagination https //docs trajectdata com/rainforestapi/product data api/pagination docs for more information next steps bestsellers results https //docs trajectdata com/rainforestapi/product data api/results/bestsellers