| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316 |
- {
- "name": "tiktok-video-search",
- "displayName": "TikTok 视频搜索",
- "description": "按关键词搜索 TikTok 视频,返回视频列表及播放量/点赞/评论/分享等数据。适用于品类 TikTok 爆款内容发现、竞品视频监控、社媒频道热度统计、KOL 内容效果对比。",
- "category": "social-media",
- "version": "1.3.0",
- "endpoint": {
- "method": "GET",
- "url": "https://server.fmode.cn/api/voc-social/tiktok/app/v3/fetch_video_search_result",
- "headers": {
- "Authorization": "Bearer ${vocToken}",
- "Accept": "application/json"
- }
- },
- "parameters": {
- "type": "object",
- "required": [
- "keyword"
- ],
- "properties": {
- "keyword": {
- "type": "string",
- "description": "搜索关键词,如 'reed diffuser'、'candle warmer'、'aroma diffuser'"
- },
- "count": {
- "type": "integer",
- "description": "返回视频数量,最大 30",
- "default": 10,
- "minimum": 1,
- "maximum": 30
- },
- "cursor": {
- "type": "integer",
- "description": "分页游标,首次请求不传或传 0,后续传上次返回的 cursor 值",
- "default": 0
- }
- }
- },
- "requestTransform": {
- "description": "直接作为 GET 查询参数传递",
- "queryParams": {
- "keyword": "{{keyword}}",
- "count": "{{count}}",
- "cursor": "{{cursor}}"
- }
- },
- "response": {
- "type": "object",
- "description": "视频搜索结果",
- "properties": {
- "aweme_list": {
- "type": "array",
- "description": "视频列表(可能为空,数据也可能在 search_item_list[].aweme_info 中)",
- "items": {
- "type": "object",
- "properties": {
- "aweme_id": {
- "type": "string",
- "description": "视频唯一 ID"
- },
- "desc": {
- "type": "string",
- "description": "视频描述/标题"
- },
- "statistics": {
- "type": "object",
- "properties": {
- "play_count": {
- "type": "integer",
- "description": "播放量"
- },
- "digg_count": {
- "type": "integer",
- "description": "点赞数"
- },
- "comment_count": {
- "type": "integer",
- "description": "评论数"
- },
- "share_count": {
- "type": "integer",
- "description": "分享数"
- }
- }
- },
- "author": {
- "type": "object",
- "properties": {
- "nickname": {
- "type": "string",
- "description": "作者昵称"
- },
- "unique_id": {
- "type": "string",
- "description": "作者用户名"
- },
- "follower_count": {
- "type": "integer",
- "description": "作者粉丝数"
- }
- }
- },
- "cha_list": {
- "type": "array",
- "description": "关联话题/标签列表",
- "items": {
- "type": "object",
- "properties": {
- "cha_name": {
- "type": "string",
- "description": "话题名称"
- },
- "cha_id": {
- "type": "string",
- "description": "话题 ID"
- }
- }
- }
- }
- }
- }
- },
- "search_item_list": {
- "type": "array",
- "description": "备选数据路径(当 aweme_list 为空时从此取 aweme_info)"
- },
- "has_more": {
- "type": "boolean",
- "description": "是否有更多数据"
- },
- "cursor": {
- "type": "integer",
- "description": "下一页游标"
- }
- }
- },
- "notes": "响应数据可能在 aweme_list 或 search_item_list[].aweme_info 中,需做兼容处理。前端已封装 searchVideosV2 方法自动处理两种结构。",
- "usageExamples": [
- {
- "name": "品类 TikTok 播放量统计",
- "input": {
- "keyword": "candle warmer",
- "count": 20,
- "cursor": 0
- },
- "description": "搜索 candle warmer 相关视频,统计品类总播放量和爆款视频列表,用于社媒频道热度报告"
- },
- {
- "name": "竞品品牌内容监控",
- "input": {
- "keyword": "NEST New York",
- "count": 20,
- "cursor": 0
- },
- "description": "搜索竞品品牌 TikTok 视频,了解其内容策略和曝光规模"
- },
- {
- "name": "用户痛点内容发现",
- "input": {
- "keyword": "reed diffuser smells bad",
- "count": 15,
- "cursor": 0
- },
- "description": "搜索用户发布的踩雷/差评视频,发现产品痛点"
- }
- ],
- "workflow": {
- "description": "推荐调用链",
- "steps": [
- "1. tiktok-video-search(keyword) → 获取视频列表,统计总播放量",
- "2. tiktok-video-detail(aweme_id) → 获取单视频完整数据",
- "3. tiktok-video-comments(aweme_id) → 获取用户评论 VOC 分析",
- "4. tiktok-hashtag-detail(ch_id from cha_list) → 获取关联话题播放量详情"
- ]
- },
- "reportMapping": {
- "slides": [
- "TikTok热度排名(Slide6)",
- "社媒聆听(Slide14)"
- ],
- "dataPoints": [
- "品类 TikTok 总播放量",
- "爆款视频列表(按播放量排序)",
- "视频互动率(点赞/播放比)",
- "相关话题标签(cha_list)",
- "活跃 KOL 账号发现"
- ]
- },
- "timeout": 60000,
- "retry": {
- "maxAttempts": 3,
- "delay": 1500,
- "backoffMultiplier": 2
- },
- "tokenConfig": {
- "type": "bearer",
- "configFile": "~/.openclaw/voc-credentials.json",
- "tokenField": "vocToken",
- "resolutionOrder": [
- "configFile"
- ],
- "apigId": "Vo3ROWEvDy",
- "paymentUrlResolution": {
- "description": "动态构建充值URL:在已存在 session token 时查出用户 objectId,拼接到专属充值页面",
- "steps": [
- "1. 从 voc-credentials.json 获取当前 session token",
- "2. 调用 GET https://server.fmode.cn/parse/users/me (Header: X-Parse-Application-Id: ncloudmaster, X-Parse-Session-Token: {token})获取用户 objectId",
- "3. 拼接充值URL: https://app.fmode.cn/dev/apig-pay/?user={objectId}&apigid=Vo3ROWEvDy&fun_id=HOkkX72PMF",
- "4. 将该URL展示给用户,引导扫码支付"
- ],
- "userResolveEndpoint": "https://server.fmode.cn/parse/users/me",
- "userResolveHeaders": {
- "X-Parse-Application-Id": "ncloudmaster",
- "X-Parse-Session-Token": "{vocToken}"
- },
- "paymentBaseUrl": "https://app.fmode.cn/dev/apig-pay/",
- "paymentParams": {
- "user": "{resolvedUserId}",
- "apigid": "Vo3ROWEvDy",
- "fun_id": "HOkkX72PMF"
- },
- "balanceCheckEndpoint": "https://server.fmode.cn/api/apig/getApig"
- },
- "onMissing": {
- "action": "showPaymentQR",
- "qrCodeUrl": "https://app.fmode.cn/dev/apig-pay/?apigid=Vo3ROWEvDy&fun_id=HOkkX72PMF",
- "title": "扫码开通 VOC-AI 数据服务",
- "message": "此 Skill 需要有效的 API Token。请先打开充值页面完成登录和充值;当用户提供 session token 后,请由 OpenClaw 运行 node scripts/tools/set-voc-token.js <session-token> 写入 ~/.openclaw/voc-credentials.json 的 vocToken 字段,再重试当前 Skill。",
- "tokenSetupCommandTemplate": "node scripts/tools/set-voc-token.js {sessionToken}",
- "tokenSetupInstructions": "当用户完成登录和充值后,如果用户把 session token 发给你,请直接运行 node scripts/tools/set-voc-token.js <session-token> 写入 ~/.openclaw/voc-credentials.json,然后重试当前 Skill。"
- },
- "onBalanceInsufficient": {
- "action": "resolveUserThenShowPayment",
- "title": "VOC-AI Token 余额不足,请扫码充值",
- "message": "当前 Token 余额不足,我将为你生成专属充值链接,扫码支付后即可继续使用。"
- }
- },
- "errorHandling": {
- "balanceInsufficient": {
- "conditions": [
- {
- "responseField": "code",
- "operator": "in",
- "value": [
- -2,
- -3,
- -10,
- 402,
- 429
- ]
- },
- {
- "responseField": "msg",
- "operator": "contains",
- "value": [
- "余额不足",
- "insufficient",
- "balance",
- "quota",
- "没有开通",
- "权限或余额"
- ]
- },
- {
- "responseField": "mess",
- "operator": "contains",
- "value": [
- "余额不足",
- "insufficient",
- "balance",
- "quota",
- "没有开通",
- "权限或余额"
- ]
- },
- {
- "responseField": "message",
- "operator": "contains",
- "value": [
- "余额不足",
- "insufficient",
- "balance",
- "没有开通",
- "权限或余额"
- ]
- }
- ],
- "matchMode": "any",
- "trigger": "tokenConfig.onBalanceInsufficient"
- },
- "unauthorized": {
- "conditions": [
- {
- "responseField": "code",
- "operator": "in",
- "value": [
- 401,
- 403
- ]
- },
- {
- "responseField": "msg",
- "operator": "contains",
- "value": [
- "unauthorized",
- "token",
- "invalid",
- "auth"
- ]
- }
- ],
- "matchMode": "any",
- "trigger": "tokenConfig.onMissing"
- }
- }
- }
|