Skip to main content
POST
Scrape post comments

Authorizations

Authorization
string
header
required

Access token issued by gtm.service.id. Its access_identity claim carries team_sid, actor_sid and actor_type, and that team scope is authoritative.

Team-SID
string
header
required

Team scope for tokens that do not carry one. Ignored when the token already names a team.

Body

application/json

Request body of scrape_linkedin_get_post_comments.

post
string
required

The post, named any way you have it. LinkedIn files a post's comments under its social thread (the ugcPost or groupPost urn for those posts, the activity urn for a share post) and a wrong key fails quietly: the activity urn of a ugcPost post reads an EMPTY list newest-first and a first page with total 0 and no next cursor by relevance (live 2026-09-16), a share urn reads empty. So a urn:li:ugcPost:<id> or urn:li:groupPost:<group>-<post>, or a link carrying one (a -ugcPost-<id>- share link), is the thread and reads in one wire page; an urn:li:activity:<id> (bare, in a feed permalink or in a /posts/<slug>-activity-<id>-<hash> share link) or a urn:li:share:<id> costs one post read first (cached 7 days, so only the first call on a post pays it). result.post.post_ln_id is the urn the list was read by: page on with it to skip the read. A linkedin.com link with no id in it (a bare slug URL) adds one more page load to find the urn. An lnkd.in shortlink (the form Copy link to post mints) is expanded server-side and its slug id lifted locally, one wire page like any id-carrying URL; one that expands to a non-LinkedIn target is refused 422 post_not_resolvable, and so is a post the read returns null for (deleted, or not visible to the executing account). The post does NOT need to be tracked or owned by you.

Maximum string length: 512
linkedin_account_sid
string | null

Executor account (ln_ac_...). OPTIONAL everywhere on this surface. Given: the call runs on that account ONLY; a saturated or held scraping bucket refuses 429 bucket_saturated (with retry_after). Omitted: the service auto-picks one of your connected accounts with remaining capacity (SN verbs pick only Sales-Navigator seats; 422 no_connected_accounts when none is ready, 429 when all are at capacity).

Required string length: 18
Pattern: ^ln_ac_
idempotency_key
string | null

Ledger replay guard: a repeat call with the same (team, key) returns the stored outcome; no re-execution. Recommended on every search run. The KEY ALONE decides: the probe does not compare arguments, so reusing one key after changing the arguments hands back the FIRST result. On the twelve search verbs that matters twice over, because switching a call from filters to url (or back) under one key replays instead of running the new search. New search, new key.

Maximum string length: 128
page_size
integer

Default 50; one wire page per call.

Required range: 1 <= x <= 100
sort_order
enum<string>

Order of the comment list. RELEVANCE is LinkedIn's own default and what you get when this is omitted; REVERSE_CHRONOLOGICAL is "Most recent" in the UI, CHRONOLOGICAL walks oldest-first. Polling a watched post for new comments wants REVERSE_CHRONOLOGICAL, because under relevance a new comment is not guaranteed to be on page 1. A cursor belongs to the order it was issued under - do not resume a walk with a different sort_order.

Available options:
RELEVANCE,
CHRONOLOGICAL,
REVERSE_CHRONOLOGICAL
cursor
string | null

Opaque resume token from paging.next_cursor; null = first page.

Response

action success envelope.

success
enum<boolean>
required
Available options:
true
operation
enum<string>
required
Available options:
action
action
string
required

kebab-case verb; matches the route segment.

item
any
required
result
object
required
meta
object
required
pacing
object