Core APIs
...
Parameters
Sales & Stock

Stock Estimation

5min
stock estimation parameters get get /request the stock estimation parameters are applicable when making a request with type=stock estimation to retrieve stock level and related information from the shopping cart for a single product on amazon the product is specified using the asin parameter the parameters should be appended as querystring parameters to the product data api get http request stock level data is retrieved from the shopping cart page for a single product on amazon stock for a specific seller offer by default a stock estimation request will return data for the buybox winning offer for the passed asin to return stock estimation for a specific seller offer, rather than the buybox winner, you should pass the offer id , retrieved from a type=offers offers https //docs trajectdata com/rainforestapi/product data api/parameters/offers request, in the stock estimation request's offer id parameter note that offer id 's are dynamic, and change over time, so it is recommended that you run your type=offers request to retrieve the offer id directly before your stock estimation request products that require login for some asins amazon will require the user to be logged in to their amazon account to add the product to the cart in these instances rainforest will be unable to provide stock estimation data you can determine whether this is the case by inspecting the stock estimation requires login = true property of the response for example to request stock estimation data for the asin b073jyc4xm on amazon com the request would be http https //api rainforestapi com/request?api key=demo\&type=stock estimation\&amazon domain=amazon com\&asin=b073jyc4xmcurl l get https //api rainforestapi com/request \\ d api key="demo" \\ d type="stock estimation" \\ d amazon domain="amazon com" \\ d asin="b073jyc4xm"const axios = require('axios'); // set up the request parameters const params = { api key "demo", type "stock estimation", amazon domain "amazon com", asin "b073jyc4xm" } // 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' 'stock estimation', 'amazon domain' 'amazon com', 'asin' 'b073jyc4xm' } \# 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' => 'stock estimation', 'amazon domain' => 'amazon com', 'asin' => 'b073jyc4xm' ]); \# 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; ?> stock estimation parameters the following parameters are available for all requests made when type=stock estimation parameter required description amazon domain optional the amazon domain on which to perform the stock estimation for the product specified in the asin parameter for a full list of supported amazon domains see supported amazon domains https //docs trajectdata com/rainforestapi/product data api/reference/amazon domains asin optional the amazon asin (product id) to perform the stock estimation on used in combination with the amazon domain parameter offer id optional by default a stock estimation request will return data for the buybox winning offer for the passed asin to return stock estimation for a specific seller offer, rather than the buybox winner, you should pass the offer id , retrieved from a type=offers offers https //docs trajectdata com/rainforestapi/product data api/parameters/offers request, in the stock estimation request's offer id parameter note that offer id 's are dynamic, and change over time, so it is recommended that you run your type=offers request to retrieve the offer id directly before your stock estimation request next steps stock estimation results https //docs trajectdata com/rainforestapi/product data api/results/stock estimation