Core APIs
...
Parameters
Core Requests
Category
3 min
category parameters get get /request the category parameters are applicable when making a request with type=category to retrieve category results for an amazon category categories can be specified either via passing an amazon category url in to the url parameter, or by passing a category id in to the category id (where the category id is returned from the categories api https //docs trajectdata com/rainforestapi/categories api/overview ) and an amazon domain in to the amazon domain parameter the parameters should be appended as querystring parameters to the product data api get http request category results are retrieved from the category listing page https //www amazon com/s?bbn=16225009011\&rh=n%3a%2116225009011%2cn%3a502394%2cn%3a281052 on amazon for example, to request category results for this category url https //www amazon com/s?bbn=16225009011\&rh=n%3a%2116225009011%2cn%3a502394%2cn%3a281052 , the request would be http https //api rainforestapi com/request?api key=demo\&type=category\&url=https%3a%2f%2fwww amazon com%2fs%3fbbn%3d16225009011%26rh%3dn%253a%252116225009011%252cn%253a502394%252cn%253a281052curl l get https //api rainforestapi com/request \\ d api key="demo" \\ d type="category" \\ d url="https //www amazon com/s?bbn=16225009011\&rh=n%3a%2116225009011%2cn%3a502394%2cn%3a281052"const axios = require('axios'); // set up the request parameters const params = { api key "demo", type "category", url "https //www amazon com/s?bbn=16225009011\&rh=n%3a%2116225009011%2cn%3a502394%2cn%3a281052" } // 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' 'category', 'url' 'https //www amazon com/s?bbn=16225009011\&rh=n%3a%2116225009011%2cn%3a502394%2cn%3a281052' } \# 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' => 'category', 'url' => 'https //www amazon com/s?bbn=16225009011\&rh=n%3a%2116225009011%2cn%3a502394%2cn%3a281052' ]); \# 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; ?> category parameters the following parameters are available for all requests made when type=category true false 131,107false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type true left unhandled content type true left unhandled content type true left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type next steps category results https //docs trajectdata com/rainforestapi/product data api/results/category