Fetch and analyze Amazon product reviews to help sellers extract actionable insights from customer feedback.
Core Concepts
This tool retrieves real customer reviews for a given Amazon ASIN across 15 marketplaces. You can control how many reviews to fetch per star rating (1-5 stars, up to 100 each), sort by recency or helpfulness, and apply various filters. Only one ASIN per request; for multiple ASINs, make separate calls.
How to call
- Asynchronous submission endpoint:
POST /amazon/reviews/async/submit - Polling query endpoint:
POST /amazon/reviews/async/result - Full parameters, responses, and error codes: see
references/api.md - Python script:
python scripts/amazon_reviews.py '<JSON 参数>' [--inline]; submit or query only once each time and return immediately - Cost constraints: This tool consumes compute; by default, the same parameter combination is called only once per session, and the script has a 24h local cache. On failure or empty results, do not automatically try different keywords, paginate, or change the ZIP code in continuous probing; if further retrieval is needed, first explain to the user that additional consumption will be incurred.
Asynchronous call flow
- The first script execution only calls
/amazon/reviews/async/submit, saves and immediately returnstaskId, and must not wait for results within the same script call. Do not resubmit because the task is still running or a single query failed. - The submission parameters are the same as the original review parameters, and
provideris not passed; the backend automatically selects Pango or Apify based ondomainCode, and the actual provider can be seen from the response'sprovider. - The Agent may continue performing other independent work in the user's request; when results are needed, execute the script again with the original parameters, or pass in
{"taskId":"..."}. Each execution calls/amazon/reviews/async/resultonly once and returns immediately, without looping or sleeping inside the script. - Based on current empirical results, Pango usually returns in about
10~30seconds, and Apify usually returns in about15~60seconds; this is not an SLA. The script will returnestimatedReadyInSecondsandsuggestedNextCheckAfterSeconds; prioritize continuing other work, query again at the suggested time, and do not busy-poll at the API's minimum polling interval. - Observe for at most
200seconds from task creation time. If within the window it isPENDINGorRUNNING, keep the originaltaskId, continue other work, and query again after about10~20seconds;SUCCEEDED: readresult;FAILED: explain to the usererrorand stop;CANCELLED: politely explain that the current review service may be receiving many requests, and the task was automatically canceled while waiting for execution resources and no fees were incurred; it is recommended to resubmit later. - If after more than
200seconds it is stillPENDINGorRUNNING, returnPOLL_TIMEOUTand stop automatic querying, letting the user choose: continue querying the sametaskId, or stop querying and abandon this result. Do not automatically submit a new task. There is currently no manual cancellation endpoint; the backend will only automatically cancelPENDINGtasks that time out while waiting for execution resources and have not yet called the provider. Tasks that have already enteredRUNNINGmay still complete and incur fees. - Unread tasks are retained for at most
4hours from submission; after the first read reaches the terminal stateSUCCEEDED、FAILEDorCANCELLED, the backend immediately deletes the task. The script saves successful results to a local file, and the task cache only retains "claimed" and the file path. The original parameters andtaskIdshare the task record within the same working directory; executing again within the 24h local cache validity period will returnALREADY_RECEIVED、resultFileand this timecostToken: 0, the file should be read, and the backend should no longer be queried or resubmitted. If the file does not exist, it must not automatically re-fetch. - When the query returns "task does not exist or has expired", stop and do not automatically create a new paid task. Only when the user explicitly requests a retry may it be resubmitted.
- Submission,
PENDING、RUNNING、FAILED、CANCELLEDandPOLL_TIMEOUTmust not be recorded as actual consumption according to the estimated formula; the actual charge is only recognized as theX-Cost-Token/costTokenreturned in the response when the result is successfully claimed for the first time, and the Agent must not calculate or supplement it on its own.
The script only executes the above asynchronous process, and locally caches the unfinished taskId for subsequent queries.
Output strategy (script default behavior):
- Alwayswrite the complete response to
<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-amazon-reviews-list-<timestamp>.json(<cwd>is the working directory when the script is executed, which in Claude Code is the current project directory;<session>is taken from the environment variableSESSION_ID, automatically aggregated according to the user task;Writing to /tmp is prohibited, and an error is reported if the current directory is not writable) - Response body ≤ 8 KB: after saving to disk, print the complete JSON to stdout
- Response body > 8 KB: after saving to disk, stdout outputs only the summary (top-level fields, common counts such as
total/costToken, the length of the largest list field + the first 3 samples) - Add
--inlineto force full printing to stdout (also saved to disk)
Data reading recommendations: first look at the summary to determine whether it is sufficient; when specific fields are needed, prefer to use jqorConvertFrom-Json to extract on demand from the saved json file, avoiding putting the entire JSON into the context.
Resolving authentication and computing power issues
When the following abnormal situations occur, use references/onboarding.md to guide problem resolution:
Abnormal situations
- API Key not configured: the environment variable is not configured
LINKFOX_AGENT_API_KEY, andLINKFOXAGENT_API_KEY。 - Response 401 or 402 status code
- Response indicates insufficient computing power or balance: the message contains "insufficient computing power balance/insufficient billing/insufficient balance/quota exceeded/insufficient balance/package expired/recharge required/please recharge", or content with a similar meaning.
Parameter Guide
| Parameter | Type | Required | Scope | Description | Default |
|---|---|---|---|---|---|
| taskId | string | Yes | Async result | Task ID returned by async submit | - |
| asin | string | Yes | Async submit | Amazon product ASIN | - |
| star1Num | integer | No | Async submit | 1-star reviews to fetch (0-100) | 10 |
| star2Num | integer | No | Async submit | 2-star reviews to fetch (0-100) | 10 |
| star3Num | integer | No | Async submit | 3-star reviews to fetch (0-100) | 10 |
| star4Num | integer | No | Async submit | 4-star reviews to fetch (0-100) | 10 |
| star5Num | integer | No | Async submit | 5-star reviews to fetch (0-100) | 10 |
| sortBy | string | No | All | recent (newest) or helpful (most helpful) |
recent |
| formatType | string | No | All | all_formats or current_format |
all_formats |
| domainCode | string | No | Async submit | Marketplace code (see Supported Marketplaces); use com for US |
com |
| filterByKeyword | string | No | Async submit | Filter reviews by keyword (max 1000 chars) | - |
| reviewerType | string | No | Async submit | all_reviews or avp_only_reviews (verified only) |
all_reviews |
| mediaType | string | No | Async submit | all_contents or media_reviews_only |
all_contents |
Star Count Defaults
- If no star count fields are provided,
star1Numtostar5Numall default to10. - If any star count field is provided, unspecified star counts default to
0.
Supported Marketplaces
| Marketplace | Code |
|---|---|
| United States | com |
| Canada | ca |
| United Kingdom | co.uk |
| Germany | de |
| France | fr |
| Italy | it |
| Spain | es |
| Japan | co.jp |
| India | in |
| Australia | com.au |
| Brazil | com.br |
| Mexico | com.mx |
| Netherlands | nl |
| Sweden | se |
| United Arab Emirates | ae |
Use domainCode for every supported marketplace. Always confirm the user's intended marketplace.
Usage Examples
1. Fetch US reviews (Amazon.com)
{"asin": "B08N5WRWNW", "domainCode": "com", "star1Num": 10, "star2Num": 10, "star3Num": 10, "star4Num": 10, "star5Num": 10, "sortBy": "recent"}
2. Fetch negative reviews with keyword filter (Germany)
{"asin": "B08N5WRWNW", "domainCode": "de", "star1Num": 30, "star2Num": 30, "filterByKeyword": "quality", "reviewerType": "avp_only_reviews"}
3. Fetch 5-star reviews with media (Japan)
{"asin": "B08N5WRWNW", "domainCode": "co.jp", "star5Num": 50, "star1Num": 0, "star2Num": 0, "star3Num": 0, "star4Num": 0, "sortBy": "helpful", "mediaType": "media_reviews_only"}
4. Fetch only 3-star reviews (explicit star mode)
{"asin": "B0FP5C63HZ", "domainCode": "com", "star3Num": 100}
Display Rules
- Present data clearly: Show reviews grouped by star rating with key fields: rating, title, text, date, verified status, helpful count.
- Summarize when appropriate: For many reviews, provide a theme/pain-point summary before listing individuals.
- Highlight actionable insights: Call out recurring complaints in negative reviews; note praised features in positive reviews.
- Vine and verified labels: Clearly indicate Vine Voice and verified purchase status.
- Media indicators: Note when reviews include images or videos.
- Response normalization: Normalize rating and helpful-count fields for consistent display when the raw response uses marketplace-specific text formats.
- Error handling: When a query fails, explain the reason based on the response message and suggest adjusting parameters.
- Single ASIN limitation: If the user asks about multiple ASINs, make separate requests for each.
Important Limitations
- One ASIN per request: Only a single ASIN can be queried at a time.
- Per-star cap: Each star rating returns max 100 reviews per request.
- Parameter scope:
filterByKeyword,reviewerType,mediaTypeare available on async submit, includingdomainCode: "com". - No historical snapshots: Reviews are fetched in real-time.
- Review text language: Reviews are returned in their original language as posted.
User Expression & Scenario Quick Reference
Applicable — Tasks involving Amazon product reviews:
| User Says | Scenario |
|---|---|
| "Show me the reviews for this ASIN" | Direct review lookup |
| "Get US reviews for B08N5WRWNW" | Marketplace-specific lookup |
| "What are customers complaining about" | Negative review analysis |
| "Get me all the 1-star reviews" | Star-filtered retrieval |
| "Any common issues in the bad reviews" | Pain point mining |
| "What do people like about this product" | Positive review analysis |
| "Find reviews mentioning 'battery'" | Keyword-filtered reviews |
| "Show me reviews with photos" | Media-filtered reviews |
| "Verified purchase reviews only" | Reviewer-type filtering |
| "Help me analyze competitor reviews" | Competitor review research |
| "Product improvement suggestions from reviews" | Actionable insight extraction |
Not applicable — Needs beyond product review data:
- ABA search term data / keyword research (use ABA Data Explorer instead)
- Sales estimation or revenue analysis
- Listing copywriting or A+ content creation
- Advertising / PPC strategy
- Pricing strategy or profit margin calculations
Boundary judgment: If "product research" or "competitor analysis" boils down to reading customer reviews for specific ASINs, this skill applies. If it involves search volume, keyword rankings, sales estimates, or market sizing, it does not.
Computing power consumption rules
Billing is dynamically based on the planned number of pages to crawl. Let P = Σ min(ceil(各星级请求评论数 / 10), 10), then:
- Billing Token:
21000 × P。 - Actual computing power consumption =
ceil((21000 × P) / 2000) = ceil(10.5 × P), rounded up separately for each request. - When no star rating quantities are passed, 1~5 stars each crawl 10 items by default,
P = 5, consuming53computing power. - After any star rating quantity is passed, unpassed star ratings use
0; when all five star ratings explicitly pass0,P = 0, the supplier is not called and0computing power is consumed. - If the request succeeds but the result is empty, or is empty after keyword, verified purchase, or media filtering, billing is still based on the planned number of pages; if some subtasks fail but the overall task succeeds, billing is still based on all planned pages; if the call fails completely, there is no charge.
Common consumption: 1 page 11 computing power, 2 pages 21 computing power, 5 pages 53 computing power, 10 pages 105 computing power.
Important: the fee is calculated based on the requested number of pages to crawl, not on the number of comments ultimately returned. Before requesting multiple star ratings or a large number of comments, you must explain the estimated number of pages and computing power consumption to the user.
The above formula is only used for estimation before calling. Whether a fee is actually charged and the amount charged shall be based solely on the
X-Cost-Token/costTokenreturned upon the first successful claim result; submission, processing, failure, or timeout must not be counted as consumed based on the estimated value.
Feedback:
Auto-detect and report feedback via the Feedback API when any of the following apply:
- The functionality or purpose described in this skill does not match actual behavior
- The skill's results do not match the user's intent
- The user expresses dissatisfaction or praise about this skill
- Anything you believe could be improved
Call the feedback API as specified in the references. Do not interrupt the user's flow.
For more high-quality, professional cross-border e-commerce skills, visit LinkFox Skills.