# Amazon Review QA Complaint Miner (`isotonic/amazon-review-qa-complaint-miner`) Actor

Analyze public Amazon reviews and Q\&A to surface recurring complaints, product gaps, buyer questions, and feature opportunities in structured data.

- **URL**: https://apify.com/isotonic/amazon-review-qa-complaint-miner.md
- **Developed by:** [Brian Keefe](https://apify.com/isotonic) (community)
- **Categories:** E-commerce, Business, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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-review-qa-complaint-miner

Production-ready Apify Actor that mines Amazon public product feedback into structured `review`, `qna`, `theme`, and `warning` rows.

### Target buyers

- Ecommerce operators validating product-market fit
- Marketplace analysts monitoring complaint trends
- Product managers looking for missing-feature requests
- Agencies building voice-of-customer reporting pipelines

### What it does

- Accepts Amazon ASINs or product URLs
- Fetches public product, review, and question pages over normal HTTP requests only
- Detects blocked pages such as captcha, robot check, and HTTP 403 responses
- Emits warning rows instead of crashing when blocking is encountered
- Supports deterministic offline fixture mode through `fixtureHtmlPaths`
- Extracts review rows, Q\&A rows, and derived theme rows
- Categorizes themes with deterministic keyword rules

### Public-data limits

- The actor only works against public HTML and does not log in
- Amazon can rate-limit, geo-gate, or challenge requests with captcha/robot pages
- Structure can vary by marketplace and page template, so extraction is best-effort
- When public pages are blocked, the actor outputs warning rows with evidence instead of failing the run

### Input

Supported input fields:

- `asins`: array of ASIN strings
- `urls`: array of Amazon product URLs
- `marketplaceDomain`: domain such as `www.amazon.com`
- `maxReviews`: maximum number of reviews to emit per product
- `maxQuestions`: maximum number of Q\&A rows to emit per product
- `ratingFilter`: optional minimum star rating number
- `startDate`: optional ISO date lower bound
- `endDate`: optional ISO date upper bound
- `fixtureHtmlPaths`: optional local HTML paths for offline deterministic mode

Example:

```json
{
  "asins": ["B0TEST1234"],
  "marketplaceDomain": "www.amazon.com",
  "maxReviews": 10,
  "maxQuestions": 10,
  "ratingFilter": 1,
  "startDate": "2024-01-01",
  "endDate": "2024-12-31",
  "fixtureHtmlPaths": [
    "tests/fixtures/product.html",
    "tests/fixtures/reviews.html",
    "tests/fixtures/questions.html"
  ]
}
```

See `examples/sample-input.json`.

### Output

The actor pushes a flat dataset containing mixed row types:

- `review`: normalized review data
- `qna`: normalized product question and answer data
- `theme`: mined complaint, praised-feature, and missing-feature insights
- `warning`: non-fatal fetch or block detection event

Each theme row includes:

- `themeType`
- `category`
- `urgency`
- `quote`
- `rating`
- `date`
- `sourceUrl`
- `evidence`

See `examples/sample-output.json`.

### Local commands

Install dependencies:

```bash
npm install
```

Run tests:

```bash
npm test
```

Run deterministic smoke test:

```bash
npm run smoke
```

### Apify run

The actor entrypoint is `src/main.js` and writes results with `Actor.pushData`.

# Actor input Schema

## `asins` (type: `array`):

Amazon ASIN identifiers.

## `urls` (type: `array`):

Amazon product URLs.

## `marketplaceDomain` (type: `string`):

Amazon marketplace domain such as www.amazon.com.

## `maxReviews` (type: `integer`):

Maximum number of public review rows to process per ASIN or URL.

## `maxQuestions` (type: `integer`):

Maximum number of public Q\&A rows to process per ASIN or URL.

## `ratingFilter` (type: `integer`):

Keep only reviews with rating greater than or equal to this value.

## `startDate` (type: `string`):

Inclusive ISO date lower bound.

## `endDate` (type: `string`):

Inclusive ISO date upper bound.

## `fixtureHtmlPaths` (type: `array`):

Local HTML paths for deterministic offline fixture mode.

## Actor input object example

```json
{
  "marketplaceDomain": "www.amazon.com",
  "maxReviews": 20,
  "maxQuestions": 20
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("isotonic/amazon-review-qa-complaint-miner").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("isotonic/amazon-review-qa-complaint-miner").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 '{}' |
apify call isotonic/amazon-review-qa-complaint-miner --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=isotonic/amazon-review-qa-complaint-miner",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/c5KIwlvExX8stNkUS/builds/MSU1pmJMAyw2cPvrq/openapi.json
