Amazon Search
Search Amazon by keyword and get product results with price, rating and position, with marketplace and sort order options.
Overview
Section titled “Overview”Send a keyword in query and get a page of Amazon search results with ASIN, product description, URL (dp_url), price, retail price, star rating (product_rating), review count (count_review), prime and sponsored flags and search position.
Pick the marketplace with domain_code (com, co.uk, de, and so on) and the order with sort_by. Both are locked into the cursor, so later pages keep the same marketplace and sort.
Use cases
Section titled “Use cases”- Monitor where products rank for a keyword.
- Collect prices across Amazon marketplaces for the same search.
- Build a product list for further lookups with amazon-review or amazon-seller-scraper.
Request
Section titled “Request”curl -G "https://api.scrapier.io/api/v2/amazon-search/" \ -H "X-API-Key: YOUR_API_KEY" \ --data-urlencode "query=Playstation" \ --max-time 210const params = new URLSearchParams({ query: "Playstation" });
const res = await fetch(`https://api.scrapier.io/api/v2/amazon-search/?${params}`, { headers: { "X-API-Key": "YOUR_API_KEY" }, signal: AbortSignal.timeout(210_000),});const body = await res.json();if (!res.ok) throw new Error(body.error ?? body.detail ?? `HTTP ${res.status}`);
console.log(body.data.products);import requests
resp = requests.get( "https://api.scrapier.io/api/v2/amazon-search/", headers={"X-API-Key": "YOUR_API_KEY"}, params={"query": "Playstation"}, timeout=210,)body = resp.json()if not resp.ok: raise RuntimeError(body.get("error") or body.get("detail"))
print(body["data"]["products"])curl -X POST "https://api.scrapier.io/api/v2/amazon-search/" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query":"Playstation"}' \ --max-time 210Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
X-API-Key header | string | yes | — | Your API key from the dashboard. |
query | string | yes | e.g. Playstation | Search keyword (required first call). |
cursor | string | no | — | Pagination cursor returned in the previous response's next_cursor. Pass it back unchanged to fetch the next page. When next_cursor is null, you have reached the last page. |
domain_code | string | no | com | Amazon marketplace: com, co.uk, de, in, ca, it, es, fr (fr is AWS-WAF gated and may return 502). comco.ukdeincaitesfr locked in cursor |
sort_by | string | no | relevanceblender | Amazon sort key. relevanceblenderprice-asc-rankprice-desc-rankreview-rankdate-desc-rankexact-aware-popularity-rank locked in cursor |
category | string | no | — | Search category (optional) |
browse_node | integer | no | — | Browse node ID (optional) |
node_hierarchy | string | no | — | Node hierarchy (optional) |
max_pages | integer | no | 1 | First call only: front-load this many Amazon result pages (capped at 10). Cursor calls return one page (plus a refill page when it comes back thin). |
Advanced
| Name | Type | Default | Description |
|---|---|---|---|
use_proxy | boolean | true | Route the request through Scrapier's residential proxy pool. Default: true. Leave as is unless support tells you otherwise. |
raw_data | boolean | false | When true, the response carries the full raw upstream payload(s) the scraper received (GraphQL / JSON API bodies, HTML, embedded JSON-LD -- exactly as the platform returned them) under raw_responses, in place of the formatted items. When false (default) you get the formatted output. Pagination (cursor / next_cursor) works the same in both modes. |
Response
Section titled “Response”{ "success": true, "data": { "query": "laptop", "domain_code": "com", "sort_by": "relevanceblender", "page": 1, "page_size": 16, "pages_fetched": 1, "products": [ { "asin": "B0EXAMPLE10", "product_description": "Lenovo ThinkPad X1 Carbon Gen 11 14\" Laptop", "img_url": "https://m.media-amazon.com/images/I/example._AC_UY218_.jpg", "price": 1599, "retail_price": 1899, "product_rating": "4.6 out of 5 stars", "count_review": 1248, "dp_url": "https://www.amazon.com/Lenovo-ThinkPad-Carbon/dp/B0EXAMPLE10/ref=sr_1_1", "prime": true, "sponsored": false, "is_sponsored": false, "sales_volume": "500+ bought in past month", "delivery_message": "FREE delivery Tue, Oct 7", "manufacturer": null, "series": null, "variations": [], "product_details": [], "secondary_offer": 0, "status_code": 200, "status_message": "FOUND", "keyword": "laptop", "domain_code": "com", "page": 1, "selected_category": "aps", "browse_node": null, "node_hierarchy": null, "result_count": 100000, "categories": [ "Traditional Laptop Computers" ], "similar_keywords": [], "current_page": 1, "sort_strategy": "relevanceblender", "search_result_position": 0, "position": 1 } ], "next_cursor": "zc1.eNqFU01P..." }}Bad input. The exact message varies by endpoint.
{ "success": false, "error": "…"}Balance below the endpoint’s price.
{ "error": "Insufficient credits. Buy more to scrape more.", "balance": 1, "required": 2}Invalid or unknown API key.
{ "detail": "Authentication service unavailable or invalid API key."}Throttled — wait for Retry-After.
{ "detail": "Request was throttled. Expected available in N seconds."}Sample from the live catalog; arrays trimmed to 3 items. Results are in data.products.
Response fields
Section titled “Response fields”| Field | Type | Example | Description |
|---|---|---|---|
query | string | laptop | — |
domain_code | string | com | — |
sort_by | string | relevanceblender | — |
page | integer | 1 | — |
page_size | integer | 16 | — |
pages_fetched | integer | 1 | How many result pages this call fetched. |
products | array | [1 item] | The results. |
next_cursor | string | zc1.eNqFU01P... | Pass back as cursor for the next page. null on the last page. |
products[].asin | string | B0EXAMPLE10 | — |
products[].product_description | string | Lenovo ThinkPad X1 Carbon Gen 11 14" Laptop | — |
products[].img_url | string | https://m.media-amazon.com/images/I/example._… | — |
products[].price | integer | 1599 | — |
products[].retail_price | integer | 1899 | — |
products[].product_rating | string | 4.6 out of 5 stars | Average star rating, as text. |
products[].count_review | integer | 1248 | Number of reviews. |
products[].dp_url | string | https://www.amazon.com/Lenovo-ThinkPad-Carbon… | Link to the product page. |
products[].prime | boolean | true | — |
products[].sponsored | boolean | false | — |
products[].is_sponsored | boolean | false | — |
products[].sales_volume | string | 500+ bought in past month | — |
products[].delivery_message | string | FREE delivery Tue, Oct 7 | — |
products[].manufacturer | null | null | — |
products[].series | null | null | — |
products[].variations | array | [] | — |
products[].product_details | array | [] | — |
products[].secondary_offer | integer | 0 | — |
products[].status_code | integer | 200 | — |
products[].status_message | string | FOUND | — |
products[].keyword | string | laptop | The search keyword that returned the product. |
products[].domain_code | string | com | — |
products[].page | integer | 1 | — |
products[].selected_category | string | aps | — |
products[].browse_node | null | null | — |
products[].node_hierarchy | null | null | — |
products[].result_count | integer | 100000 | — |
products[].categories | array | [1 item] | — |
products[].similar_keywords | array | [] | — |
products[].current_page | integer | 1 | The results page the product was found on. |
products[].sort_strategy | string | relevanceblender | — |
products[].search_result_position | integer | 0 | Position of the product in the search results. |
products[].position | integer | 1 | — |
Pagination
Section titled “Pagination”Pass data.next_cursor back as cursor until it is null. Required inputs are ignored once a cursor is sent. Each page is one billed call. More in Pagination.
const url = "https://api.scrapier.io/api/v2/amazon-search/";let params = { query: "Playstation" };const items = [];
for (let page = 0; page < 10; page++) { // each page is one billed call const res = await fetch(`${url}?${new URLSearchParams(params)}`, { headers: { "X-API-Key": "YOUR_API_KEY" }, signal: AbortSignal.timeout(210_000), }); const body = await res.json(); if (!res.ok) throw new Error(body.error ?? body.detail ?? `HTTP ${res.status}`); const data = body.data; items.push(...(data.products ?? [])); if (!data.next_cursor) break; // null = last page params = { cursor: data.next_cursor };}import requests
URL = "https://api.scrapier.io/api/v2/amazon-search/"HEADERS = {"X-API-Key": "YOUR_API_KEY"}params = {"query": "Playstation"}items = []
for _ in range(10): # each page is one billed call resp = requests.get(URL, headers=HEADERS, params=params, timeout=210) resp.raise_for_status() data = resp.json()["data"] items.extend(data.get("products") or []) if not data.get("next_cursor"): # None = last page break params = {"cursor": data["next_cursor"]}Errors
Section titled “Errors”Failed calls are free. Branch on the HTTP status and read the message from error (or detail). Full details in Errors.
| Status | Meaning | Retry? | Charged? |
|---|---|---|---|
400 | Bad or missing input. | No — fix the params | No |
401 / 403 | Missing, invalid or revoked API key. | No — fix the key | No |
402 | Out of credits (body has balance). | No — top up | No |
404 | Unknown endpoint slug. | No — check the slug | No |
429 / 503 | Busy or throttled. | Yes — after Retry-After | No |
5xx | Target site or upstream failure, or timeout. | Yes — with backoff | No |
domain_codeandsort_byare set on the first call and reused for every page.max_pagesapplies to the first call only: it front-loads that many result pages (capped at 10). Cursor calls return one page, plus a refill page when it comes back thin.domain_codefris gated by Amazon’s AWS WAF and may return 502.category,browse_nodeandnode_hierarchyare optional filters.- Locked into the cursor:
domain_code,sort_by. Set them on the first call; later pages reuse them.
Related
Section titled “Related”- Amazon Products — Search Amazon by keyword or URL and get product listings, or send a product URL to get that single product.
- Amazon Best Sellers — Get ranked products from an Amazon Best Sellers category URL, with price, rating, review count and list position.
- Amazon Keyword Suggestions — Get Amazon search-box autocomplete suggestions for a keyword in one call.