{ "name": "instagram-user-posts", "displayName": "Instagram 用户帖子列表", "description": "获取指定 Instagram 用户发布的帖子列表,包括点赞数、评论数、帖子文案等。适用于竞品品牌 IG 内容策略分析、KOL 帖子互动表现评估、品牌运营频率分析。", "category": "social-media", "version": "1.3.0", "endpoint": { "method": "GET", "url": "https://server.fmode.cn/api/voc-social/instagram/v1/fetch_user_posts_v2", "headers": { "Authorization": "Bearer ${vocToken}", "Accept": "application/json" } }, "parameters": { "type": "object", "required": [ "user_id" ], "properties": { "user_id": { "type": "string", "description": "Instagram 用户数字 ID(pk),需先通过 instagram_user_info 或 instagram_search 接口获取" }, "count": { "type": "integer", "description": "每页帖子数量", "default": 12, "maximum": 50 }, "end_cursor": { "type": "string", "description": "分页游标,首次不传,后续传上次返回的 end_cursor" } } }, "requestTransform": { "queryParams": { "user_id": "{{user_id}}", "count": "{{count}}", "end_cursor": "{{end_cursor}}" } }, "response": { "type": "object", "description": "帖子列表", "properties": { "items": { "type": "array", "description": "帖子数组", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "帖子 ID" }, "code": { "type": "string", "description": "帖子短码(URL 用)" }, "caption": { "type": "object", "properties": { "text": { "type": "string", "description": "帖子文案" } } }, "like_count": { "type": "integer", "description": "点赞数" }, "comment_count": { "type": "integer", "description": "评论数" }, "taken_at": { "type": "integer", "description": "发布时间戳" }, "media_type": { "type": "integer", "description": "媒体类型: 1=图片, 2=视频, 8=轮播" }, "image_versions2": { "type": "object", "description": "图片版本列表" }, "video_versions": { "type": "array", "description": "视频版本列表(仅视频帖子)" }, "view_count": { "type": "integer", "description": "视频观看次数(仅视频帖子)" } } } }, "has_more": { "type": "boolean", "description": "是否有更多帖子" }, "end_cursor": { "type": "string", "description": "下一页游标" } } }, "notes": "user_id 需先通过 instagram-user-info 接口获取 pk 字段。互动率公式:(like_count + comment_count) / follower_count。", "relatedSkills": [ "instagram-user-info", "instagram-search" ], "usageExamples": [ { "name": "竞品品牌 IG 内容策略分析", "input": { "user_id": "12345678", "count": 12 }, "description": "获取竞品品牌最近 12 条帖子,分析发帖频率、内容主题、帖子互动率" }, { "name": "KOL 帖子评估", "input": { "user_id": "达人 pk", "count": 20 }, "description": "获取达人近期 20 条帖子,计算帖子平均互动率(点赞+评论)/粉丝数" } ], "workflow": { "description": "推荐调用链", "steps": [ "上游: instagram-search(query, select='users') → 搜索品牌/KOL → 取 username", "上游: instagram-user-info(username) → 获取 pk 字段和粉丝数", "本步: instagram-user-posts(user_id=pk) → 获取帖子列表", "分析: 计算互动率 = (like_count+comment_count)/follower_count" ] }, "reportMapping": { "slides": [ "竞品对标(Slide4)", "社媒聆听(Slide14)" ], "dataPoints": [ "帖子平均互动率对比", "品牌发帖频率和内容规律", "内容类型分布(1=图片 2=视频 8=轮播)", "品牌视觉风格分析" ] }, "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 写入 ~/.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" } } }