# Amazon Product API

The `Amazon Product API` endpoint will retrieve product data from an Amazon product page and transform it into usable JSON. It also includes variant details for the product, such as size, color, and other available options (if applicable).

{% hint style="success" %}
The Amazon Product API endpoint also returns **all publicly available** reviews for an Amazon product page (ASIN).
{% endhint %}

{% tabs %}
{% tab title="cURL" %}

```bash
curl --request GET \
--url "https://api.scraperapi.com/structured/amazon/product?api_key=API_KEY&\
asin=ASIN&country_code=COUNTRY_CODE&tld=TLD"
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

payload = {
    # Replace the value for api_key with your actual API Key.
    'api_key': 'API_KEY',
    'asin': 'ASIN',
    'country_code': 'COUNTRY_CODE',
    'tld': 'TLD'
}

r = requests.get('https://api.scraperapi.com/structured/amazon/product',params=payload)

print(r.text)
```

{% endtab %}

{% tab title="NodeJS" %}

```javascript
import fetch from 'node-fetch';

fetch(
  // Replace the value for api_key with your actual API Key.
  'https://api.scraperapi.com/structured/amazon/product?api_key=API_KEY&ASIN=ASIN&country_code=COUNTRY_CODE&tld=TLD'
)
  .then(response => response.json()) 
  .then(data => {
    console.log(data);
  })
  .catch(error => {
    console.error(error);
  });
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
// Replace the value for api_key with your actual API Key.
$url = "https://api.scraperapi.com/structured/amazon/product?api_key=API_KEY&asin=ASIN&country_code=COUNTRY_CODE&tld=TLD";

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, FALSE);

$response = curl_exec($ch);
curl_close($ch);

print_r($response);
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
require 'json'

params = {
  # Replace the value for api_key with your actual API Key.
  :api_key => "API_KEY",
  :asin => "ASIN",
  :country_code => "COUNTRY_CODE",
  :tld => "TLD"
}

uri = URI('https://api.scraperapi.com/structured/amazon/product')
uri.query = URI.encode_www_form(params)

website_content = Net::HTTP.get(uri)
print(website_content)
```

{% endtab %}

{% tab title="Java" %}

```java
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class Main {
    public static void main(String[] args) {
        try {
            // Replace the value for api_key with your actual API Key.
            String apiKey = "API_KEY";
            String asin = "ASIN";
            String country_code = "COUNTRY_CODE";
            String tld = "TLD";

            String urlStr = "https://api.scraperapi.com/structured/amazon/product?api_key=" 
                            + apiKey + "&asin=" + asin + "&country_code=" + country_code + "&tld=" + tld;

            URL url = new URL(urlStr);
            HttpURLConnection conn = (HttpURLConnection) url.openConnection();
            conn.setRequestMethod("GET");

            int responseCode = conn.getResponseCode();
            if (responseCode == HttpURLConnection.HTTP_OK) {
                BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
                StringBuilder response = new StringBuilder();
                String line;
                while ((line = in.readLine()) != null) {
                    response.append(line);
                }
                in.close();
                System.out.println(response.toString());
            } else {
                System.out.println("Error in API Call. Response code: " + responseCode);
            }

        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
}
```

{% endtab %}
{% endtabs %}

**Supported Parameters**

<table><thead><tr><th width="246">Parameters</th><th>Details</th></tr></thead><tbody><tr><td><code>API_KEY</code> (required)</td><td>Your API Key.</td></tr><tr><td><code>ASIN</code> (required)</td><td><code>ASIN</code> - <strong>Amazon Standard Identification Number</strong>. Please note, that ASIN's are market specific (TLD specific). You can usually find the ASINs in the URL of an Amazon product (example: B07FTKQ97Q)</td></tr><tr><td><code>TLD</code></td><td><p>Amazon market to be scraped.</p><p>Valid values include:</p><p><strong>com</strong> (amazon.com)</p><p><strong>co.uk</strong> (amazon.co.uk)</p><p><strong>ca</strong> (amazon.ca)</p><p><strong>de</strong> (amazon.de)</p><p><strong>es</strong> (amazon.es)</p><p><strong>fr</strong> (amazon.fr)</p><p><strong>ie</strong> (amazon.ie)</p><p><strong>it</strong> (amazon.it)</p><p><strong>co.jp</strong> (amazon.co.jp)</p><p><strong>co.za</strong> (amazon.co.za)</p><p><strong>in</strong> (amazon.in)</p><p><strong>cn</strong> (amazon.cn)</p><p><strong>com.sg</strong> (amazon.com.sg)</p><p><strong>com.mx</strong> (amazon.com.mx)</p><p><strong>ae</strong> (amazon.ae)</p><p><strong>com.br</strong> (amazon.com.br)</p><p><strong>nl</strong> (amazon.nl)</p><p><strong>com.au</strong> (amazon.com.au)</p><p><strong>com.tr</strong> (amazon.com.tr)</p><p><strong>sa</strong> (amazon.sa)</p><p><strong>se</strong> (amazon.se)</p><p><strong>pl</strong> (amazon.pl)</p></td></tr><tr><td><code>COUNTRY_CODE</code></td><td><p>Valid values are two letter country codes for which we offer Geo Targeting (e.g. “<strong>au</strong>”, “<strong>es</strong>”, “<strong>it</strong>”, etc.).</p><p>Where an amazon domain needs to be scraped from another country (e.g. scraping amazon.com from Canada to get Canadian shipping information), <strong>both TLD and COUNTRY parameters must be specified.</strong></p></td></tr><tr><td><code>OUTPUT_FORMAT</code></td><td><p>For SDEs, we offer CSV and JSON output. JSON is default if parameter is not added. Options:</p><ul><li>csv</li><li>json (default)</li></ul></td></tr><tr><td>ZIP Code Targeting</td><td>To find out mote about ZIP Code targeting, please follow <a href="/pages/Holp9APEMCn7lDkzH8zp">this</a> link.</td></tr></tbody></table>

### Sample Response

```json
{
  "name": "CUCKOO Twin Pressure Rice Cooker 6-Cup Uncooked / 12-Cup Cooked with Nonstick Inner Pot, Versatile Rice Maker & Warmer with 16 Menu Options, Open Cooking Mode, Voice Guide, White (CRP-ST0609FW)",
  "product_information": {
     "brand": "CUCKOO",
     "capacity": "3 Quarts",
     "product_dimensions": "13.5\"D x 9.5\"W x 9.25\"H",
     "power_source": "Corded Electric",
     "product_care_instructions": "Hand Wash",
     "color": "White",
     "special_feature": "Advanced Fuzzy Logic, Non-Stick, Steam Vent",
     "material": "Stainless Steel",
     "lid_material": "Stainless Steel",
     "item_weight": "12.76 pounds",
     "wattage": "880 watts",
     "included_components": "Rice cooker, spatula, user manual",
     "voltage": "120 Volts",
     "model_name": "CRP-ST0609FW",
     "manufacturer": "CUCKOO",
     "asin": "B0B44XTV71",
     "item_model_number": "CRP-ST0609FW",
     "best_sellers_rank": [
        "#14,536 in Kitchen & Dining (See Top 100 in Kitchen & Dining)",
        "#49 in Rice Cookers"
     ],
     "date_first_available": "June 15, 2022"
     },
  "brand": "Visit the CUCKOO Store",
  "brand_url": "https://www.amazon.com/stores/CUCKOOElectronicsAmerica/page/58EB7A82-96F8-46A2-9A49-432EC143DEFB?is_byline_deeplink=true&deeplink=074043BC-1C38-45E7-8F81-F0BE1F1D4A6F&redirect_store_id=58EB7A82-96F8-46A2-9A49-432EC143DEFB&lp_asin=B0B44XTV71&ref_=ast_bln&store_ref=bl_ast_dp_brandLogo_sto",
  "full_description": "From the brand Previous page Cooking Appliances         Visit the Store Air Purifiers         Visit the Store Consumer Electronics         Visit the Store Next page Product description Previous page                                                                                                                     Next page 1 Turbo Rice Mode 2 Smart Fuzzy Logic Tech Previous page                                                                                                                                                                    Next page 1 Non-Stick Inner Pot 2 Dual-Layer Sealing 3 High-Pressure Cooking Previous page                                                                                                                                                                    Next page 1 Detachable Inner Cover 2 Water Condensation Dish 3 Self-Cleaning Mode Designed for Convenience                                                                                       Multi-Language Voice Guide                                          Easily follow instructions with a built-in voice guide available in English, Chinese, and Korean—making setup and use simple for everyone in your home.                                                                                       Smart Locking Lid                                          Designed for safety and convenience, the smart locking lid automatically seals during cooking to prevent spills and retain pressure, then unlocks only when it’s safe to open.",
  "is_coupon_exists": false,
	"images": [
		"https://m.media-amazon.com/images/I/31636S-6Z3L.jpg",
		"https://m.media-amazon.com/images/I/41prYuemLZL.jpg",
		"https://m.media-amazon.com/images/I/41spK66ESJL.jpg",
		"https://m.media-amazon.com/images/I/41UU8rfsa4L.jpg",
		"https://m.media-amazon.com/images/I/41SRjNt6uOL.jpg",
		"https://m.media-amazon.com/images/I/41OI6bVN3hL.jpg"
	],
  "product_category": "Home & Kitchen›Kitchen & Dining›Small Appliances›Rice Cookers",
  "feature_bullets": [
      "16 Versatile Modes: With 16 menu options including GABA/brown rice, glutinous/white rice, stored rice, high-pressure, or non-pressure steam",
      "Mid to Large Capacity: The 6-cup (12 cups cooked) rice cooker provides the perfect serving amount for small gatherings or small to medium sized families",
      "Safe Steam Release: Automatically releases pressure softly and quietly for a safe and convenient cooking experience",
      "Dual Cooking Pressure Selections: Choose between high-pressure and non-pressure cooking for sticky or fluffy rice",
      "Included Accessories: Comes with a product manual, rice spatula, and rice measuring cup"
  ],
  "model": "CRP-ST0609FW",
  "ships_from": "Amazon.com \n                                                              Amazon.com            Ships from       Amazon.com",
  "sold_by": "Amazon.com",
  "aplus_present": true,
  "reviews": []
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.scraperapi.com/structured-data-endpoints/e-commerce/amazon/amazon-product-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
