This skill supports a two-step TikTok Shop product workflow via the Kalodata data source:
- Browse TikTok Shop product leaderboards to discover top-ranked and best-selling products.
- Fetch one product's full detail by
productId.
Use the ranking endpoint when the user wants best-seller rankings, hot products, or product discovery. Use the detail endpoint when the user already has a productId or has selected one product from a ranking result.
Core Concepts
The product ranking endpoint returns a paginated leaderboard filtered by region, dateRange, currency, language, and optional sortField. Each product row includes identity, price, sales volume, revenue (split across video, live, and showcase channels), revenue growth rate, commission rate, and launch date. Results are paginated with pageNumber (1-5) and pageSize (5-100).
The product detail endpoint fetches one TikTok Shop product by productId. It returns the product's price range, sales, revenue (with channel split), commission rate, launch date, review count, category hierarchy, owning shop, and associated video/live/creator counts. The productId usually comes from the ranking response field product_id.
Both endpoints may reflect a statistical delay (T+1). See references/api.md for full request and response details.
Data Fields
Ranking rows include:
| Field | Description |
|---|---|
| product_id | Product unique ID; pass this as productId for detail lookup |
| product_name | Product title |
| unit_price | Price per unit (currency follows region, e.g. USD for US) |
| sales_volumn | Units sold (field is spelled volumn) |
| revenue | Total revenue / GMV; equals video + live + showcase revenue |
| video_revenue | Revenue from the video channel |
| live_revenue | Revenue from the live-stream channel |
| showcase_revenue | Revenue from the showcase / 橱窗 channel |
| revenue_growth_rate | Revenue growth rate (%) |
| commission_rate | Commission rate as a direct percentage (25.0 = 25%) |
| launch_date | Product launch date (YYYY-MM-DD) |
Detail rows additionally include:
| Field | Description |
|---|---|
| product_region | Product market region (e.g. us) |
| product_shop_id | ID of the shop this product belongs to |
| pri_cate_id / sec_cate_id / ter_cate_id | Primary / secondary / tertiary category IDs |
| min_price / max_price | Minimum / maximum price in the requested currency |
| product_review_count | Number of product reviews |
| delivery_type | Delivery type (e.g. local) |
| video_number / live_number / creator_number | Associated video / live / creator counts |
| shopping_mall_revenue | Revenue from the shopping mall (商城) channel |
Detail revenue channel split:
revenue=video_revenue+live_revenue+shopping_mall_revenue.
Parameter Guide
Product ranking (/kalodata/product/rank)
| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | No | TikTok Shop market region code, e.g. US. Default US when unspecified |
| dateRange | string | No | Relative time window, e.g. last7Day, last30Day |
| currency | string | No | Currency for monetary metrics, e.g. USD |
| language | string | No | Response language, e.g. zh-CN, en-US |
| category_ids | array | No | Category ID list filter |
| shop_id | string | No | Shop ID filter |
| creator_id | string | No | Creator ID filter |
| video_id | string | No | Return products associated with the specified video |
| livestream_id | string | No | Return products associated with the specified livestream |
| revenue_range | string | No | Revenue / GMV range filter |
| is_affiliate | string | No | Affiliate filter: PUBLIC_PLAN or NON_AFFILIATE |
| commission_rate | number | No | Affiliate commission rate, e.g. 0.15 |
| is_tts_product | integer | No | Fully managed product filter: 1 or 0 |
| unit_price_range | string | No | Product unit-price range filter |
| sortField | object | No | Sorting specification; omit for default ranking |
| pageNumber | integer | No | Page number, 1-5 |
| pageSize | integer | No | Page size, 5-100 |
Product detail (/kalodata/product/detail)
| Parameter | Type | Required | Description |
|---|---|---|---|
| productId | string | Yes | TikTok product ID from ranking field product_id (string to preserve precision) |
| region | string | No | Market region code, e.g. US |
| dateRange | string | No | Time window, e.g. last7Day, last30Day |
| language | string | No | Response language, e.g. zh-CN, en-US |
| currency | string | No | Currency for monetary metrics, e.g. USD |
How to Call
- API Endpoint:
POST /kalodata/product/rankorPOST /kalodata/product/detail(for full parameters/responses/error codes seereferences/api.md) - Python Script:
python scripts/kalodata_product_search.py '<JSON 参数>' [--inline]orpython scripts/kalodata_product_detail.py '<JSON 参数>' [--inline] - Cost Constraints: This tool consumes compute credits; by default, the same parameter combination in the same session is called only once, and the script has a 24h local cache. On failure/empty results, do not automatically switch keywords, paginate, or change the zip code to probe continuously; if further retrieval is needed, first explain to the user that additional consumption will be incurred.
Output Strategy (Script Default Behavior):
- Alwayswrite the full response to
<cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-kalodata-tiktok-product-<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, 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 using jqorConvertFrom-Json to extract on demand from the saved json file, avoiding bringing the entire JSON into context.
Resolving Authentication and Compute Credit Issues
When the following abnormal situations occur, use references/onboarding.md to guide 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 credits or balance: The message contains "insufficient compute credits/insufficient billing/insufficient balance/quota exceeded/insufficient balance/package expired/recharge required/please recharge", or content with a similar meaning.
Usage Examples
1. Browse top TikTok products in the US (last 7 days)
{"region":"US","dateRange":"last7Day","pageSize":20,"pageNumber":1,"currency":"USD"}
2. Fetch one product's detail
{"productId":"1729508370969629931","region":"US","dateRange":"last7Day","currency":"USD"}
3. Discovery-to-detail workflow
Run kalodata_product_search.py first, choose a row's product_id, then pass that value as productId to kalodata_product_detail.py.
Display Rules
- Present ranking results in a table with product name, product ID, price, sales volume, revenue (with channel split), growth rate, commission rate, and launch date.
- Present detail results as one grouped profile: identity, price range, sales, revenue (channel split), commission, category hierarchy, owning shop, and associated video/live/creator counts.
- Always label
dateRange,region, andcurrencywhen showing monetary metrics. - Use the exact field name
sales_volumn. commission_rateis a direct percentage (25.0 = 25%), not basis points — show with a % sign.revenue_growth_rateis a percentage — show with a % sign.- Revenue channel split: ranking
revenue=video_revenue+live_revenue+showcase_revenue; detailrevenue=video_revenue+live_revenue+shopping_mall_revenue. Present the split when useful. - Preserve ranking order unless the user explicitly requests a supported
sortField.
Important Limitations
- Ranking is not keyword search; it browses leaderboards by region and time window.
- Detail requires
productId; it cannot find a product by name alone. ObtainproductIdfrom the rankingproduct_idfirst. - The ranking response does not include
totalor page count; result count isdata.length. pageNumberis limited to 1-5 andpageSizeis limited to 5-100.- A valid-but-empty request (e.g. an unsupported
region) may returnerrcode 200with nodatafield and still be billed. - Transient upstream errors may appear as
errcode 501with a Kalodata HTTP 5xx message (e.g. 522/554). Retry the same parameters once or twice; do not change parameters automatically. - Use the matching Kalodata video/creator/shop/livestream skills for non-product entities.
User Expression & Scenario Quick Reference
Applicable -- TikTok product ranking or product detail lookup:
| User Says | Scenario |
|---|---|
| "TikTok product rankings", "TikTok product leaderboard" | Product ranking lookup |
| "TikTok best-sellers", "TikTok trending product rankings", "TikTok product selection rankings" | Best-seller / hot product ranking |
| "kalodata product rankings", "kaloda rankings" | Direct data source reference |
| "TikTok product details", "TikTok product information" | Single product detail lookup |
| "product price", "product sales volume" | Product price / sales |
| "kalodata product rank/detail", "product analytics" | Direct product detail reference |
Not applicable -- Needs beyond TikTok products:
- TikTok video / creator / shop / livestream rankings or details
- Keyword-based product search
- Amazon / Shopify / 1688 product research (use the platform-specific skills)
- TikTok advertising / ad campaign management or content creation
Compute Credit Consumption Rules
Each call consumes 7.0 compute credits.
Users pay fees due to compute credit consumption. Please fully assess: when this skill needs to be called frequently, or when the user's expectation of compute credit consumption is insufficient, 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.
For more high-quality, professional cross-border e-commerce skills, visit LinkFox Skills.