AI City Remix$11,500 prize pool. Pick a city, let AI tell its story, Oct 22 – 28.Join now
API reference · Amazon

amazon/search

Integrate this model through SandBase's unified API, with production-ready schemas and examples.

Production endpoint

Send your first request

OpenAI-compatible endpoint with unified authentication and usage tracking.

POSThttps://api.sandbase.ai/v1/api/amazon/search
Model IDamazon/search
01

Input Schema

12 parameters · 1 required · 11 optional

ParameterTypeRequiredDescription
kstringnumberbooleanRequiredThe query you want to search. You can use anything that you would use in a regular Amazon search. This parameter can't be used with the `node` parameter.
sunionOptionalSorting results. Available options: `relevanceblender` - Featured (default) `price-asc-rank` - Price: Low to High `price-desc-rank` - Price: High to Low `review-rank` - Avg. Customer Review `date-desc-rank` - Newest Arrivals `exact-aware-popularity-rank` - Best Sellers
dcunionOptionalThe exclusion of results from an auto-corrected query when the original query is spelled wrong. It can be set to `true` to exclude these results, or `false` to include them (default).
rhstringnumberbooleanOptionalItems filtering based on their attributes. The structure is a list of `key:value` pairs separated by `,`. For example `n:16318031,p_n_cpf_eligible:21512497011,p_72:1248897011` to filter for products in **Coffee** department (`n:16318031`) that are **Climate Pledge Friendly** (`p_n_cpf_eligible:21512497011`) and rated **4 Stars & Up** (`p_72:1248897011`). Head to Amazon Category Nodes for a full list of supported Amazon Categories.
nodestringnumberbooleanOptionalSpecifies the category for Amazon search results. You can find the appropriate node value by browsing Amazon’s website and accessing a specific category. The node ID is typically included in the URL after the format `node=[NODE ID]`. For example, on Amazon.com, the node for Smart Home is `6563140011`, and on Amazon.co.uk, the node for Fashion is `11961407031`. Use this node value to filter search results by category. This parameter can't be used with the `k` parameter. Head to Amazon Category Nodes for a full list of supported Amazon Categories.
pagestringnumberbooleanOptionalThe page number. It's used for pagination. (e.g., `1` (default) is the first page of results, `2` is the 2nd page of results, `3` is the 3rd page of results, etc.).
devicestringnumberbooleanOptionalThe device to use to get the results. It can be set to `desktop` (default) to use a regular browser, `tablet` to use a tablet browser (currently using iPads), or `mobile` to use a mobile browser.
languagestringnumberbooleanOptionalThe language to use for the Amazon search. It's a locale name represented as _. (e.g., on amazon.com `en_US` for English, `es_US` for Spanish, or on amazon.co.jp `ja_JP` for Japanese). Head to Amazon languages for a full list of supported Amazon languages.
delivery_zipstringnumberbooleanOptionalZIP Postal code. To filter the shipping products by a selected area.
amazon_domainstringnumberbooleanOptionalThe Amazon domain to use. It defaults to `amazon.com`. Head to Amazon domains for a full list of supported Amazon domains.
json_restrictorstringnumberbooleanOptionalThe fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.
shipping_locationstringnumberbooleanOptionalShipping country. To filter the shipping products by a selected country.
02

Output Schema

FieldTypeDescription
idstringUnique identifier for the generation task
statusstringTask status: pending, running, completed, failed, timeout
modelstringModel used for the generation
outputsarrayArray of output items
outputs[].urlstringURL of the generated artifact
outputs[].content_typestringMIME type (e.g. image/png, video/mp4)
errorobject | nullError details if failed, null on success
error.typestringMachine-readable error type code
error.messagestringHuman-readable error description

Async Workflow

This model uses asynchronous execution. Submit a request and poll for the result.

  1. Submit — POST to /v1/run, receive an id
  2. Poll — GET /v1/run/{id} until status is completed, failed, or timeout
  3. Retrieve — Read outputs from the completed response
03

Code Examples

Ready-to-run snippets

const apiKey = process.env.SANDBASE_API_KEY;
const response = await fetch("https://api.sandbase.ai/v1/api/amazon/search", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});

if (!response.ok) throw new Error(await response.text());
console.log(await response.json());