> For the complete documentation index, see [llms.txt](https://docs.scraperapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scraperapi.com/structured-data-endpoints/e-commerce/amazon/amazon-offers-api.md).

# Amazon Offers API

The `Amazon Offers API` endpoint will retrieve offers for a specified product from an Amazon offers page and transform it into usable JSON.

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

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

{% endtab %}

{% tab title="Python" %}

```python
import requests

payload = {
    'api_key': 'API_KEY',
    'asin': 'ASIN',
    'country_code': 'COUNTRY_CODE',
    'tld': 'TLD'
}

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

print(r.text)
```

{% endtab %}

{% tab title="NodeJS" %}

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

fetch(
  'https://api.scraperapi.com/structured/amazon/offers?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
$url = "https://api.scraperapi.com/structured/amazon/offers?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 = {
  :api_key => "API_KEY",
  :asin => "ASIN",
  :country_code => "COUNTRY_CODE",
  :tld => "TLD"
}

uri = URI('https://api.scraperapi.com/structured/amazon/offers')
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 {
            String apiKey = "API_KEY";
            String asin = "ASIN";
            String country_code = "COUNTRY_CODE";
            String tld = "TLD";

            String urlStr = "https://api.scraperapi.com/structured/amazon/offers?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="263">Parameter</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>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 (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 structured data methods 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><code>F_NEW</code></td><td>Boolean parameter with a possible value of <code>true</code> or <code>false</code> indicating the condition of the listed items.</td></tr><tr><td><code>F_USED_GOOD</code></td><td>Boolean parameter with a possible value of <code>true</code> or <code>false</code> indicating the condition of the listed items.</td></tr><tr><td><code>F_USED_LIKE_NEW</code></td><td>Boolean parameter with a possible value of <code>true</code> or <code>false</code> indicating the condition of the listed items.</td></tr><tr><td><code>F_USED_VERY_GOOD</code></td><td>Boolean parameter with a possible value of <code>true</code> or <code>false</code> indicating the condition of the listed items.</td></tr><tr><td><code>F_USED_ACCEPTABLE</code></td><td>Boolean parameter with a possible value of <code>true</code> or <code>false</code> indicating the condition of the listed items.</td></tr><tr><td>ZIP Code Targeting</td><td>To find out more about ZIP Code targeting, please follow <a href="/control-and-optimization/geotargeting/amazon-zip-code-targeting.md">this </a>link</td></tr></tbody></table>

### Sample Response

```json
{
	"item": {
		"name": "Razer Blade 15 Gaming Laptop 2019: Intel Core i7-9750H 6 Core, NVIDIA GeForce RTX 2060, 15.6\" FHD 1080p 144Hz, 16GB RAM, 512GB SSD, CNC Aluminum, Chroma RGB Lighting, Thunderbolt 3",
		"subtitle": "",
		"author": "",
		"brand": "Razer",
		"product_information": {
			"brand": "Razer",
			"series": "Blade 15",
			"screen_size": "15.6 Inches",
			"color": "Classic Black",
			"hard_disk_size": "512 GB",
			"cpu_model": "Core i7 Family",
			"ram_memory_installed_size": "16 GB",
			"operating_system": "Windows 10",
			"card_description": "Dedicated",
			"graphics_coprocessor": "NVIDIA GeForce RTX 2060"
		},
		"listings_link": "https://www.amazon.com/gp/aod/ajax/ref=tmm_pap_used_aod_0?filters=%257B%2522all%2522%253Atrue%252C%2522usedLikeNew%2522%253Atrue%252C%2522usedVeryGood%2522%253Atrue%252C%2522usedGood%2522%253Atrue%257D&condition=used&asin=B07R1P4DQG&pc=dp;",
		"image": "",
		"average_rating": 4.4,
		"total_reviews": 697
	},
	"listings": [
		{
			"price_with_currency": "",
			"price": null,
			"shipping_price": null,
			"has_prime_shipping": false,
			"ships_from": "Amazon.com",
			"sold_by": "Amazon.com",
			"fullfilled_by_amazon": false
		}
	],
	"pagination": []
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
