{ "name": "keyword-search", "displayName": "Amazon 关键词查询", "description": "查询 Amazon 关键词的搜索量、搜索趋势、竞争度等数据。用于广告关键词推荐、趋势雷达、飙升卖点词分析。", "category": "voc", "version": "1.3.0", "endpoint": { "method": "POST", "url": "https://server.fmode.cn/api/voc-ecom/forward", "headers": { "Content-Type": "application/json", "Authorization": "Bearer {{vocToken}}" } }, "parameters": { "type": "object", "required": [ "Keyword" ], "properties": { "Keyword": { "type": "string", "description": "要查询的关键词,如 'reed diffuser'、'natural reed diffuser'、'candle warmer lamp aesthetic'" }, "domain": { "type": "integer", "description": "Amazon 站点 ID: 1=amazon.com", "default": 1 } } }, "requestTransform": { "template": { "path": "/api/KeywordQuery", "method": "POST", "query": { "domain": "{{domain}}" }, "body": { "Keyword": "{{Keyword}}" } } }, "response": { "type": "object", "description": "关键词查询结果", "properties": { "SearchVolume": { "type": "integer", "description": "月搜索量" }, "SearchVolumeGrowth": { "type": "number", "description": "搜索量增长率 (%)" }, "CompetitionLevel": { "type": "string", "description": "竞争度: 低/中/高/极高" }, "CPC": { "type": "number", "description": "建议广告出价 (美元)" }, "ConversionRate": { "type": "number", "description": "转化率 (%)" }, "RelatedKeywords": { "type": "array", "description": "相关关键词列表" } } }, "usageExamples": [ { "name": "查询关键词搜索量", "input": { "Keyword": "natural reed diffuser", "domain": 1 }, "description": "查询 'natural reed diffuser' 在美国站的搜索量和竞争度" } ], "reportMapping": { "slides": [ "趋势雷达(Slide12)", "广告关键词引擎(Slide15)" ], "dataPoints": [ "关键词搜索量", "增长率", "竞争度", "建议出价", "VOC匹配度" ] }, "timeout": 60000, "retry": { "maxAttempts": 3, "delay": 1000, "backoffMultiplier": 2 }, "tokenConfig": { "type": "bearer", "configFile": "~/.openclaw/voc-credentials.json", "tokenField": "vocToken", "resolutionOrder": [ "configFile" ], "apigId": "7HwdQZk55B", "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=7HwdQZk55B&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": "7HwdQZk55B", "fun_id": "HOkkX72PMF" }, "balanceCheckEndpoint": "https://server.fmode.cn/api/apig/getApig" }, "onMissing": { "action": "showPaymentQR", "qrCodeUrl": "https://app.fmode.cn/dev/apig-pay/?apigid=7HwdQZk55B&fun_id=HOkkX72PMF", "title": "扫码开通 VOC-AI 数据服务", "message": "此 Skill 需要有效的 API Token。请先打开充值页面完成登录和充值;当用户提供 session token 后,请由 OpenClaw 运行 node scripts/tools/set-voc-token.js 写入 ~/.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 写入 ~/.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" } } }