logo

Deals

View as Markdown

Scrape Amazon's discounted products as a paginated, filterable deals grid

The Deals endpoint returns Amazon's discounted products as a paginated, filterable result grid. Every product carries its current price alongside the struck-through price it was reduced from, so you can compute the discount yourself. Scope the grid to a category with a node id, bound it by price, sort it, and page through it.


Endpoint

GET https://api.scrape.do/plugin/amazon/deals

Input Parameters

ParameterTypeRequiredDescription
tokenstring*Your Scrape.do API authentication token
geocodestring*Amazon marketplace country code. Deals are currently available for us; other marketplaces return an error listing what is supported. amazon_domain (e.g., amazon.com) is accepted as an alternative.
nodestringCategory node id to scope the deals grid to a category (e.g., 172282 for Electronics). Without it, the grid spans the whole marketplace.
low_pricenumberLower price bound. Digits with at most two decimals (e.g., 20 or 19.99).
high_pricenumberUpper price bound. Digits with at most two decimals (e.g., 100).
rhstringAdditional Amazon refinement filter, merged with the deal and category refinements.
istringAmazon department alias.
sort_bystringSort order. One of relevance, featured, price_low_to_high, price_high_to_low, average_review, most_recent, newest_arrivals, bestsellers, bestseller_rankings (default: Amazon's own default)
sstringRaw Amazon sort key, for sorts sort_by does not name. Ignored when sort_by is set.
pageintegerPage number between 1 and 20 (default: 1)
zipcodestringPostal code formatted according to country requirements to localize prices. Use either zipcode or countryName, not both.
countryNamestringCountry-level location for marketplaces without ZIP-level delivery.
superbooleanEnable residential/mobile proxies for higher success rates. Costs 10x credits (default: false)
languagestringLanguage code in ISO 639-1 format (e.g., EN, DE)
include_htmlbooleanWhen true, the response includes the full raw HTML of the page after the structured JSON output (default: false)
devicestringDevice profile for the request. Use desktop or mobile (default: desktop)

Price bounds are validated: anything other than digits with at most two decimals returns 400, because Amazon silently drops a bound it cannot read and would return an unfiltered grid. An unknown sort_by value returns 400 invalid_sort_by with the accepted list.


Response Parameters

FieldTypeDescription
nodestringEcho of the node parameter, when supplied
pagenumberEcho of the requested page
productsarrayDiscounted products in Amazon's order, serialized as [] when nothing matched. Same product shape as the Search endpoint.
filtersarrayLeft-rail filter groups; each option carries an rh you can pass back to narrow further
paginationobject{current_page, has_next} for the page you asked for
htmlstringFull raw HTML of the Amazon page (only present when include_html=true)

Product Object Fields

FieldTypeDescription
asinstringProduct ASIN number
titlestringProduct title
urlstringProduct detail page URL
imageUrlstringProduct thumbnail image URL
priceobjectCurrent discounted price with currencyCode and amount
price_before_dealobjectThe struck-through reference price Amazon shows above the current one, with currencyCode and amount. Labelled "Typical price" or "List price" depending on the marketplace. Absent when no struck-through price is shown.
ratingobjectRating with value, count, and stars
reviewCountstringNumber of reviews as displayed
isSponsoredbooleanWhether this is a sponsored/ad placement
positionnumberPosition on the deals page
sales_volumestringLocalized "X bought in past month" text, when Amazon shows it

Example Usage

Step 1: Define Your Deal Scope

Decide what you want to track. This can be:

  • Everything discounted: no node, no price bounds
  • A single category: pass a node id
  • A price window: combine node with low_price / high_price

Step 2: Send the API Request

curl --location --request GET 'https://api.scrape.do/plugin/amazon/deals?token=<SDO-token>&geocode=US'
import requests
import json

token = "<SDO-token>"
geocode = "US"

url = f"https://api.scrape.do/plugin/amazon/deals?token={token}&geocode={geocode}"

response = requests.request("GET", url)

print(json.dumps(response.json(), indent=2))
const axios = require('axios');

const token = "<SDO-token>";
const geocode = "US";

const url = `https://api.scrape.do/plugin/amazon/deals?token=${token}&geocode=${geocode}`;

axios.get(url)
  .then(response => {
    console.log(JSON.stringify(response.data, null, 2));
  })
  .catch(error => {
    console.error(error);
  });
package main

import (
    "fmt"
    "io/ioutil"
    "net/http"
)

func main() {
    token := "<SDO-token>"
    geocode := "US"

    apiUrl := fmt.Sprintf(
        "https://api.scrape.do/plugin/amazon/deals?token=%s&geocode=%s",
        token, geocode,
    )

    resp, err := http.Get(apiUrl)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := ioutil.ReadAll(resp.Body)
    fmt.Println(string(body))
}
require 'net/http'
require 'json'
require 'uri'

token = "<SDO-token>"
geocode = "US"

url = URI("https://api.scrape.do/plugin/amazon/deals?token=#{token}&geocode=#{geocode}")

response = Net::HTTP.get(url)

puts JSON.pretty_generate(JSON.parse(response))
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class AmazonDeals {
    public static void main(String[] args) throws Exception {
        String token = "<SDO-token>";
        String geocode = "US";

        String url = String.format(
            "https://api.scrape.do/plugin/amazon/deals?token=%s&geocode=%s",
            token, geocode
        );

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

        BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
        String line;
        StringBuilder response = new StringBuilder();
        while ((line = reader.readLine()) != null) {
            response.append(line);
        }
        reader.close();

        System.out.println(response.toString());
    }
}
using System;
using System.Net.Http;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        string token = "<SDO-token>";
        string geocode = "US";

        string url = $"https://api.scrape.do/plugin/amazon/deals?token={token}&geocode={geocode}";

        using HttpClient client = new HttpClient();
        string response = await client.GetStringAsync(url);

        Console.WriteLine(response);
    }
}
<?php
$token = "<SDO-token>";
$geocode = "US";

$url = "https://api.scrape.do/plugin/amazon/deals?token={$token}&geocode={$geocode}";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

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

echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
?>

Step 3: Receive Structured Deal Results

The API returns the discounted products with both prices:

{
  "node": "172282",
  "page": 1,
  "products": [
    {
      "asin": "B0B5V2YZPZ",
      "title": "Waykar Energy Star Dehumidifier...",
      "url": "https://www.amazon.com/dp/B0B5V2YZPZ",
      "price": {
        "currencyCode": "USD",
        "amount": 15.99
      },
      "price_before_deal": {
        "currencyCode": "USD",
        "amount": 19.99
      },
      "rating": {
        "value": 4.5,
        "count": 1284,
        "stars": 5
      },
      "reviewCount": "(1.2K)",
      "isSponsored": false,
      "position": 1
    }
  ],
  "pagination": {
    "current_page": 1,
    "has_next": true
  }
}

Pagination

Loop on pagination.has_next — when it is true, request page+1:

/plugin/amazon/deals?token=...&geocode=us&page=2

The highest servable page is 20. has_next is also false on page 20 because page=21 is refused.

Deal membership turns over quickly; two requests minutes apart can legitimately differ. An empty products array is a valid, successful answer when your filters match nothing.

Amazon does not render a savings percentage on these grids, so none is returned — the percentages that appear on a card belong to coupons or unrelated copy. You get both prices; the percentage is (1 - price / price_before_deal) × 100.

Failed requests (deals_not_supported_for_marketplace, upstream failures, unreadable pages) are not charged.

On this page