Core APIs
...
Parameters
Specialist Pages

Charts

3min
charts parameters get get /request the charts parameters are applicable when making a request with type=charts to retrieve charts results the charts page can be specified using the url parameter the parameters should be appended as querystring parameters to the product data api get http request charts results are retrieved from the charts page https //www amazon com/charts on amazon for example, to request charts results for the url https //www amazon com/charts , the request would be http https //api rainforestapi com/request?api key=demo\&type=charts\&url=https%3a%2f%2fwww amazon com%2fchartscurl l get https //api rainforestapi com/request \\ d api key="demo" \\ d type="charts" \\ d url="https%3a%2f%2fwww amazon com%2fcharts"const axios = require('axios'); // set up the request parameters const params = { api key "demo", type "charts", url "https%3a%2f%2fwww amazon com%2fcharts" } // 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' 'charts', 'url' 'https%3a%2f%2fwww amazon com%2fcharts' } \# 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' => 'charts', 'url' => 'https%3a%2f%2fwww amazon com%2fcharts' ]); \# 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; ?> charts parameters the following parameters are available for all requests made when type=charts parameter required description url optional the charts page url to retrieve charts results from be sure to url encode the url parameter next steps charts results https //docs trajectdata com/rainforestapi/product data api/results/charts