Blog
Ten sample comments or the full list, and what include_comments on a post lookup actually buys
include_comments adds one credit for at most ten comments. A page of the comments list costs one credit for up to a hundred. Here is when each is right.
No, include_comments=true is not the cheap way to get a post’s commenters. It adds one credit to
GET /v1/posts/details and returns at most ten comments. A page of GET /v1/posts/comments also
costs one credit and returns up to a hundred. The sample is worth it only when you want the post
itself and a glimpse of who is talking, in a single round trip.
What each call returns
GET /v1/posts/details costs one credit for the post: text, media, author, counts and the reaction
breakdown. Two flags each add one credit:
curl -s -G "https://api.triguna.ai/v1/posts/details" \
--data-urlencode "post=urn:li:activity:7376356221991178240" \
--data-urlencode "include_comments=true" \
-H "ApiKey: $TRIGUNA_KEY" \
| jq '{included, comments: (.comments | length)}'
include_comments=true adds up to ten comments, each with the commenter’s profile, and
include_reactions=true does the same for reactions. Ten is a fixed slice, not a page size, so
there is no way to ask for more through this call. Both lists come back as [] unless you ask, and
included says which ones you asked for.
GET /v1/posts/comments pages through everyone who commented, up to 100 per page, one credit per
page whatever its size. Each item is exactly the comment object posts/details returns, so one
parser reads both.
The cost side by side
| You want | Calls | Credits |
|---|---|---|
| The post, plus up to ten commenters | posts/details with include_comments | 2 |
| The post, plus up to a hundred commenters | posts/details, then one page of posts/comments | 2 |
| Commenters only, when you already hold the activity urn | one page of posts/comments | 1 |
| The post, ten commenters and ten reactors | posts/details with both flags | 3 |
The first two rows cost the same. The difference is one round trip against up to ten times the commenters.
When the sample is the right call
- You are showing a post to a person. A preview card or a research note needs the post and a few names, and one call is simpler than two.
- You are triaging many posts. Ten commenters with headlines can be enough to decide whether a post’s audience is worth walking in full.
- You do not hold the post’s urns yet.
posts/detailsis the call that returns bothactivity_urnandshare_urn, so you are making it anyway.
When to walk the list instead
- You want everyone. Ten is a sample, not a limit, and the reference does not say which ten you get, so do not treat them as the first, the latest or the most relevant.
- You already hold the activity urn. Skip
posts/detailsentirely and spend one credit on a page of up to a hundred. - The post has many comments. Walk the pages, and stop only on an empty page, never on a short one.
FAQ
Does include_comments return the most recent ten comments? The reference documents ten as a fixed slice and does not say how they are chosen. Build nothing that depends on which ten they are.
Is include_reactions the same trade?
Yes. Plus one credit for up to ten reactions, against one credit for a page of up to a hundred from
posts/reactions, keyed by the share urn.
What if the post does not exist?
posts/details answers 404 and charges one credit, like any answered lookup. A malformed post
value is a free 400.
Do the sample commenters carry the same profile fields as the list?
Yes. Each comment is the same object in both calls, with the commenter’s name, headline and
entity_urn, which the Person API accepts when you need a full profile.
Next
- Who liked and commented on a LinkedIn post: paging the full lists, and what they cost.
- Reading one person’s LinkedIn activity: where post urns come from, and why the feed leaves one out.
- Handling partial records: parsing comment and profile objects where any value may be null.
- Pricing: what each call and each flag costs. Sign up for fifty free credits at app.triguna.ai/signup.