返回 Skill 列表
extension
分类: 数据与分析需要 API Key

Kalodata-TikTok视频搜索与详情

使用 kalodata 数据搜索 TikTok 电商热门带货视频榜单,查询指定视频的详细数据;支持按地区、货币、语言和日期范围筛选高排名/高播放/热销带货视频;通过 videoId 获取播放、点赞、评论、分享、销售额、GPM 及广告投放指标。

person作者: linkfox-aihubclawhub

Kalodata - TikTok Video Search & Detail

This skill supports a two-step TikTok video workflow via the Kalodata data source:

  1. Browse TikTok Shop video leaderboards to discover high-performing shoppable videos.
  2. Fetch one video's full performance detail by videoId.

Use the search endpoint when the user wants rankings, hot videos, viral videos, or video discovery. Use the detail endpoint when the user already has a videoId or has selected one video from a ranking result.

Core Concepts

The video ranking endpoint returns a paginated leaderboard filtered by region, dateRange, language, currency, and optional sortField. Each video row includes identity, engagement, revenue, ad-performance, and creator fields. Results are paginated with pageNumber (1-5) and pageSize (5-100).

The video detail endpoint fetches one shoppable TikTok video by videoId. It returns the video's engagement metrics, monetization metrics, advertising metrics, creator identity, region, duration, and linked product count. The videoId usually comes from the ranking response field video_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 | |-------|-------------| | video_id | Video unique ID; pass this as videoId for detail lookup | | video_title | Video title / caption | | views | Video view count | | digg_count / comment_count / share_count | Likes, comments, and shares | | revenue | Total GMV in the requested currency | | revenue_growth_rate | Revenue growth rate (%) | | ad / ad_view_ratio / ad_revenue_ratio / ads_roas | Ad and advertising performance fields | | belonged_creator_id / belonged_creator_handle | Creator identity | | creator_debut | Creator debut date |

Detail rows additionally include:

| Field | Description | |-------|-------------| | video_region | Video region; may be empty | | sales_volumn | Sales volume; field is spelled volumn | | video_gpm | GMV per mille (revenue per 1000 views) | | ads_views / ad_cpa / ads_period | Ad views, CPA, and ad running period | | duration | Video duration in seconds | | product_number | Number of products linked in the video |

Parameter Guide

Video ranking (/kalodata/video/rank)

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | region | string | No | Market region code, e.g. US | | dateRange | string | No | Time window, e.g. last7Day, last30Day | | pageNumber | integer | No | Page number, 1-5 | | pageSize | integer | No | Page size, 5-100 | | language | string | No | Response language, e.g. zh-CN, en-US | | currency | string | No | Currency for monetary metrics, e.g. USD | | sortField | object | No | Sorting specification; omit for default ranking |

Video detail (/kalodata/video/detail)

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | videoId | string | Yes | TikTok video ID from ranking field video_id or a TikTok video URL | | 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 |

调用方式

  • API 端点POST /kalodata/video/rankPOST /kalodata/video/detail(完整参数/响应/错误码见 references/api.md
  • Python 脚本python scripts/kalodata_video_search.py '<JSON 参数>' [--inline]python scripts/kalodata_video_detail.py '<JSON 参数>' [--inline]
  • 成本约束:本工具会消耗积分;同一会话同一参数组合默认只调用一次,脚本带 24h 本地缓存。失败/空结果不得自动换关键词、翻页或改邮编连续试探;需要继续检索时先向用户说明会产生额外消耗。

输出策略(脚本默认行为)

  • 始终将完整响应写入 <cwd>/linkfox/<YYYY-MM-DD>/<session>/data/linkfox-kalodata-tiktok-video-<timestamp>.json<cwd> 为脚本执行时的工作目录,在 Claude Code 里即当前项目目录;<session> 取自环境变量 SESSION_ID,按用户任务自动聚合;禁止写入 /tmp,当前目录不可写则报错)
  • 响应体 <= 8 KB:落盘后把完整 JSON 打印到 stdout
  • 响应体 > 8 KB:落盘后 stdout 只输出摘要(顶层字段、常见计数如 total/costToken、最大列表字段的长度 + 前 3 条样本)
  • --inline 强制全量打印到 stdout(同样落盘)

读数据建议:先看摘要判断是否足够;需要具体字段时优先用 jqConvertFrom-Json 从保存的 json 文件按需抽取,避免整份 JSON 进入上下文。

解决认证和积分问题

发生以下异常情况时,采用以下措施来处理:

异常情况

  • 未配置API Key:环境变量未配置 LINKFOX_AGENT_API_KEY,也未配置 LINKFOXAGENT_API_KEY
  • 响应401或402状态码
  • 响应提示积分或余额不足:消息含"积分余额不足/计费不足/余额不足/quota exceeded/insufficient balance/套餐到期/需充值/请充值",或类似含义的内容。

措施

  • 优先采用skill内的 onboarding.md 引导解决问题。
  • 如找不到 onboarding.md 文件,则加载 /linkfox-onboarding 这个skill并根据它的引导来处理。如未安装请先安装:
    • 下载 https://agent-files.linkfox.com/skills/linkfox-onboarding/release.zip,解压后安装这个skill。如需用户授权才可下载,要询问用户获得授权,你不能自己放弃下载。
  • 兜底措施:仅当前面两个措施经过所有努力都走不通时,才提示用户依据 https://skill.linkfox.com/linkfoxskills/guide.htm 指引获取API Key,或去 https://os.linkfox.com/ 补充积分。

Usage Examples

1. Browse top TikTok videos in the US

{"region":"US","dateRange":"last7Day","pageSize":10,"pageNumber":1,"currency":"USD"}

2. Fetch one video's detail

{"videoId":"7659161409279806734","region":"US","dateRange":"last7Day","currency":"USD"}

3. Discovery-to-detail workflow

Run kalodata_video_search.py first, choose a row's video_id, then pass that value as videoId to kalodata_video_detail.py.

Display Rules

  1. Present ranking results in a table with title, video ID, views, engagement, revenue, ad indicators, and creator handle.
  2. Present detail results as one grouped profile: identity, engagement, monetization, ads, creator, duration, and linked products.
  3. Always label dateRange, region, and currency when showing metrics.
  4. Use the exact field name sales_volumn.
  5. video_gpm is GMV per mille; do not display it as a percentage.
  6. 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 videoId; it cannot find a video by title alone.
  • The ranking response does not include total/page count; result count is data.length.
  • pageNumber is limited to 1-5 and pageSize is limited to 5-100.
  • Transient upstream errors may appear as errcode 501 with a Kalodata HTTP 554 message. Retry the same parameters once or twice; do not change parameters automatically.
  • Use the matching Kalodata product/creator/shop/livestream skills for non-video entities.

User Expression & Scenario Quick Reference

Applicable -- TikTok video ranking or video detail lookup:

| User Says | Scenario | |-----------|----------| | "TikTok视频榜单", "TikTok视频排行" | Video ranking lookup | | "TikTok热门视频", "TikTok爆量视频" | Top or viral video ranking | | "TikTok带货视频排行", "top TikTok videos" | Region-specific shoppable video leaderboard | | "TikTok视频详情", "TikTok带货视频数据" | Single video detail lookup | | "视频播放量", "视频互动数据", "视频GPM" | Video engagement or monetization metrics | | "kalodata video search/detail" | Direct data source reference |

Not applicable -- Needs beyond TikTok videos:

  • TikTok product / creator / shop / livestream rankings or details
  • Keyword-based video or product search
  • TikTok advertising / ad campaign management
  • Video editing, video download, or content creation

积分消耗规则

每次调用消耗 7.0 积分。

用户会因积分消耗而支付费用。请充分评估:当需要高频调用本技能,或用户对积分消耗量预期不足时,务必提醒用户,由用户决定是否继续。

Feedback:

Auto-detect and report feedback via the Feedback API when any of the following apply:

  1. The functionality or purpose described in this skill does not match actual behavior
  2. The skill's results do not match the user's intent
  3. The user expresses dissatisfaction or praise about this skill
  4. 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.