Posts
post fetch
Fetch a LinkedIn post with optional comments and reactions.
linkedin post fetch <url> [flags]| Flag | Type | Description |
|---|---|---|
--comments | boolean | Include comments |
--reactions | boolean | Include reactions |
--comments-limit | integer | Max comments to retrieve |
--comments-sort | string | Sort order: mostRelevant or mostRecent |
--comments-replies | boolean | Include replies to comments |
--reactions-limit | integer | Max reactions to retrieve |
With
--comments, each returned comment includescommentUrnandcommentUrl. Pass acommentUrltocomment react/comment replyto engage with that comment.
linkedin post fetch https://www.linkedin.com/posts/vprudnikoff_activity-123
# With comments sorted by most recent, including replies
linkedin post fetch https://www.linkedin.com/posts/vprudnikoff_activity-123 \
--comments --comments-sort mostRecent --comments-replies --json
# With reactions
linkedin post fetch https://www.linkedin.com/posts/vprudnikoff_activity-123 \
--comments --reactions --jsonpost search
Search for posts on LinkedIn with filters.
linkedin post search [flags]| Flag | Type | Description |
|---|---|---|
--term | string | Search keyword or phrase, up to 50 characters |
--limit | integer | Max results to return, up to 100 |
--sort | string | One of topMatch, latest |
--date-posted | string | One of past24Hours, pastWeek, pastMonth |
--content-type | string | One of videos, images, jobPosts, liveVideos, documents |
--posted-by | string | Comma-separated: me, firstConnections, peopleYouFollow |
--from-members | string | Comma-separated names of people whose posts to keep |
--from-companies | string | Comma-separated names of companies whose posts to keep |
--mentioning-members | string | Comma-separated names of people the post must mention |
--mentioning-companies | string | Comma-separated names of companies the post must mention |
--author-companies | string | Comma-separated names of companies the author works at |
--author-industries | string | Comma-separated industries the author works in |
The member and company flags take typed names, which is all LinkedIn's filter panel accepts, so the entry that gets picked is whichever suggestion LinkedIn ranked first for that name – it may be a namesake rather than the person or company you meant. To pin an exact one, run the search as a workflow with an urn on the filter entry; an identifier that no suggestion matches fails the action with filterIdentityMismatch instead of filtering by a namesake.
A search may return fewer posts than --limit, because how many results come back depends on what LinkedIn loads for that account on that search. LinkedIn also widens a narrow query on its own, so a non-empty result does not mean your term matched. See searching for posts.
Search results carry no
urnon theirauthorandreposter– runpost fetchon a result'surlwhen you need one.
linkedin post search --term "climate tech" --date-posted pastWeek --json
linkedin post search --term "product launch" --content-type images --sort latest --limit 20 --json
linkedin post search --term "hiring" --from-companies "Linked API" --posted-by "peopleYouFollow" --jsonpost create
Create a LinkedIn post with optional media attachments.
linkedin post create <text> [flags]| Arg | Required | Description |
|---|---|---|
text | yes | Post text (up to 3000 characters) |
| Flag | Type | Description |
|---|---|---|
--company-url | string | Post on behalf of a company page (requires admin access) |
--attachments | string | Attachments as url:type or url:type:name. Types: image, video, document. Can be specified multiple times. |
Attachment limits: up to 9 images, or 1 video, or 1 document. Cannot mix types.
linkedin post create "Excited to share our latest update!"
# With an image
linkedin post create "Check this out" \
--attachments "https://example.com/photo.jpg:image"
# With a document
linkedin post create "Our Q4 report" \
--attachments "https://example.com/report.pdf:document:Q4 Report"
# Post as a company
linkedin post create "Company announcement" \
--company-url https://www.linkedin.com/company/flutterwtfpost react
React to a LinkedIn post.
linkedin post react <url> --type <reaction> [flags]| Flag | Type | Required | Description |
|---|---|---|---|
--type | string | yes | Reaction type: like, love, support, celebrate, insightful, funny |
--company-url | string | no | React on behalf of a company page |
linkedin post react https://www.linkedin.com/posts/vprudnikoff_activity-123 --type like
linkedin post react https://www.linkedin.com/posts/vprudnikoff_activity-123 --type celebrate \
--company-url https://www.linkedin.com/company/flutterwtfpost comment
Comment on a LinkedIn post.
linkedin post comment <url> <text> [flags]| Arg | Required | Description |
|---|---|---|
url | yes | LinkedIn post URL |
text | yes | Comment text (up to 1000 characters) |
| Flag | Type | Description |
|---|---|---|
--company-url | string | Comment on behalf of a company page |
linkedin post comment https://www.linkedin.com/posts/vprudnikoff_activity-123 "Great insights!"
linkedin post comment https://www.linkedin.com/posts/vprudnikoff_activity-123 "Well said!" \
--company-url https://www.linkedin.com/company/flutterwtfcomment react
React to a comment on a LinkedIn post.
linkedin comment react <commentUrl> --type <reaction>| Arg | Required | Description |
|---|---|---|
commentUrl | yes | Deep-link URL of the comment, from post fetch --comments or a comment reply result |
| Flag | Type | Required | Description |
|---|---|---|---|
--type | string | yes | Reaction type: like, love, support, celebrate, insightful, funny |
linkedin comment react "https://www.linkedin.com/feed/update/urn:li:activity:123/?dashCommentUrn=urn:li:fsd_comment:(456,urn:li:activity:123)" --type likecomment reply
Reply to a comment on a LinkedIn post.
linkedin comment reply <commentUrl> <text> [flags]| Arg | Required | Description |
|---|---|---|
commentUrl | yes | Deep-link URL of the comment to reply to |
text | yes | Reply text |
The reply's commentUrn and commentUrl are printed on success (use --json for the full object).
linkedin comment reply "https://www.linkedin.com/feed/update/urn:li:activity:123/?dashCommentUrn=urn:li:fsd_comment:(456,urn:li:activity:123)" "Great point, thanks for sharing!" --json