logo

Search Results & Categories

View as Markdown

Search Amazon and scrape category pages with structured results

The Search endpoint performs keyword searches on Amazon and returns structured product listings. This works for both search queries and category pages; since Amazon category pages use the same underlying structure as search results, this single endpoint handles both use cases. Get product titles, prices, ratings, Prime status, sponsored flags, and position rankings all in clean JSON format.


Endpoint

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

Input Parameters

ParameterTypeRequiredDescription
tokenstring*Your Scrape.do API authentication token
keywordstringSearch query (must be URL-encoded). Optional when seller is supplied.
geocodestring*Amazon marketplace country code (e.g., us, gb, de, jp)
zipcodestringPostal code formatted according to country requirements for ZIP-level marketplaces. Use either zipcode or countryName, not both.
countryNamestringCountry-level location for marketplaces without ZIP-level delivery. Passing the marketplace's own country name (for example, countryName=Turkey with geocode=tr) is unnecessary and ignored.
pageintegerPage number for pagination (default: 1)
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)
sellerstringRestrict results to one seller's catalog (e.g., A2L77EE7U53NWQ). Can be used on its own — when you pass seller, keyword becomes optional and you get that seller's listings. Combine both to search within a seller.
sstringAmazon sort key (e.g., price-asc-rank, review-rank), passed through to Amazon
rhstringAmazon refinement filter string. Send it plain (n:172282,p_72:1248915011) or percent-encoded — both forms apply the same refinement. Characters outside Amazon's refinement alphabet return 400 invalid_rh.
nodestringAmazon category node id
low_price / high_pricenumberPrice range filter
istringAmazon department alias
field-keywordsstringAlternative keyword field

Response Parameters

FieldTypeDescription
keywordstringThe search query that was executed
pagenumberCurrent page number
totalResultsstringTotal results count as displayed by Amazon
total_results_extractednumberLargest integer parsed from totalResults, locale-independent
productsarrayList of product results
filtersarrayLeft-rail filter groups (Brand, Price, Customer Reviews, etc.). Each option carries an rh string you can pass back in a follow-up search to apply the filter.
related_searchesarrayQuery suggestions Amazon shows beneath the result list
categoriesarrayDepartment picker entries with category node ids
statusstringRequest status (success or error)
errorMessagestringError message if request failed
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
priceobjectPrice with currencyCode and amount. currencyCode is a proper ISO 4217 code (e.g., USD, MXN, SEK).
ratingobjectRating with value, count, and stars. value is on the 0-5 scale and count is the review tally as a number, with the marketplace's own magnitude word resolved (e.g., (23,1 tn) on se becomes 23100).
reviewCountstringNumber of reviews as displayed
isSponsoredbooleanWhether this is a sponsored/ad placement
isPrimebooleanWhether Prime shipping is available
positionnumberPosition on the search results page
badgestringSpecial badge if present (e.g., "Best Seller", "Overall Pick")
sales_volumestringLocalized "X bought in past month" text
deliveryobjectDelivery info parsed from the result card: price, isFree, date, fastestDate, and rawText
price_before_dealobjectStruck-through reference price with currencyCode and amount, when the card shows one

Example Usage

Step 1: Define Your Search Query

Decide what you want to search for on Amazon. This can be:

  • Product keywords: laptop stands, wireless headphones, coffee maker
  • Brand + product: sony headphones, anker charger
  • Category browsing: Use category-specific keywords

For this example, we'll search for "laptop stands":

Amazon Search Results

The API will return structured data for each product in the search results, including ASINs, prices, ratings, and badges like "Best Seller" or "Overall Pick".

Step 2: Send the API Request

curl --location --request GET 'https://api.scrape.do/plugin/amazon/search?token=<SDO-token>&keyword=laptop%20stands&geocode=US&page=1'
import requests
import json

token = "<SDO-token>"
keyword = "laptop stands"
geocode = "US"
page = 1

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

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

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

const token = "<SDO-token>";
const keyword = encodeURIComponent("laptop stands");
const geocode = "US";
const page = 1;

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

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"
    "net/url"
)

func main() {
    token := "<SDO-token>"
    keyword := url.QueryEscape("laptop stands")
    geocode := "US"
    page := 1

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

    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>"
keyword = URI.encode_www_form_component("laptop stands")
geocode = "US"
page = 1

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

response = Net::HTTP.get(url)

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

public class AmazonSearch {
    public static void main(String[] args) throws Exception {
        String token = "<SDO-token>";
        String keyword = URLEncoder.encode("laptop stands", "UTF-8");
        String geocode = "US";
        int page = 1;

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

        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;
using System.Web;

class Program
{
    static async Task Main()
    {
        string token = "<SDO-token>";
        string keyword = HttpUtility.UrlEncode("laptop stands");
        string geocode = "US";
        int page = 1;

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

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

        Console.WriteLine(response);
    }
}
<?php
$token = "<SDO-token>";
$keyword = urlencode("laptop stands");
$geocode = "US";
$page = 1;

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

$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);
?>

You can also scrape a seller's entire catalog without a keyword: pass seller=<seller-id>&geocode=... on its own and the response is that seller's listings. Combine seller with keyword to search within a single seller.

Step 3: Receive Structured Search Results

The API returns a paginated list of products with all relevant details:

{
  "keyword": "laptop stands",
  "page": 1,
  "totalResults": "1-16 of over 10,000 results",
  "products": [
    {
      "asin": "B0C1HGKNG7",
      "title": "Adjustable Laptop Stand for Desk, Ergonomic Computer Riser...",
      "url": "https://www.amazon.com/dp/B0C1HGKNG7",
      "imageUrl": "https://m.media-amazon.com/images/I/71abc123.jpg",
      "price": {
        "currencyCode": "USD",
        "amount": 29.95
      },
      "rating": {
        "value": 4.6,
        "count": 9100,
        "stars": 5
      },
      "reviewCount": "(9.1K)",
      "isSponsored": false,
      "isPrime": true,
      "position": 1,
      "badge": "Overall Pick"
    },
    {
      "asin": "B0CBL1TQMP",
      "title": "Portable Laptop Stand, Foldable Aluminum Computer Holder...",
      "url": "https://www.amazon.com/dp/B0CBL1TQMP",
      "imageUrl": "https://m.media-amazon.com/images/I/61xyz789.jpg",
      "price": {
        "currencyCode": "USD",
        "amount": 18.99
      },
      "rating": {
        "value": 4.4,
        "count": 2340,
        "stars": 4
      },
      "reviewCount": "(2.3K)",
      "isSponsored": true,
      "isPrime": true,
      "position": 2,
      "badge": null
    },
    {
      "asin": "B0D7EXAMPLE",
      "title": "Heavy Duty Laptop Stand with Cooling Fan...",
      "url": "https://www.amazon.com/dp/B0D7EXAMPLE",
      "imageUrl": "https://m.media-amazon.com/images/I/51def456.jpg",
      "price": {
        "currencyCode": "USD",
        "amount": 45.99
      },
      "rating": {
        "value": 4.8,
        "count": 567,
        "stars": 5
      },
      "reviewCount": "(567)",
      "isSponsored": false,
      "isPrime": false,
      "position": 3,
      "badge": "Best Seller"
    }
  ],
  "status": "success",
  "errorMessage": null
}

Pagination

To get additional pages of results, increment the page parameter:

/plugin/amazon/search?token=...&keyword=laptop%20stands&geocode=us&zipcode=14217&page=2

The isSponsored field helps you distinguish between organic results and paid placements. The position field shows the exact ranking on the page.

Search keywords must be URL-encoded. Response is limited to a maximum of 4MB.

Add include_html=true to your request to receive the full raw HTML of the Amazon search results page alongside the structured JSON output. The HTML will be included in an html field at the end of the response.

On this page