Core API
...
Product Data API
Parameters

Search

4min
search parameters get get /request the search parameters are applicable when making a request with type=search to retrieve search results for an amazon domain the amazon domain is specified using the amazon domain parameter and the search term is specified in the search term parameter the parameters should be appended as querystring parameters to the product data api get http request search results are retrieved from the search results page https //www amazon com/s?k=highlighter+pens\&s=review rank on amazon for example, to request search results for the search term "highlighter pens" sorted by "average customer review", on amazon com , the request would be http https //api asindataapi com/request?api key=demo\&type=search\&amazon domain=amazon com\&search term=highlighter+pens\&sort by=average reviewcurl l get https //api asindataapi com/request \\ d api key="demo" \\ d type="search" \\ d amazon domain="amazon com" \\ d search term="highlighter+pens" \\ d sort by="average review"const axios = require('axios'); // set up the request parameters const params = { api key "demo", type "search", amazon domain "amazon com", search term "highlighter pens", sort by "average review" } // make the http get request to asin data api axios get('https //api asindataapi com/request', { params }) then(response => { // print the json response from asin data 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' 'search', 'amazon domain' 'amazon com', 'search term' 'highlighter pens', 'sort by' 'average review' } \# make the http get request to asin data api api result = requests get('https //api asindataapi com/request', params) \# print the json response from asin data api print(json dumps(api result json()))\<?php \# set up the request parameters $querystring = http build query(\[ 'api key' => 'demo', 'type' => 'search', 'amazon domain' => 'amazon com', 'search term' => 'highlighter pens', 'sort by' => 'average review' ]); \# make the http get request to asin data api $ch = curl init(sprintf('%s?%s', 'https //api asindataapi 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 asin data api echo $api result; ?> search parameters the following parameters are available for all requests made when type=search parameter required description amazon domain optional the amazon domain to retrieve search results from for a full list of supported amazon domains see supported amazon domains https //docs trajectdata com/asindataapi/product data api/reference/amazon domains search term optional a search term to use to search products refinements optional a comma seperated list of refinement values to filter the search results by these allow you to refine your search by values such as "reviews rating 4 and over", "price range" and "brand" refinement values are returned in the refinements array of each type=search result refinement values are dynamic and change by category area or search term used if you wish to use refinements you should first issue a type=search request without specifying any refinements to retrieve a master list of the avaialble refinements for the given category area/search term you can then cache these refinement values for use on subsequent requests for example, to run a type=search request specifying two refinements with values p 85/2470955011 and p 36/2421886011 the value of the refinements parameter would be refinements=p 85/2470955011,p 36/2421886011 category id optional a category id to limit search results to asin data api will use the category id in the following form https // amazon domain /s?node= category id note that pagination for top level categories is not supported by the amazon sites if you wish to iterate the contents of a category the recommended approach is to pick the lowest level categories to perform your iteration / pagination on sort by optional determines the sort order of search results to return valid values are most recent sort search results by newest arrivals price low to high sort search results by lowest to highest price price high to low sort search results by highest to lowest price featured sort search results by featured first average review sort search results by average customer review exclude sponsored optional whether to exclude sponsored search results (when set to exclude sponsored=true ) from the search results returned, or not defaults to false page optional the current page of search results to retrieve inspect the pagination total pages property in the search results https //docs trajectdata com/asindataapi/product data api/results/search to see how many pages of search results are available max page optional use the max page parameter to get multiple pages of results in one request the api will automatically paginate through pages and concatenate the results into one response see the pagination https //docs trajectdata com/asindataapi/product data api/pagination docs for more information url optional the amazon search results page url to retrieve search results from be sure to url encode the url parameter note the url parameter is supplied, the search term parameter cannot be used (as the url itself defines the search term used) direct search optional by default amazon will, if a spelling mistake is suspected in the search term , show search results for the corrected search term to disable this behaviour and search for the value in search term directly, without auto correcting it, set direct search=true next steps search results https //docs trajectdata com/asindataapi/product data api/results/search