Core APIs
...
Parameters
Core Requests

Search

4min

Search Parameters

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 on Amazon.

Search Results Page
Search Results Page


For example, to request search results for the search term "memory cards" sorted by "high to low price", on amazon.com , the request would be:

HTTP
Curl
Node.js
Python
PHP



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 .

search_term

optional

A search term to use to search products.

  • 

    Document image
    

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

  • 

    Document image
    

category_id

optional

A category ID to limit search results to. You may supply any arbitary value in the category_id parameter however we recommend using a category ID returned from the Categories API as these are known-good category IDs from Amazon.

Rainforest 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:

  1. most_recent
  2. Sort search results by newest arrivals.



  1. price_low_to_high
  2. Sort search results by lowest to highest price.



  1. price_high_to_low
  2. Sort search results by highest to lowest price.



  1. featured
  2. Sort search results by featured first.



  1. average_review
  2. Sort search results by average customer review.



  1. relevance
  2. Sort search results by most relevant first. Applies only to Audible Amazon Domains .



  1. bestsellers
  2. Sort search results by best sellers first. Applies only to Audible Amazon Domains .



  1. running_time_ascending
  2. Sort search results by shortest running time first, from short to long. Applies only to Audible Amazon Domains .



  1. running_time_descending
  2. Sort search results by shortest running time first, from long to short. Applies only to Audible Amazon Domains .



  1. title_ascending
  2. Sort search results alphabetically by title from A to Z. Applies only to Audible Amazon Domains .



  1. title_descending
  2. Sort search results alphabetically by title from Z to A. Applies only to Audible Amazon Domains .
  • 

    Document image
    

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 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 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

Updated 11 Aug 2024
Did this page help you?