| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188 |
- {
- "name": "instagram-search",
- "displayName": "Instagram 搜索",
- "description": "按关键词搜索 Instagram 用户账号或话颒标签,返回匹配的用户列表或标签列表。适用于竞品品牌 Instagram 账号定位、KOL 初筛、品类 话颒标签发现。",
- "category": "social-media",
- "version": "1.3.0",
- "endpoint": {
- "method": "GET",
- "url": "https://server.fmode.cn/api/voc-social/instagram/v1/fetch_search",
- "headers": {
- "Authorization": "Bearer r:a5a19ea9868043b15d9b10423234ca43",
- "Accept": "application/json"
- }
- },
- "parameters": {
- "type": "object",
- "required": [
- "query"
- ],
- "properties": {
- "query": {
- "type": "string",
- "description": "搜索关键词,如品牌名 'NEST New York'、'Paddywax'、'SpaRoom'"
- },
- "select": {
- "type": "string",
- "description": "搜索类型: 'users'=搜索用户, 'hashtags'=搜索标签",
- "default": "users",
- "enum": [
- "users",
- "hashtags"
- ]
- }
- }
- },
- "requestTransform": {
- "queryParams": {
- "query": "{{query}}",
- "select": "{{select}}"
- }
- },
- "response": {
- "type": "object",
- "description": "搜索结果",
- "properties": {
- "users": {
- "type": "array",
- "description": "匹配的用户列表",
- "items": {
- "type": "object",
- "properties": {
- "user": {
- "type": "object",
- "properties": {
- "pk": {
- "type": "string",
- "description": "用户数字 ID(用于获取帖子)"
- },
- "username": {
- "type": "string",
- "description": "用户名"
- },
- "full_name": {
- "type": "string",
- "description": "显示名称"
- },
- "is_verified": {
- "type": "boolean",
- "description": "是否认证"
- },
- "profile_pic_url": {
- "type": "string",
- "description": "头像 URL"
- },
- "follower_count": {
- "type": "integer",
- "description": "粉丝数"
- },
- "is_private": {
- "type": "boolean",
- "description": "是否私密账号"
- }
- }
- }
- }
- }
- }
- }
- },
- "notes": "搜索结果中的 user.pk 可用于 instagram_user_posts 接口获取帖子列表。username 可用于 instagram_user_info 获取详细资料。",
- "usageExamples": [
- {
- "name": "竞品品牌 IG 账号定位",
- "input": {
- "query": "NEST New York",
- "select": "users"
- },
- "description": "搜索 NEST New York 的 Instagram 品牌账号,获取 username 和 pk 用于后续分析"
- },
- {
- "name": "品类 KOL 搜索",
- "input": {
- "query": "candle maker",
- "select": "users"
- },
- "description": "搜索 candle maker 相关 Instagram KOL,初筛候选达人列表"
- },
- {
- "name": "品类话颒标签搜索",
- "input": {
- "query": "aromatherapy",
- "select": "hashtags"
- },
- "description": "搜索 aromatherapy 相关 IG 标签,发现品类相关话颒"
- }
- ],
- "workflow": {
- "description": "推荐调用链",
- "steps": [
- "本步: instagram-search(query, select='users') → 搜索用户 → 得到 username、pk、follower_count",
- "下游: instagram-user-info(username) → 获取账号完整数据(帖子数/简介等)",
- "下游: instagram-user-posts(user_id=pk) → 获取用户帖子列表"
- ]
- },
- "reportMapping": {
- "slides": [
- "竞品对标(Slide4)",
- "知识中心(Slide11)"
- ],
- "dataPoints": [
- "竞品品牌 IG 账号发现",
- "品类 KOL 候选列表",
- "品类话颒标签热度分布"
- ]
- },
- "timeout": 60000,
- "retry": {
- "maxAttempts": 3,
- "delay": 1500,
- "backoffMultiplier": 2
- },
- "tokenConfig": {
- "type": "bearer",
- "configFile": "~/.openclaw/voc-credentials.json",
- "tokenField": "vocToken",
- "currentToken": "r:858b3ee92314d5447d1fc3cdc10462d7",
- "resolutionOrder": ["configFile", "currentToken"],
- "onMissing": {
- "action": "showPaymentQR",
- "qrCodeUrl": "https://pwa.fmode.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
- "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
- "pollingIntervalMs": 3000,
- "pollingTimeoutMs": 300000,
- "onPaymentSuccess": "retrySkillWithNewToken",
- "title": "扫码开通 VOC-AI 数据服务",
- "message": "请扫描下方二维码完成支付,支付成功后将自动获取 Token 并继续执行。"
- },
- "onBalanceInsufficient": {
- "action": "showPaymentQR",
- "qrCodeUrl": "https://pwa.fmode.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
- "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
- "pollingIntervalMs": 3000,
- "pollingTimeoutMs": 300000,
- "onPaymentSuccess": "retrySkillWithNewToken",
- "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": "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"
- }
- }
- }
|