Amazon search suggestions API
What Amazon’s search box suggests for a partial query, per marketplace and department.
GET /v1/amazon/search/suggestionsBeta1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/amazon/search/suggestions?query=laptop",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "alias": "aps", "prefix": "laptop", "suffix": "", "suggestions": [ { "suggType": "KeywordSuggestion", "type": "KEYWORD", "value": "laptop", "refTag": "nb_sb_ss_i_1_6", "candidateSources": "local", "strategyId": "organic", "prior": 0, "ghost": false, "help": false, "queryUnderstandingFeatures": [ { "source": "QU_TOOL", "annotations": [] } ] }, { "suggType": "KeywordSuggestion", "type": "KEYWORD", "value": "gaming laptop", "refTag": "nb_sb_ss_i_2_6", "candidateSources": "local", "strategyId": "organic", "prior": 0, "ghost": false, "help": false, "queryUnderstandingFeatures": [ { "source": "QU_TOOL", "annotations": [] } ] }, "… 8 more" ], "predictiveText": null, "suggestionTitleId": null, "responseId": "293BUT2D49HSP", "shuffled": false}Parameters
| Name | Type | Description |
|---|---|---|
queryquery · required | string | Partial search. Example: laptop. |
countryquery | "US" | "GB" | "CA" | "DE" | "FR" | "IT" | "ES" | "JP" | "IN" | "MX" | "BR" | "AU" | "NL" | Amazon marketplace: US (default), GB, CA, DE, FR, IT, ES, JP, IN, MX, BR, AU, NL. One of US, GB, CA, DE, FR, IT, ES, JP, IN, MX, BR, AU, NL. |
departmentquery | string | Department alias (default aps). |
Response fields
200 with a AmazonSuggestions, in the fields Amazon’s own product pages show.
| Field | Type | Description |
|---|---|---|
alias | string | |
prefix | string | |
suggestions | object[] |
Status codes
| Status | Meaning |
|---|---|
200 | Suggestions. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | The product, seller, list or shop does not exist in that marketplace. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Amazon is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Amazon is a trademark of Amazon.com, Inc. We are not affiliated with or endorsed by Amazon.