Core APIs
...
Parameters
Utility Requests
Autocomplete
4min
autocomplete parameters get get /request when making a request with the type parameter set to type=autocomplete rainforest api will return autocomplete suggestions for the search term specified in the search term parameter, on the amazon domain specified in the amazon domain parameter you may scope your autocomplete request to an amazon autocomplete alias (synonymous with a product area or top level category) by specifying the alias using the autocomplete alias parameter the available autocomplete alias values vary depending on the amazon domain used you can find a full list of all autocomplete aliaes, per amazon domain, in the autocomplete aliases reference https //docs trajectdata com/rainforestapi/product data api/reference/autocomplete aliases for example, to request autocomplete suggestions for the search term animal on amazon com using the autocomplete alias "books" the request would be http https //api rainforestapi com/request?api key=demo\&type=autocomplete\&amazon domain=amazon com\&search term=animal\&autocomplete alias=stripbookscurl l get https //api rainforestapi com/request \\ d api key="demo" \\ d type="autocomplete" \\ d amazon domain="amazon com" \\ d search term="animal" \\ d autocomplete alias="stripbooks"const axios = require('axios'); // set up the request parameters const params = { api key "demo", type "autocomplete", amazon domain "amazon com", search term "animal", autocomplete alias "stripbooks" } // 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' 'autocomplete', 'amazon domain' 'amazon com', 'search term' 'animal', 'autocomplete alias' 'stripbooks', } \# 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' => 'autocomplete', 'amazon domain' => 'amazon com', 'search term' => 'animal', 'autocomplete alias' => 'stripbooks', ]); \# 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; ?> autocomplete parameters the following parameters are available for all requests made when type=autocomplete parameter required description amazon domain required the amazon domain to retrieve autocomplete details from for the search term specified in the search term parameter for a full list of supported amazon domains see supported amazon domains https //docs trajectdata com/rainforestapi/product data api/reference/amazon domains search term required the search term to get autocomplete suggestions for used in combination with the amazon domain parameter autocomplete alias optional the alias to use to scope the autocomplete request autocomplete aliases can be thought of as the "category" area that the autocomplete request runs in if none is specified then rainforest will default to running the autocomplete request in the top level "all departments" autocomplete alias for a full list of supported autocomplete aliases see supported autocomplete aliases https //docs trajectdata com/rainforestapi/product data api/reference/autocomplete aliases next steps autocomplete results https //docs trajectdata com/rainforestapi/product data api/results/autocomplete