GET/api/v4/social/posts/{postId}/insights

获取帖子的洞察数据和评论

返回一篇已发布帖子在一个已连接渠道上的平台原始互动数据载荷和评论。

需要 API 密钥。请求头格式和密钥轮换请参阅身份验证。

参数

路径

名称类型必填描述
postIdstring必填Post UUID, the `socialPostId` returned by POST /social/posts.

查询

名称类型必填描述默认值
socialConnectedChannelIdstring必填UUID of the connection to read insights for, the `id` of a row from the brand's connections list. Insights are per channel, so this is required even when the post targeted one platform. Note the name: this endpoint takes `socialConnectedChannelId`, while disconnect takes `socialProfileConnectedChannelId` for the same ID.—

响应

200The platform's engagement payload and comments. Both fields are JSON strings whose keys are set by the platform, not by Listings API: parse them before reading.
Response
{  "data": {    "getPostInsightsAndCommentsForSocialChannel": {      "insights": "{\"impressions\": 4820, \"reach\": 3915, \"likes\": 212, \"comments\": 18, \"saved\": 44, \"shares\": 9, \"profile_visits\": 61}",      "comments": "[{\"id\": \"17912345678901234\", \"username\": \"marta.builds\", \"text\": \"That oak finish is beautiful. Do you ship?\", \"like_count\": 3, \"timestamp\": \"2026-10-02T15:12:44+0000\"}, {\"id\": \"17912345678905678\", \"username\": \"eastsidehome\", \"text\": \"Stopping by Saturday!\", \"like_count\": 0, \"timestamp\": \"2026-10-02T18:40:02+0000\"}]"    }  }}
401Unauthenticated, missing or invalid API key.
404No post with that ID on this account, or the connection does not belong to the post's brand (`SY95052`).

返回平台报告的某个渠道上一篇已发布帖子的相关数据:该帖子的互动指标和收到的评论。

使用场景:单篇帖子的互动面板。 当客户在您的界面中打开一篇已发布的帖子时,调用 GET /social/posts/{postId} 获取渠道列表,然后针对每个渠道,使用该渠道的 id 调用此端点一次。解析 insights,展示您能识别的指标,并忽略其余指标,这样平台新增字段时就不会导致您的页面出错。

使用场景:找出需要回复的评论。 针对最近发布的帖子轮询此端点,并将解析后的 comments 数组中的新条目转入您自己的收件箱。请注意,此端点为只读:回复评论需在平台上完成,而不能通过 Listings API 完成。

注意事项。

  • socialConnectedChannelId 是必填项,其值为品牌的连接中相应连接的 id,而非平台的 referenceId。洞察数据始终限定于一个渠道,因为这些数据来自该平台的 API。
  • 渠道必须与帖子属于同一品牌。将帖子与其他品牌的连接配对会返回 SY95052。
  • 只有已发布的帖子才有洞察数据。 仍处于 SCHEDULED 状态或在此渠道上发布失败的帖子会返回空数据载荷,而非错误,因此请先检查帖子的 connectedChannels[].status,再得出结论。
  • 指标的更新速度取决于平台,对大多数平台而言,发布后会有几分钟到几小时的延迟。请定时轮询,而不要期望在 connectedChannels[].status 变为 SUCCESS 后立即获得数据。
  • 评论数量上限取决于平台单页返回的数量;此端点不会继续获取后续分页。
Request
curl -X GET 'https://listingsapi.com/api/v4/social/posts/<postId>/insights?socialConnectedChannelId=<socialConnectedChannelId>' \  -H "Authorization: API $LISTINGSAPI_KEY"