Install
openclaw skills install @fionavv/shopdora-shopee-toolThis skill should be used when the user wants to perform data analysis on Shopee platforms, including: keyword research, product discovery & search.
openclaw skills install @fionavv/shopdora-shopee-toolLeverage the Shopdora OpenAPI to perform cross-border ecommerce data analysis on Shopee across all supported sites. Capabilities include keyword research, product discovery, review scraping, category browsing, and balance queries.
Important prerequisite: Using this skill requires registering an account on the Shopdora website and activating the API service. This is a paid service — contact the official customer service (WeCom) on the website for pricing details.
You can ask questions in plain English, for example:
Before making any API call, check if the local credential file ~/.shopdora/config.json exists:
cat ~/.shopdora/config.json 2>/dev/null
If the config file doesn't exist, reply to the user:
This is a paid service. Please visit https://www.shopdora.com and contact official customer service to get your token. Once you have your
clientIdandclientSecret, share them with me and I'll set it up.
After receiving the credentials, create the config file:
mkdir -p ~/.shopdora
Then write the JSON config with the user-provided clientId and clientSecret.
{
"clientId": "std_xxxxxxxx",
"clientSecret": "your_secret_here"
}
Users may refer to sites by name rather than code. Auto-convert using this mapping:
| User might say | Maps to site code |
|---|---|
| Singapore, sg | sg |
| Taiwan, tw | tw |
| Malaysia, my | my |
| Philippines, ph | ph |
| Thailand, th | th |
| Vietnam, vn | vn |
| Indonesia, id | id |
| Brazil, br | br |
| Mexico, mx | mx |
If the user hasn't specified a site, ask which site they want to query.
Standard call sequence: Regardless of the user's request, always follow this order:
~/.shopdora/config.json~/.shopdora/token.json is valid; re-acquire if expiredWhen encountering unclear or missing information, you MUST ask the user before proceeding — never infer:
| Missing info | Alternative behavior example |
|---|---|
| No site specified | Ask: "Which Shopee site would you like to query?" |
| Vague keyword | Ask: "Could you specify the category or product keyword?" |
| Ambiguous time range (e.g., "recent" / "hot") | Ask: "Would you prefer the last 30 days or a specific month?" |
Before calling any paid endpoint (keyword, product, review), you MUST confirm key parameters with the user to avoid wasting quota due to incorrect parameters.
Confirmation example:
About to call the Keyword Research API (charged):
- Site: Singapore (sg)
- Keyword: phone case
- Search volume range: 1,000 ~ 50,000
- Sort by: Search volume (descending)
Proceed?
Only call the API after the user confirms.
When a paid endpoint returns a failure or empty result, the following actions are strictly forbidden:
Correct approach:
For example, when the user says "show next page":
Fetching the next page will consume 1 quota (X remaining). Continue?
To reduce redundant quota consumption, all successful paid endpoint responses are cached locally.
Cache location: ~/.shopdora/cache/
Cache file naming: {endpoint}_{site}_{paramMD5}.json
keyword_sg_a1b2c3d4.json, product_th_e5f6g7h8.jsonCache logic:
~/.shopdora/cache/A valid access token is required before any paid API calls.
Token persistence mechanism:
The token is stored in ~/.shopdora/token.json:
{
"accessToken": "a1b2c3d4e5f6...",
"tokenType": "Bearer",
"expiresIn": 2678400,
"obtainedAt": 1753718400
}
Token acquisition and validation flow:
~/.shopdora/token.jsonobtainedAt + expiresIn > current timestamp; use directly if valid~/.shopdora/config.json and call the token endpoint~/.shopdora/token.jsontoken.jsonAPI call:
curl -s -X POST 'https://openapi.shopdora.cn/openapi/standard/token' \
-H 'Content-Type: application/json' \
-d '{"clientId":"<read from config>","clientSecret":"<read from config>"}'
Token renewal rules:
9990, automatically delete token.json, re-acquire the token, and retry the original requesttokenExpiresIn field from /standard/queryBalance for the precise expiration timeProactively query when the user asks for balance, before bulk calls, or at the start of a session.
API call:
curl -s -X POST 'https://openapi.shopdora.cn/openapi/standard/queryBalance' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access_token>'
Result display format (must clearly present the following):
📊 Account Info
- Client Name: {clientName}
- Account Status: {accountStatus}
- Token Expires: {tokenExpiresIn}
💰 Quota Usage
- Period: {periodStart} ~ {periodEnd}
- Used / Limit: {quotaUsed} / {quotaLimit} ({quotaRemaining} remaining)
⚡ Rate Limit
- Per-minute limit: {rateLimitPerMinute} calls/min
- Used this minute: {rateLimitUsedThisMinute} calls
Use when the user wants to find trending search terms for a category or product.
Pre-call check: Check 24h cache first, then confirm parameters (site, keyword, filters) with the user. Only call API after confirmation. Do NOT auto-retry on failure or empty results.
Required params: site
Common optional params: keyword, cateIds, searchVolume, sortBy
API call:
First determine the site code using the site name mapping, confirm the user's filter criteria, then call:
curl -s -X POST 'https://openapi.shopdora.cn/openapi/standard/keyword/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access_token>' \
-d '{
"site": "<site>",
"keyword": "<keyword>",
"searchVolume": {"min": <min>, "max": <max>},
"sortBy": "<sortBy>",
"orderBy": 1,
"pageNum": 1,
"pageSize": 20
}'
Result display: Present keywords in a table with key metrics: searchVolume, searchVolumeIncRate, productNum, avgPrice, avgRating. If there are many results, inform the user that more pages are available (each additional page costs 1 quota).
Use when the user wants to discover and analyze trending products or competitors on Shopee.
Pre-call check: Check 24h cache first, then confirm parameters (site, keyword/category, price range, time range) with the user. Only call API after confirmation. Do NOT auto-retry on failure or empty results.
Required params: site, month
Common optional params: keyword, cateIds, price, salesM, shelfTimeRange, sortBy
month parameter:
30 → Last 30 days view (most common)202603 → Specific month viewprice parameter:
990000API call:
curl -s -X POST 'https://openapi.shopdora.cn/openapi/standard/product/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access_token>' \
-d '{
"site": "<site>",
"month": 30,
"keyword": "<keyword>",
"sortBy": "salesM",
"orderBy": 1,
"pageNum": 1,
"pageSize": 20
}'
Result display:
Use when the user wants to view buyer reviews for a product or analyze customer feedback.
Pre-call check: Check 24h cache first, then confirm parameters (site, shopId, itemId) with the user. Only call API after confirmation. Do NOT auto-retry on failure or empty results.
Required params: site, shopId, itemId, limit, offset
API call:
curl -s -X POST 'https://openapi.shopdora.cn/openapi/standard/comment/get' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access_token>' \
-d '{
"site": "<site>",
"shopId": <shopId>,
"itemId": <itemId>,
"limit": 20,
"offset": 0
}'
Pagination logic:
data.data.has_more; if true, offset += limit to fetch next pageResult display:
template_tags, display tag infoUse when the user needs to browse a site's product category tree.
API call:
curl -s -X POST 'https://openapi.shopdora.cn/openapi/standard/cate/list' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <access_token>' \
-d '{"site":"<site>","cateId":0}'
Note: Response data is a JSON string — you must JSON.parse before displaying.
Result display: Present the category tree with indentation, marking leaf nodes.
| Code | Site | Code | Site |
|---|---|---|---|
| sg | Singapore | vn | Vietnam |
| tw | Taiwan, China | id | Indonesia |
| my | Malaysia | br | Brazil |
| ph | Philippines | mx | Mexico |
| th | Thailand |
| code | Description | Action |
|---|---|---|
| 0000 | Success | Display results normally |
| 0001 | Invalid parameter | Check and correct request parameters, then retry |
| 9990 | Token invalid | Delete token.json, re-acquire token, retry original request |
| 9992 | IP not whitelisted | Inform user that current IP is not whitelisted; contact platform |
| 9993 | Rate limited | Wait a few seconds and retry automatically, up to 3 times |
| 9997 | Quota exhausted | Inform user that quota is used up; suggest waiting for next period or contacting support for expansion |
| 9999 | System busy | Wait 3 seconds and retry, up to 2 times |
~/.shopdora/cache/. Identical requests within 24 hours are served from cache without consuming quota.price fields from product/search must be divided by 100000 to show as local currency.For detailed API field definitions, parameter boundaries, and complete response JSON structures, load references/api_docs.md using the Read tool.