api-config.json 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. {
  2. "name": "instagram-user-posts",
  3. "displayName": "Instagram 用户帖子列表",
  4. "description": "获取指定 Instagram 用户发布的帖子列表,包括图片、点赞数、评论数等。用于竞品内容策略分析、发帖频率和互动率评估。",
  5. "category": "social-media",
  6. "version": "1.0.0",
  7. "endpoint": {
  8. "method": "GET",
  9. "url": "https://server.fmode.cn/thapi/v1/instagram/v1/fetch_user_posts_v2",
  10. "headers": {
  11. "Authorization": "Bearer tKIbAsEM8X+GmE2vHqGW7D/ICwK1Q5V4viKFrWiPB6HholGdLFqZJmmyNw==",
  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": "获取品牌最近帖子",
  120. "input": {
  121. "user_id": "12345678",
  122. "count": 12
  123. },
  124. "description": "获取品牌最近 12 条帖子的互动数据,分析内容策略"
  125. }
  126. ],
  127. "reportMapping": {
  128. "slides": [
  129. "竞品对标(Slide4)",
  130. "社媒聆听(Slide14)"
  131. ],
  132. "dataPoints": [
  133. "帖子互动率",
  134. "发帖频率",
  135. "内容类型分布",
  136. "品牌视觉风格"
  137. ]
  138. },
  139. "timeout": 15000,
  140. "retry": {
  141. "maxAttempts": 3,
  142. "delay": 1500,
  143. "backoffMultiplier": 2
  144. }
  145. }