Skip to Content

Post Comments

A post's first comments, about 10.

GET
/v1/linkedin/post/comments

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from the dashboard: Authorization: Bearer sapi_….

Query Parameters

url?string

The post's link (https://www.linkedin.com/posts/…, or a /feed/update/urn:li:… one).

id?string

The post's id: its activity's number (7531543853288456193), instead of url.

maxAge?integer

How old a cached answer may be, in seconds; 0 always fetches. Default and most: the endpoint's cache lifetime.

Formatint64
Range0 <= value

Response Body

The answer.

application/json
  1. response

A page of a list, as every list endpoint answers: { "data": [...], "pagination": … }.

data*array<>
pagination*
Example Request
import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const { data, pagination } = await client.linkedin.postComments({ url: "https://www.linkedin.com/posts/williamhgates_how-ai-is-helping-kenyan-farmers-bill-gates-activity-7531543853288456193-Ku5w" });
Example Response
{  "data": [    {      "id": "7531591949900939264",      "postId": "7531543853288456193",      "parentId": null,      "text": "The real breakthrough here isn't just the AI model—it’s the zero-friction distribution. Turning complex weather forecasts into actionable text messages on the phones farmers already use removes the biggest barrier to adoption: complexity. Great systems design isn't about forcing users to learn new interfaces; it's about delivering real intelligence seamlessly into their existing habits. Brilliant…",      "createdAt": "2026-11-26T05:37:31.068Z",      "author": {        "id": "chandrashaker-solanki-7806b8235",        "username": "chandrashaker-solanki-7806b8235",        "displayName": "Chandrashaker Solanki",        "avatarUrl": "https://media.licdn.com/dms/image/v2/D5603AQEP_PTsGTQVjg/profile-displayphoto-scale_400_400/B56Z5S7TEqHYAg-/0/1779507737356?e=2147483647&v=beta&t=e0BB92nEgWp-gDulL9zmbcl7KbYZc_2oLEViRVF_PgI",        "verified": false,        "url": "https://www.linkedin.com/in/chandrashaker-solanki-7806b8235"      },      "likes": 24,      "replies": null,      "ext": {        "authorHeadline": null,        "edited": false      }    },    {      "id": "7531709678364336128",      "postId": "7531543853288456193",      "parentId": null,      "text": "Text messages are the underrated part here. The model is the expensive bit, but distribution decides whether it reaches anyone, and SMS on a phone people already own has no adoption curve. Curious how the economics work once philanthropy steps back: do farmers, insurers or buyers end up paying for the forecast?",      "createdAt": "2026-11-26T13:25:19.721Z",      "author": {        "id": "luca-rizzello-5597093b6",        "username": "luca-rizzello-5597093b6",        "displayName": "Luca Rizzello",        "avatarUrl": "https://media.licdn.com/dms/image/v2/D5603AQHzGzhdd4Xs7w/profile-displayphoto-scale_400_400/B56aHnGSveIQAg-/0/1794878552900?e=2147483647&v=beta&t=Iq7GtQjzMY4DmndXuped7rM6J8CSN8CONLRuag3SyvY",        "verified": false,        "url": "https://www.linkedin.com/in/luca-rizzello-5597093b6"      },      "likes": 3,      "replies": null,      "ext": {        "authorHeadline": null,        "edited": false      }    }  ],  "pagination": {    "nextCursor": null,    "hasMore": false  }}