Core APIs
...
Parameters
Utility Requests
Also Bought
3min
also bought parameters get get /request the also bought parameters are applicable when making a request with type=also bought to retrieve also bought details for a single product on amazon the product is specified using either the asin and amazon domain parameters or the url parameter (where the url parameter contains a link to an amazon product page) the parameters should be appended as querystring parameters to the product data api get http request also bought details are retrieved from the product page https //www amazon com/dp/b084zf5d65 for a single product on amazon an type=also bought request will automatically paginate through all of the pages of also bought data and return every also bought result for example, to request also bought details for the asin b084zf5d65 on amazon com the request would be http https //api rainforestapi com/request?api key=demo\&type=also bought\&asin=b084zf5d65\&amazon domain=amazon comcurl l get https //api rainforestapi com/request \\ d api key="demo" \\ d type="also bought" \\ d asin="b084zf5d65" \\ d amazon domain="amazon com"const axios = require('axios'); // set up the request parameters const params = { api key "demo", type "also bought", asin "b084zf5d65", amazon domain "amazon com" } // 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' 'also bought', 'asin' 'b084zf5d65', 'amazon domain' 'amazon com' } \# 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' => 'also bought', 'asin' => 'b084zf5d65', 'amazon domain' => 'amazon com' ]); \# 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; ?> also bought parameters the following parameters are available for all requests made when type=also bought parameter required description amazon domain optional the amazon domain to retrieve also bought details from 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 note if the amazon domain and asin parameters are supplied then the url parameter is ignored asin optional the amazon asin (product id) to retrieve also bought details for used in combination with the amazon domain parameter note if the asin and amazon domain parameters are supplied then the url parameter is ignored url optional the amazon product page url to retrieve also bought results from next steps also bought results https //docs trajectdata com/rainforestapi/product data api/results/also bought