Amazon Search API

This endpoint will retrieve products for a specified search term from Amazon search page and transform it into usable JSON.

require 'net/http'
require 'json'
params = {
:api_key => "APIKEY",
:query => "QUERY",
:country => "COUNTRY",
:tld => "TLD"
uri = URI('')
uri.query = URI.encode_www_form(params)
website_content = Net::HTTP.get(uri)

As you can see in the code abode, you can use several parameters with this method as well:



User's normal API Key


Amazon Search query string


Where an amazon domain needs to be scraped from another country (e.g. scraping from Canada to get Canadian shipping information), specify the TLD as well as the COUNTRY parameters. Valid values are valid TLDs (e.g. “”, “.es”, etc.). Valid values include: us: '', uk: '', ca: '', de: '', es: '', fr: '', it: '', jp: '', in: '', cn: '', sg: '', mx: '', ae: '', br: '', nl: '', au: '', tr: '', sa: '', se: '', pl: ''


Country of Amazon domain to scrape. This is an optional argument and defaults to “us” (

Last updated