api-config.json 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. {
  2. "name": "instagram-user-posts",
  3. "displayName": "Instagram 用户帖子列表",
  4. "description": "获取指定 Instagram 用户发布的帖子列表,包括点赞数、评论数、帖子文案等。适用于竞品品牌 IG 内容策略分析、KOL 帖子互动表现评估、品牌运营频率分析。",
  5. "category": "social-media",
  6. "version": "1.3.0",
  7. "endpoint": {
  8. "method": "GET",
  9. "url": "https://server.fmode.cn/api/voc-social/instagram/v1/fetch_user_posts_v2",
  10. "headers": {
  11. "Authorization": "Bearer r:a5a19ea9868043b15d9b10423234ca43",
  12. "Accept": "application/json"
  13. }
  14. },
  15. "parameters": {
  16. "type": "object",
  17. "required": [
  18. "user_id"
  19. ],
  20. "properties": {
  21. "user_id": {
  22. "type": "string",
  23. "description": "Instagram 用户数字 ID(pk),需先通过 instagram_user_info 或 instagram_search 接口获取"
  24. },
  25. "count": {
  26. "type": "integer",
  27. "description": "每页帖子数量",
  28. "default": 12,
  29. "maximum": 50
  30. },
  31. "end_cursor": {
  32. "type": "string",
  33. "description": "分页游标,首次不传,后续传上次返回的 end_cursor"
  34. }
  35. }
  36. },
  37. "requestTransform": {
  38. "queryParams": {
  39. "user_id": "{{user_id}}",
  40. "count": "{{count}}",
  41. "end_cursor": "{{end_cursor}}"
  42. }
  43. },
  44. "response": {
  45. "type": "object",
  46. "description": "帖子列表",
  47. "properties": {
  48. "items": {
  49. "type": "array",
  50. "description": "帖子数组",
  51. "items": {
  52. "type": "object",
  53. "properties": {
  54. "id": {
  55. "type": "string",
  56. "description": "帖子 ID"
  57. },
  58. "code": {
  59. "type": "string",
  60. "description": "帖子短码(URL 用)"
  61. },
  62. "caption": {
  63. "type": "object",
  64. "properties": {
  65. "text": {
  66. "type": "string",
  67. "description": "帖子文案"
  68. }
  69. }
  70. },
  71. "like_count": {
  72. "type": "integer",
  73. "description": "点赞数"
  74. },
  75. "comment_count": {
  76. "type": "integer",
  77. "description": "评论数"
  78. },
  79. "taken_at": {
  80. "type": "integer",
  81. "description": "发布时间戳"
  82. },
  83. "media_type": {
  84. "type": "integer",
  85. "description": "媒体类型: 1=图片, 2=视频, 8=轮播"
  86. },
  87. "image_versions2": {
  88. "type": "object",
  89. "description": "图片版本列表"
  90. },
  91. "video_versions": {
  92. "type": "array",
  93. "description": "视频版本列表(仅视频帖子)"
  94. },
  95. "view_count": {
  96. "type": "integer",
  97. "description": "视频观看次数(仅视频帖子)"
  98. }
  99. }
  100. }
  101. },
  102. "has_more": {
  103. "type": "boolean",
  104. "description": "是否有更多帖子"
  105. },
  106. "end_cursor": {
  107. "type": "string",
  108. "description": "下一页游标"
  109. }
  110. }
  111. },
  112. "notes": "user_id 需先通过 instagram-user-info 接口获取 pk 字段。互动率公式:(like_count + comment_count) / follower_count。",
  113. "relatedSkills": [
  114. "instagram-user-info",
  115. "instagram-search"
  116. ],
  117. "usageExamples": [
  118. {
  119. "name": "竞品品牌 IG 内容策略分析",
  120. "input": {
  121. "user_id": "12345678",
  122. "count": 12
  123. },
  124. "description": "获取竞品品牌最近 12 条帖子,分析发帖频率、内容主题、帖子互动率"
  125. },
  126. {
  127. "name": "KOL 帖子评估",
  128. "input": {
  129. "user_id": "达人 pk",
  130. "count": 20
  131. },
  132. "description": "获取达人近期 20 条帖子,计算帖子平均互动率(点赞+评论)/粉丝数"
  133. }
  134. ],
  135. "workflow": {
  136. "description": "推荐调用链",
  137. "steps": [
  138. "上游: instagram-search(query, select='users') → 搜索品牌/KOL → 取 username",
  139. "上游: instagram-user-info(username) → 获取 pk 字段和粉丝数",
  140. "本步: instagram-user-posts(user_id=pk) → 获取帖子列表",
  141. "分析: 计算互动率 = (like_count+comment_count)/follower_count"
  142. ]
  143. },
  144. "reportMapping": {
  145. "slides": [
  146. "竞品对标(Slide4)",
  147. "社媒聆听(Slide14)"
  148. ],
  149. "dataPoints": [
  150. "帖子平均互动率对比",
  151. "品牌发帖频率和内容规律",
  152. "内容类型分布(1=图片 2=视频 8=轮播)",
  153. "品牌视觉风格分析"
  154. ]
  155. },
  156. "timeout": 60000,
  157. "retry": {
  158. "maxAttempts": 3,
  159. "delay": 1500,
  160. "backoffMultiplier": 2
  161. }
  162. }