LinkedIn-Web-V2-API

获取帖子评论/Get post comments

Changed on

⚠️ 注意 / Note

本接口由有限的资源池提供服务,在高并发或资源紧张时可能间歇性返回 400 或其他错误。 此类失败通常是暂时性的,重试即可成功。建议客户端实现自动重试机制,推荐 retry = 3。

This endpoint is served from a limited resource pool and may intermittently return 400 or other errors under load. Such failures are typically transient and succeed on retry. We recommend implementing automatic retries with retry = 3.

[中文]

用途:

  • 按帖子 urn 获取该帖子的评论列表。

参数:

  • urn: 帖子 activity urn(帖子链接 .../urn:li:activity:<urn>/ 里的数字部分)。
  • sort_by: Most relevant(默认)或 Most recent。
  • page: 页码,从 1 开始。
  • pagination_token: 翻页时传上一次响应返回的 token。
  • share_urn: 分享类帖子可另传 share urn。

返回:

  • data: 评论列表(评论人、正文、时间、固定楼层、回复等); pagination_token: 下一页令牌;total: 本次返回条数。

[English]

Purpose:

  • Fetch comments of a post by its activity urn.

Parameters:

  • urn: Post activity urn (the numeric part of .../urn:li:activity:<urn>/).
  • sort_by: Most relevant (default) or Most recent.
  • page: Page number, starting at 1.
  • pagination_token: Token returned by the previous response.
  • share_urn: Optional share urn for shared posts.

Returns:

  • data: list of comments (commenter, text, time, pinned flag, replies, …); pagination_token: token for the next page; total: number of items returned.

[示例/Example]

urn = "7267273010393358336", sort_by = "Most relevant", page = 1

get/api/v1/linkedin/web_v2/get_post_comments

Request

  • Base URL
    https://api.tikhub.io (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Query parameters

urnstring required

帖子 activity urn/Post activity urn

sort_bystring nullable

Most relevant(默认)| Most recent

pageinteger nullable

页码,从 1 开始/Page number, starts at 1

pagination_tokenstring nullable

上一次响应返回的翻页令牌/Pagination token

share_urnstring nullable

分享类帖子的 share urn(可选)/Share urn (optional)

Response

Successful Response

codeinteger

HTTP status code | HTTP状态码

request_idstring nullable

Unique request identifier | 唯一请求标识符

messagestring

Response message (EN-US) | 响应消息 (English)

message_zhstring

Response message (ZH-CN) | 响应消息 (中文)

supportstring

Support message | 支持消息

timestring

The time the response was generated | 生成响应的时间

time_stampinteger

The timestamp the response was generated | 生成响应的时间戳

time_zonestring

The timezone of the response time | 响应时间的时区

docsstring nullable

Link to the API Swagger documentation for this endpoint | 此端点的 API Swagger 文档链接

cache_messagestring nullable

Cache message (EN-US) | 缓存消息 (English)

cache_message_zhstring nullable

Cache message (ZH-CN) | 缓存消息 (中文)

cache_urlstring nullable

The URL to access the cached result | 访问缓存结果的 URL

routerstring

The endpoint that generated this response | 生成此响应的端点

paramsunknown
dataunknown

Changes