Amazon Variants Prices API

This endpoint retrieves product prices for specified ASINs, but it is only compatible with ASINs that have multiple variants (different colors, specifications, etc.). It provides prices for all variants of a single product, rather than for different Amazon products. Please note that you need to include the ASINs for all variants you'd like to get the price for. The data will then be transformed 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();
}
ParameterDetails

API_KEY(required)

User account’s normal API key.

ASIN_LIST(required)

List of ASINs for example: B09B2SF11R,B09B7X1814,B09BG1CZ68

(A maximum of 8 ASINs can be included in one request) Amazon Standard Identification Number. Please not that ASIN's are market specific (TLD). You can usually find the ASINs in the URL of an Amazon product.

TLD

Amazon market to be scraped.

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)

co.jp (amazon.co.jp)

in (amazon.in)

cn (amazon.cn)

com.sg (amazon.com.sg)

com.mx (amazon.com.mx)

ae (amazon.ae)

com.br (amazon.com.br)

nl (amazon.nl)

com.au (amazon.com.au)

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

OUTPUT_FORMAT

For structured data methods we offer CSV and JSON output. JSON is default if parameter is not added. Options:

  • csv

  • json

ZIP Code Targeting

To find out mote about ZIP Code targeting, please follow this link

Sample Response

{
  "result": [
    {
      "asin": "B09B2SF11R",
      "asin_recognized": true,
      "is_available": false
    },
    {
      "asin": "B09B7X1814",
      "asin_recognized": true,
      "currency_tag": "R$",
      "price": 3222,21
      "raw_price_text": "R$ 3.222,21",
      "is_available": true
    },
    {
      "asin": "B09BG1CZ68",
      "asin_recognized": true,
      "currency_tag": "R$",
      "price": 3299,
      "raw_price_text": "R$ 3.299,00",
      "is_available": true
    }
  ]
}

Last updated