# Amazon Keyword Suggestion Scraper 🛒 (`premiumscraper/amazon-keyword-suggestion-scraper`) Actor

Extracts autocomplete keyword recommendations directly from Amazon suggestions API. Captures value, refTag, strategy, source, and department alias for multiple prefixes. Deep crawl to map thousands of related search terms with parent/root lineage ✨ Amazon Keyword Suggestion Scraper 🔍

- **URL**: https://apify.com/premiumscraper/amazon-keyword-suggestion-scraper.md
- **Developed by:** [Premium Scraper](https://apify.com/premiumscraper) (community)
- **Categories:** E-commerce, SEO tools, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 suggestion scrapeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## 🔍 Amazon Keyword Suggestion Scraper

Welcome to the official documentation for the **Amazon Keyword Suggestion Scraper**! The **Amazon Keyword Suggestion Scraper** is a high-performance, low-latency, and high-resiliency cloud-based autocomplete suggestions data extraction tool.

By utilizing the **Amazon Keyword Suggestion Scraper**, you can instantly extract all matching keyword search recommendations and autocomplete search terms directly from Amazon's autocomplete suggestions API for multiple prefix keywords.

---

### 🌳 Recursive Keyword Tree Expansion

The **Amazon Keyword Suggestion Scraper** features a powerful, state-of-the-art **Keyword Tree Expansion** search system. When Keyword Tree Expansion is enabled, the **Amazon Keyword Suggestion Scraper** recursively crawls search suggestions:
* **Tier 1:** The **Amazon Keyword Suggestion Scraper** fetches suggestions for your initial input keywords (e.g. `ps5`, returning `ps5 controller`, `ps5 console`, etc.).
* **Tier 2:** The **Amazon Keyword Suggestion Scraper** automatically queues all unique suggestions returned in Tier 1 and queries suggestions for *each* of those terms.
* **Tier 3 & Beyond:** This process continues recursively, building a deep branching tree of keywords until the **Max Suggestions Limit** or PPE budget limit is reached.

This recursive logic turns a single keyword input into 100+ related terms on Tier 2, and 1,000+ keywords on Tier 3! You can set the **Max Suggestions Limit** (default: 100) to control exactly how many suggestions the **Amazon Keyword Suggestion Scraper** collects before stopping.

---

### 📦 Data Fields Extracted by Amazon Keyword Suggestion Scraper

For every search recommendation found, the **Amazon Keyword Suggestion Scraper** extracts a comprehensive set of attributes, parsing raw suggestions responses into clean JSON records. Here is a detailed breakdown of the exact fields the **Amazon Keyword Suggestion Scraper** outputs:

* **`searchPrefix` (string):** The prefix keyword query used in the suggestions request (e.g. `ps5`).
* **`suggestedKeyword` (string):** The recommended autocomplete keyword suggestion returned by Amazon (e.g. `ps5 controller`).
* **`parentKeyword` (string):** The immediate query keyword that yielded this suggestion card. Useful for tracing branching links.
* **`rootKeyword` (string):** The primary root input keyword that initiated this tree branch traversal.
* **`referenceTag` (string):** The unique reference tag identifying the recommendation location on Amazon search UI.
* **`matchingStrategy` (string):** Strategy used to score and choose the recommendation (e.g., `keyword`).
* **`searchAlias` (string):** Search department alias group (e.g. `aps` for all departments).
* **`clickAction` (string):** Action dispatch tag triggered by clicking the recommendation (e.g. `SEARCH`).
* **`amazonResponseId` (string):** Unique transaction response ID returned by Amazon autocomplete API. Useful for tracing session logs.

---

### 📈 Business Use Cases for Amazon Keyword Suggestion Scraper

Here is how you can leverage data gathered by the **Amazon Keyword Suggestion Scraper** for commercial success:

* **SEO Keyword Research:** Run the **Amazon Keyword Suggestion Scraper** to uncover high-intent search terms that shoppers use on Amazon, boosting your product listing search engine ranks.
* **Competitor Content Optimization:** Use **Amazon Keyword Suggestion Scraper** suggestions to discover related products and tags to optimize your product details.
* **PPC Campaign Keywords:** Feed **Amazon Keyword Suggestion Scraper** outputs into your Amazon Ads PPC campaigns to bid on high-performing autocomplete keywords.

---

### 📋 JSON Output Sample from Amazon Keyword Suggestion Scraper

Here is a sample JSON suggestion object exported by the **Amazon Keyword Suggestion Scraper**:

```json
{
        "searchPrefix": "ps5 controller accessories",
        "suggestedKeyword": "ps5 controller stand",
        "parentKeyword": "ps5 controller accessories",
        "rootKeyword": "ps5",
        "referenceTag": "nb_sb_ss_saint-en-refocus-candidate_ci_hl-bn-left_7_26",
        "matchingStrategy": "saint-en-refocus-candidate",
        "searchAlias": "aps",
        "amazonResponseId": "2W5R7VEGZ73UH"
}
````

***

### 🛠️ How to Run the Amazon Keyword Suggestion Scraper

Using the **Amazon Keyword Suggestion Scraper** on the Apify Platform is simple:

1. Open the **Amazon Keyword Suggestion Scraper** input console page.
2. Provide a list of search prefixes to the **Amazon Keyword Suggestion Scraper** configuration (e.g. `["ps5", "xbox"]`).
3. Select your residential proxy country exit node for **Amazon Keyword Suggestion Scraper** requests.
4. Click **Start** to run the **Amazon Keyword Suggestion Scraper** execution.

#### Example Input Configuration:

```json
{
    "keywords": ["ps5", "xbox"],
    "proxyCountry": "US"
}
```

***

### 💸 Pay-Per-Event Billing & Budget Limits

With the **Amazon Keyword Suggestion Scraper**, you are in control of your budget. The **Amazon Keyword Suggestion Scraper** will automatically halt execution once your maximum cost per run is reached. Your dataset remains preserved up to the exact point of the stop. The **Amazon Keyword Suggestion Scraper** only logs successful PPE confirmation hits, ensuring transparency.

Use the **Amazon Keyword Suggestion Scraper** today to get the most reliable, clean, and unique Amazon suggestions data!

# Actor input Schema

## `keywords` (type: `array`):

List of keywords or search prefixes to retrieve suggestions for (e.g. \['ps5', 'xbox']).

## `proxyCountry` (type: `string`):

Choose the residential proxy exit country. US is recommended.

## `keywordTreeExpansion` (type: `boolean`):

When ON, the scraper recursively queries autocomplete suggestions returned from previous steps, mapping a full branch tree. When OFF, it only queries suggestions for the initial input keywords.

## `maxSuggestions` (type: `integer`):

The maximum number of unique suggestions to collect in total before stopping. Used to control the expansion threshold.

## Actor input object example

```json
{
  "keywords": [
    "ps5"
  ],
  "proxyCountry": "US",
  "keywordTreeExpansion": false,
  "maxSuggestions": 100
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "keywords": [
        "ps5"
    ],
    "proxyCountry": "US"
};

// Run the Actor and wait for it to finish
const run = await client.actor("premiumscraper/amazon-keyword-suggestion-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "keywords": ["ps5"],
    "proxyCountry": "US",
}

# Run the Actor and wait for it to finish
run = client.actor("premiumscraper/amazon-keyword-suggestion-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "keywords": [
    "ps5"
  ],
  "proxyCountry": "US"
}' |
apify call premiumscraper/amazon-keyword-suggestion-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=premiumscraper/amazon-keyword-suggestion-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Amazon Keyword Suggestion Scraper 🛒",
        "description": "Extracts autocomplete keyword recommendations directly from Amazon suggestions API. Captures value, refTag, strategy, source, and department alias for multiple prefixes. Deep crawl to map thousands of related search terms with parent/root lineage ✨ Amazon Keyword Suggestion Scraper 🔍",
        "version": "1.0",
        "x-build-id": "0yWNqGhU46HCXaAAK"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/premiumscraper~amazon-keyword-suggestion-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-premiumscraper-amazon-keyword-suggestion-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/premiumscraper~amazon-keyword-suggestion-scraper/runs": {
            "post": {
                "operationId": "runs-sync-premiumscraper-amazon-keyword-suggestion-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/premiumscraper~amazon-keyword-suggestion-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-premiumscraper-amazon-keyword-suggestion-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "keywords"
                ],
                "properties": {
                    "keywords": {
                        "title": "🔑 Search Keywords / Prefixes",
                        "type": "array",
                        "description": "List of keywords or search prefixes to retrieve suggestions for (e.g. ['ps5', 'xbox']).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "proxyCountry": {
                        "title": "🌐 Proxy Country",
                        "enum": [
                            "US",
                            "GB",
                            "AU",
                            "CA",
                            "DE",
                            "FR",
                            "NL",
                            "IT",
                            "ES",
                            "SE",
                            "NO",
                            "DK",
                            "FI",
                            "BE",
                            "AT",
                            "CH",
                            "IE",
                            "PL",
                            "PT",
                            "CZ",
                            "HU",
                            "RO",
                            "GR",
                            "JP",
                            "KR",
                            "SG",
                            "IN",
                            "BR",
                            "MX",
                            "AR",
                            "TR"
                        ],
                        "type": "string",
                        "description": "Choose the residential proxy exit country. US is recommended.",
                        "default": "US"
                    },
                    "keywordTreeExpansion": {
                        "title": "🌳 Enable Keyword Tree Expansion",
                        "type": "boolean",
                        "description": "When ON, the scraper recursively queries autocomplete suggestions returned from previous steps, mapping a full branch tree. When OFF, it only queries suggestions for the initial input keywords.",
                        "default": false
                    },
                    "maxSuggestions": {
                        "title": "📦 Max Suggestions Limit",
                        "minimum": 1,
                        "type": "integer",
                        "description": "The maximum number of unique suggestions to collect in total before stopping. Used to control the expansion threshold.",
                        "default": 100
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
