This skill helps fetch node-level market statistics for Amazon categories via SellerSprite.
Core Concepts
- Node statistics: Perform aggregate statistics on a specified category node without returning full product details.
- TopN scope:
topNdetermines the sample size for top product statistics (default 10). - New product definition:
newProductspecifies that "new products" are defined by the most recent N months (default 6).
How to call
- API endpoint:
POST /sellersprite/market/statistics(for full parameters/responses/error codes, seereferences/api.md) - Python script:
python scripts/sellersprite_market_statistics.py '<JSON 参数>' [--inline] - Cost constraint: 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 postal code in repeated probing; if further retrieval is needed, first explain to the user that it will incur additional consumption.
Output strategy (script default behavior):
- Alwayswrite the full response to
<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-sellersprite-market-statistics-<timestamp>.json(<cwd>is the working directory when the script runs, which in Claude Code is the current project directory;<session>is taken from the environment variableSESSION_ID, automatically aggregated according to the user's 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 full JSON to stdout
- Response body > 8 KB: after saving to disk, stdout outputs only a summary (top-level fields, common counts such as
total/costToken, length of the largest list field + first 3 samples) - Add
--inlineto force full printing to stdout (also saved to disk)
Data reading suggestion: First look at the summary to determine whether it is sufficient; when specific fields are needed, prefer using jqorConvertFrom-Json to extract on demand from the saved json file, avoiding bringing the entire JSON into context.
Resolve authentication and compute 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 compute or balance: The message contains "insufficient compute balance/insufficient billing/insufficient balance/quota exceeded/insufficient balance/package expired/recharge required/please recharge", or similar meaning.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| marketplace | string | Yes | Site code, default US |
| nodeIdPath | string | Yes | Node ID path, e.g. 1064954:1069242:... |
| month | string | No | nearly or yyyyMM |
| topN | integer | No | Number of top samples, default 10 |
| newProduct | integer | No | New product definition (months), default 6 |
Usage Example
{
"marketplace": "US",
"nodeIdPath": "172282:281407",
"month": "nearly",
"topN": 10,
"newProduct": 6
}
Display Rules
- Clearly display the statistical scope:
topN、newProduct, time range. - First output the key overview metrics, then output the extended fields.
- If the user does not provide
nodeIdPath, first guide the user to provide the node path or perform category positioning first.
Important Limitations
- Required parameter:
marketplace、nodeIdPath nodeIdPathmust be a valid node path- Month queries are limited by the third party's historical range
Compute power consumption rules
Consumes 15 compute power.
Users will be charged due to compute power consumption. Please fully assess: when this skill needs to be called frequently, or when the user has insufficient expectations for compute power consumption, be sure to remind the user, and let the user decide whether to continue.
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 references/api.md. Do not interrupt the user's flow.