Amazon Prices API

This endpoint will retrieve product prices for the given ASINs and transform it into usable JSON.

try {
String apiKey = "API_KEY";
String asins = "ASIN_LIST";
String country = "COUNTRY";
String tld = "TLD";
String url = "https://api.scraperapi.com/structured/amazon/prices?api_key=" + apiKey + "&asins=" + ASIN_LIST + "&country=" + country + "&tld=" + tld;
URL urlForGetRequest = new URL(url);
String readLine = null;
HttpURLConnection conection = (HttpURLConnection) urlForGetRequest.openConnection();
conection.setRequestMethod("GET");
int responseCode = conection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(conection.getInputStream()));
StringBuffer response = new StringBuffer();
while ((readLine = in.readLine()) != null) {
response.append(readLine);
}
in.close();
System.out.println(response.toString());
} else {
throw new Exception("Error in API Call");
}
} catch (Exception ex) {
ex.printStackTrace();
}

API Parameters

ParameterDetails

API_KEY

User account’s normal API key.

ASIN_LIST

List of ASINs for example: B09NL894P6,B09B2SF11R,B08M3KL2JK

(A maximum of 8 ASINs can be included in one request)

TLD

Valid values include:

com (amazon.com)

co.uk (amazon.co.uk)

ca (amazon.ca)

de (amazon.de)

es (amazon.es)

fr (amazon.fr)

it (amazon.it)

jp (amazon.co.jp)

in (amazon.in)

cn (amazon.cn)

sg (amazon.com.sg)

mx (amazon.com.mx)

ae (amazon.ae)

br (amazon.com.br)

nl (amazon.nl)

au (amazon.com.au)

tr (amazon.com.tr)

sa (amazon.sa)

se (amazon.se)

pl (amazon.pl)

COUNTRY

Valid values are two letter country codes for which we offer Geo Targeting (e.g. “au”, “es”, “it”, etc.).

Where an amazon domain needs to be scraped from another country (e.g. scraping amazon.com from Canada to get Canadian shipping information), both TLD and COUNTRY parameters must be specified.

Sample Response

{
  "result": [
    {
      "asin": "B09B2SF11R",
      "asin_recognized": true,
      "is_available": false
    },
    {
      "asin": "B08M3KL2JK",
      "asin_recognized": true,
      "currency_tag": "R$",
      "price": 2799,
      "raw_price_text": "R$ 2.799,00",
      "is_available": true
    },
    {
      "asin": "B09NL894P6",
      "asin_recognized": true,
      "currency_tag": "R$",
      "price": 600.89,
      "raw_price_text": "R$ 600,89",
      "is_available": true
    }
  ]
}

Last updated