List a post's comments
direct.lempile.com/api/v1/posts/{post_id}/commentsA post's comments, or with comment_id that comment's replies: newest first by default (MOST_RECENT, as Unipile), or in LinkedIn's relevance order (MOST_RELEVANT; replies oldest first, as LinkedIn's apps read them).
Authentication
X-API-KEY header·A Lempile Direct key, one per workspace, made in Lempile's dashboard.Path parameters
post_idstringrequiredThe post: its id (digits),
urn:li:activity:…(or augcPost/shareurn) or its URL.
Query parameters
account_idstringrequiredThe account that reads: a Lempile LinkedIn account id (
GET /accountslists them).limitintegerItems per page: 1 to 100 (default 10).
Default10≥ 1 · ≤ 100cursorstringA cursor a previous page gave.
sort_bystringMOST_RECENT(the default, as Unipile's): newest first, page after page.MOST_RELEVANT: LinkedIn's relevance order (a comment's replies oldest first).One ofMOST_RELEVANTMOST_RECENTDefaultMOST_RECENTcomment_idstringList this comment's replies instead (its id, digits).
Responses
200OK
›
application/json
objectstringrequiredAlwaysCommentListitemsarray of Commentrequired›Show fieldsHide fields
objectstringrequiredAlwaysCommentidstringrequiredThe comment's id (digits): what
comment_idtakes.post_idstringrequiredpost_urnstringrequiredauthorstring | nullrequiredauthor_detailsCommentAuthorrequiredUnipile's comment author: the name is the comment's
author; no public identifier.›Show fieldsHide fields
idstring | nullrequiredheadlinestring | nullrequiredprofile_urlstring | nullrequiredprofile_picture_urlstring | nullrequirednetwork_distancestringrequiredThe author's degree as Unipile answers it on comments: LinkedIn's own word for the account itself and its 1st and 2nd degree (
DISTANCE_2, notSECOND_DEGREE),DISTANCE_3for anyone further, out of network, or a page.One ofSELFDISTANCE_1DISTANCE_2DISTANCE_3is_companybooleanrequired
datestringrequiredtextstringrequiredreaction_counterintegerrequiredreply_counterintegerrequiredthread_idstringA reply's parent comment id (in a
comment_idlist); absent on a post's own comments, as Unipile.user_reactedstring
cursorstring | nullrequiredThe next page's cursor, or
nullon the last page. Opaque: send it back ascursor.total_itemsinteger | nullrequiredLinkedIn's total of a post's comments;
nullfor a comment's replies, as Unipile.pagingobjectrequired›Show fieldsHide fields
startintegerrequiredpage_countintegerrequiredtotal_countinteger | nullrequired
400A required parameter missing (errors/missing_parameters), or one that isn't valid (errors/invalid_parameters, errors/invalid_url, errors/content_too_large).
›
errors/missing_parameters), or one that isn't valid (errors/invalid_parameters, errors/invalid_url, errors/content_too_large).application/json
titlestringrequiredA short title, e.g.
Too many requests.detailstringrequiredWhat happened, in plain words. Never an account's data.
typestringrequiredUnipile's error type:
errors/<kind>. Branch on this, not ondetail.statusintegerrequiredThe HTTP status again.
retry_afterintegerSeconds to wait before trying this account again. Only on 429; the
Retry-Afterheader carries the same value.
401errors/missing_credentials: the X-API-KEY header is missing, wrong or revoked. errors/disconnected_account: LinkedIn signed the account out (or asks it for a security check); reconnect it.
›
errors/missing_credentials: the X-API-KEY header is missing, wrong or revoked. errors/disconnected_account: LinkedIn signed the account out (or asks it for a security check); reconnect it.application/json
titlestringrequiredA short title, e.g.
Too many requests.detailstringrequiredWhat happened, in plain words. Never an account's data.
typestringrequiredUnipile's error type:
errors/<kind>. Branch on this, not ondetail.statusintegerrequiredThe HTTP status again.
retry_afterintegerSeconds to wait before trying this account again. Only on 429; the
Retry-Afterheader carries the same value.
404errors/resource_not_found: an unknown or removed account, an account of another workspace (answered exactly the same), or nothing on LinkedIn with this id.
›
errors/resource_not_found: an unknown or removed account, an account of another workspace (answered exactly the same), or nothing on LinkedIn with this id.application/json
titlestringrequiredA short title, e.g.
Too many requests.detailstringrequiredWhat happened, in plain words. Never an account's data.
typestringrequiredUnipile's error type:
errors/<kind>. Branch on this, not ondetail.statusintegerrequiredThe HTTP status again.
retry_afterintegerSeconds to wait before trying this account again. Only on 429; the
Retry-Afterheader carries the same value.
429errors/too_many_requests: LinkedIn asked the account to slow down (it rests 15 minutes), its daily calls or writes are used up, or it's busy with other calls. Wait retry_after seconds.
›
errors/too_many_requests: LinkedIn asked the account to slow down (it rests 15 minutes), its daily calls or writes are used up, or it's busy with other calls. Wait retry_after seconds.application/json
titlestringrequiredA short title, e.g.
Too many requests.detailstringrequiredWhat happened, in plain words. Never an account's data.
typestringrequiredUnipile's error type:
errors/<kind>. Branch on this, not ondetail.statusintegerrequiredThe HTTP status again.
retry_afterintegerSeconds to wait before trying this account again. Only on 429; the
Retry-Afterheader carries the same value.
500errors/provider_error: LinkedIn answered something Direct couldn't read (nothing was written). errors/unexpected_error: Direct failed.
›
errors/provider_error: LinkedIn answered something Direct couldn't read (nothing was written). errors/unexpected_error: Direct failed.application/json
titlestringrequiredA short title, e.g.
Too many requests.detailstringrequiredWhat happened, in plain words. Never an account's data.
typestringrequiredUnipile's error type:
errors/<kind>. Branch on this, not ondetail.statusintegerrequiredThe HTTP status again.
retry_afterintegerSeconds to wait before trying this account again. Only on 429; the
Retry-Afterheader carries the same value.
503errors/network_down: the account's proxy or browser server didn't answer. Nothing was sent.
›
errors/network_down: the account's proxy or browser server didn't answer. Nothing was sent.application/json
titlestringrequiredA short title, e.g.
Too many requests.detailstringrequiredWhat happened, in plain words. Never an account's data.
typestringrequiredUnipile's error type:
errors/<kind>. Branch on this, not ondetail.statusintegerrequiredThe HTTP status again.
retry_afterintegerSeconds to wait before trying this account again. Only on 429; the
Retry-Afterheader carries the same value.
504errors/request_timeout: LinkedIn didn't answer in time. On a write: an unknown outcome (it may have been sent); it's never retried and its Idempotency-Key never writes again.
›
errors/request_timeout: LinkedIn didn't answer in time. On a write: an unknown outcome (it may have been sent); it's never retried and its Idempotency-Key never writes again.application/json
titlestringrequiredA short title, e.g.
Too many requests.detailstringrequiredWhat happened, in plain words. Never an account's data.
typestringrequiredUnipile's error type:
errors/<kind>. Branch on this, not ondetail.statusintegerrequiredThe HTTP status again.
retry_afterintegerSeconds to wait before trying this account again. Only on 429; the
Retry-Afterheader carries the same value.
Was this page helpful?