LinkedIn Company Posts
Recent posts of a LinkedIn company page: full text, link, publish date, author, engagement with a per-reaction breakdown, articles and media.
- Price per call
- 4 credits
- per successful call
- Price ceiling
- 26 credits
- if a call is retried elsewhere
- Failed calls
- Free
- retried automatically
- Billed
- Per call
- only on success
Endpoint
api.primaryapi.com/ v1/ run/ linkedin. company_postsAuth: API key with run or full access, or a dashboard session
Send the input below as a JSON body. The call is routed to a healthy upstream; if an attempt fails, it is retried automatically inside the same request and you pay only for the answer you get. To check an input and see the exact price without running anything, call POST /v1/quote/linkedin.company_posts with the same body (free).
Example request
curl -sS -X POST "https://api.primaryapi.com/v1/run/linkedin.company_posts" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://www.linkedin.com/company/google/","limit":10}'const res = await fetch('https://api.primaryapi.com/v1/run/linkedin.company_posts', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PRIMARYAPI_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
url: 'https://www.linkedin.com/company/google/',
limit: 10,
}),
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.code}: ${body.error}`);
// found:false is a successful answer ("does not exist"), not an error
console.log(body.output.found ? body.output.data : body.output.reason, body.credits);import os
import requests
res = requests.post(
"https://api.primaryapi.com/v1/run/linkedin.company_posts",
headers={"Authorization": f"Bearer {os.environ['PRIMARYAPI_API_KEY']}"},
json={
"url": "https://www.linkedin.com/company/google/",
"limit": 10,
},
timeout=60,
)
body = res.json()
if not res.ok:
raise RuntimeError(f"{body['code']}: {body['error']}")
# found=False is a successful answer ("does not exist"), not an error
print(body["output"]["data"] if body["output"]["found"] else body["output"]["reason"], body["credits"]){
"name": "run_api",
"arguments": {
"sku": "linkedin.company_posts",
"input": {
"url": "https://www.linkedin.com/company/google/",
"limit": 10
}
}
}Price this exact input first (free)
curl -sS -X POST "https://api.primaryapi.com/v1/quote/linkedin.company_posts" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://www.linkedin.com/company/google/","limit":10}'Returns credits (what the call is expected to cost) and maxCredits (the most it can cost, which is set aside while it runs). Invalid input fails here the same way it would on run.
Input
JSON body fields. Unknown fields are rejected with 400 invalid_input (never silently ignored). You may add the routing controls preferLatencyUnderMs and maxCredits to the same object.
urlstringrequired- Company page URL (https://www.linkedin.com/company/<slug>), universal name or company id.max 2048 chars
limitintegerdefault10- Maximum number of results to return (1-100, default 10).1–100
postedLimitenum- Only posts published within this window (default any).one of: any, 1h, 24h, week, month, 3months, 6months, year
includeQuotePostsbooleandefaulttrue- Include quote posts (reposts with added text). Default true.
includeRepostsbooleandefaulttrue- Include plain reposts (no added text). Default true.
cursorstring- Opaque pagination cursor: pass the previous response's nextCursor.
Output
When output.found is true, output.data has these fields (a list under items, billed per item returned).
itemsobject[]items[].idstring- LinkedIn activity id
items[].urlstring | nullitems[].typeenum- post, plain repost, or quote post (repost with added text)one of: post, repost, quote
items[].textstring | nullitems[].createdUtcinteger | null- Publish time, Unix seconds
items[].shareUrlstring | nullitems[].authorobject | nullitems[].author.namestring | null- Display name of the member or page
items[].author.urlstring | null- Profile or company page URL
items[].author.publicIdentifierstring | null- Member public identifier (the /in/<id> part), for members
items[].author.universalNamestring | null- Company universal name (the /company/<name> part), for pages
items[].author.headlinestring | null- Member headline or page tagline shown next to the post
items[].author.imageUrlstring | null- Avatar or logo URL (LinkedIn image URLs expire)
items[].author.typestring | null- "profile" for a member, "company" for a page, when known
items[].engagementobject | nullitems[].engagement.likesinteger | null- Total reactions
items[].engagement.commentsinteger | nullitems[].engagement.sharesinteger | null- Reposts
items[].engagement.reactionsobject[]- Per-reaction breakdown (empty when not shown)
items[].engagement.reactions[].typestring- Reaction type: LIKE, PRAISE, EMPATHY, APPRECIATION, INTEREST, ENTERTAINMENT
items[].engagement.reactions[].countintegeritems[].articleTitlestring | nullitems[].articleSubtitlestring | nullitems[].articleUrlstring | nullitems[].articleLinkLabelstring | nullitems[].articleDescriptionstring | nullitems[].articleImagestring | nullitems[].articleImageWidthinteger | nullitems[].articleImageHeightinteger | nullitems[].postImagesobject[]items[].postImages[].urlstringitems[].postImages[].widthinteger | nullitems[].postImages[].heightinteger | nullitems[].imagesstring[]- Image URLs of the post
items[].postVideoobject | nullitems[].postVideo.thumbnailUrlstring | nullitems[].postVideo.videoUrlstring | nullitems[].videoUrlstring | nullitems[].videoThumbnailstring | nullitems[].documentTitlestring | null- Title of an attached document (carousel/PDF)
items[].documentUrlstring | nullitems[].newsletterTitlestring | nullitems[].newsletterUrlstring | nullitems[].publicationUrlstring | nullitems[].repostedByobject | nullitems[].repostedBy.namestring | nullitems[].repostedBy.urlstring | nullitems[].repostedBy.publicIdentifierstring | nullitems[].repostIdstring | nullitems[].repostUrlstring | nullitems[].repostTextstring | nullitems[].repostCreatedUtcinteger | nullitems[].repostAuthorIdstring | nullitems[].repostAuthorNamestring | nullitems[].repostAuthorHandlestring | nullitems[].repostAuthorUniversalNamestring | nullitems[].repostAuthorUrlstring | nullitems[].repostAuthorHeadlinestring | nullitems[].repostAuthorImagestring | nullitems[].repostAuthorTypestring | nullitems[].repostImagesstring[]items[].repostArticleTitlestring | nullitems[].repostArticleSubtitlestring | nullitems[].repostArticleUrlstring | nullitems[].repostArticleDescriptionstring | nullitems[].repostArticleLinkLabelstring | nullitems[].repostArticleImagestring | nullitems[].repostArticleImageWidthinteger | nullitems[].repostArticleImageHeightinteger | nullitems[].socialContentobject | null- Visibility flags LinkedIn sends with the post (hidden counts, share URL)
items[].contentAnnotationsany[] | null- Mentions and links inside the text, when available
items[].contentAttributesany[] | null- Same as contentAnnotations (kept for compatibility)
nextCursorstring | null
TypeScript type
/** output.data when output.found is true */
type LinkedinCompanyPosts = {
items: {
/** LinkedIn activity id */
id: string;
url: string | null;
/** post, plain repost, or quote post (repost with added text) */
type: "post" | "repost" | "quote";
text: string | null;
/** Publish time, Unix seconds */
createdUtc: number | null;
shareUrl: string | null;
author: {
/** Display name of the member or page */
name: string | null;
/** Profile or company page URL */
url: string | null;
/** Member public identifier (the /in/<id> part), for members */
publicIdentifier: string | null;
/** Company universal name (the /company/<name> part), for pages */
universalName: string | null;
/** Member headline or page tagline shown next to the post */
headline: string | null;
/** Avatar or logo URL (LinkedIn image URLs expire) */
imageUrl: string | null;
/** "profile" for a member, "company" for a page, when known */
type: string | null;
} | null;
engagement: {
/** Total reactions */
likes: number | null;
comments: number | null;
/** Reposts */
shares: number | null;
/** Per-reaction breakdown (empty when not shown) */
reactions: {
/** Reaction type: LIKE, PRAISE, EMPATHY, APPRECIATION, INTEREST, ENTERTAINMENT */
type: string;
count: number;
}[];
} | null;
articleTitle: string | null;
articleSubtitle: string | null;
articleUrl: string | null;
articleLinkLabel: string | null;
articleDescription: string | null;
articleImage: string | null;
articleImageWidth: number | null;
articleImageHeight: number | null;
postImages: {
url: string;
width: number | null;
height: number | null;
}[];
/** Image URLs of the post */
images: string[];
postVideo: {
thumbnailUrl: string | null;
videoUrl: string | null;
} | null;
videoUrl: string | null;
videoThumbnail: string | null;
/** Title of an attached document (carousel/PDF) */
documentTitle: string | null;
documentUrl: string | null;
newsletterTitle: string | null;
newsletterUrl: string | null;
publicationUrl: string | null;
repostedBy: {
name: string | null;
url: string | null;
publicIdentifier: string | null;
} | null;
repostId: string | null;
repostUrl: string | null;
repostText: string | null;
repostCreatedUtc: number | null;
repostAuthorId: string | null;
repostAuthorName: string | null;
repostAuthorHandle: string | null;
repostAuthorUniversalName: string | null;
repostAuthorUrl: string | null;
repostAuthorHeadline: string | null;
repostAuthorImage: string | null;
repostAuthorType: string | null;
repostImages: string[];
repostArticleTitle: string | null;
repostArticleSubtitle: string | null;
repostArticleUrl: string | null;
repostArticleDescription: string | null;
repostArticleLinkLabel: string | null;
repostArticleImage: string | null;
repostArticleImageWidth: number | null;
repostArticleImageHeight: number | null;
/** Visibility flags LinkedIn sends with the post (hidden counts, share URL) */
socialContent: Record<string, unknown> | null;
/** Mentions and links inside the text, when available */
contentAnnotations: unknown[] | null;
/** Same as contentAnnotations (kept for compatibility) */
contentAttributes: unknown[] | null;
}[];
nextCursor: string | null;
};If what you asked about does not exist, is private, or a search matches nothing, the call still succeeds: output.found is false, output.data is null and output.reason says why. Such misses are free unless the notes below say misses are billed, in which case a miss costs the price of one call.
Pagination. Pass the previous response’s nextCursor as cursor to get the next page. nextCursor: null means there is nothing more. See Pagination.
Example response
Values are placeholders that follow the output schema (strings as "string", numbers as 0); credits shows what this call would cost at the usual price.
{
"output": {
"found": true,
"data": {
"items": [
{
"id": "string",
"url": "https://www.linkedin.com/company/google/",
"type": "post",
"text": "string",
"createdUtc": 0,
"shareUrl": "https://example.com",
"author": {
"name": "string",
"url": "https://www.linkedin.com/company/google/",
"publicIdentifier": "string",
"universalName": "string",
"headline": "string",
"imageUrl": "https://example.com",
"type": "string"
},
"engagement": {
"likes": 0,
"comments": 0,
"shares": 0,
"reactions": [
{
"type": "string",
"count": 0
}
]
},
"articleTitle": "string",
"articleSubtitle": "string",
"articleUrl": "https://example.com",
"articleLinkLabel": "string",
"articleDescription": "string",
"articleImage": "string",
"articleImageWidth": 0,
"articleImageHeight": 0,
"postImages": [
{
"url": "https://www.linkedin.com/company/google/",
"width": 0,
"height": 0
}
],
"images": [
"string"
],
"postVideo": {
"thumbnailUrl": "https://example.com",
"videoUrl": "https://example.com"
},
"videoUrl": "https://example.com",
"videoThumbnail": "string",
"documentTitle": "string",
"documentUrl": "https://example.com",
"newsletterTitle": "string",
"newsletterUrl": "https://example.com",
"publicationUrl": "https://example.com",
"repostedBy": {
"name": "string",
"url": "https://www.linkedin.com/company/google/",
"publicIdentifier": "string"
},
"repostId": "string",
"repostUrl": "https://example.com",
"repostText": "string",
"repostCreatedUtc": 0,
"repostAuthorId": "string",
"repostAuthorName": "string",
"repostAuthorHandle": "string",
"repostAuthorUniversalName": "string",
"repostAuthorUrl": "https://example.com",
"repostAuthorHeadline": "string",
"repostAuthorImage": "string",
"repostAuthorType": "string",
"repostImages": [
"string"
],
"repostArticleTitle": "string",
"repostArticleSubtitle": "string",
"repostArticleUrl": "https://example.com",
"repostArticleDescription": "string",
"repostArticleLinkLabel": "string",
"repostArticleImage": "string",
"repostArticleImageWidth": 0,
"repostArticleImageHeight": 0,
"socialContent": {},
"contentAnnotations": [
null
],
"contentAttributes": [
null
]
}
],
"nextCursor": null
}
},
"provider": "PrimaryAPI",
"credits": 4,
"items": 1,
"requestId": "req_01JBXK6Y2N9V8T4R3Q2P1M0A7Z",
"nextCursor": null
}Pricing and reliability
Calls go only to upstreams that are healthy right now. If an attempt fails, the call is retried automatically inside the same request; a failed attempt costs nothing, and a call never costs more than its quote’s maxCredits. Live figures below are measured on real traffic.
Success rate, uptime, latency and call counts are measured live from real traffic over 30 days and show “—” until there is data.
Errors
Errors are JSON { code, error, requestId } and are never charged. The ones to handle for this endpoint:
- invalid_inputThe request failed validation before anything ran.
- unauthorizedNo valid API key or session was presented.
- insufficient_balanceThe balance cannot cover the most this call could cost.
- key_limit_reachedThe key’s own spend limit is used up for the current window.
- trial_cap_reachedAn agent trial key has used its whole trial budget.
- forbiddenThe credential is valid but may not do this.
- not_foundThe thing addressed by the URL does not exist for you.
- idempotency_conflictThe
Idempotency-Keyis already bound to a different request. - rate_limitedToo many requests in the current window.
- all_sources_failedThe call could not be answered, even after automatic retries.
- service_unavailableThis API cannot run in this deployment right now.
- timeoutThe request passed its deadline before it finished.
Notes
Newest first, up to `limit` posts per call; pass nextCursor for older posts. Unknown company pages answer found=false (reason not_found), pages with no public posts in the window found=false (reason no_results).
Public LinkedIn data only. LinkedIn’s User Agreement restricts automated collection and LinkedIn enforces it; use the data for lawful purposes, keep copies only as long as you need them, and treat post and article text as the author’s content (analysis, not republication).
More LinkedIn endpoints
- LinkedIn Ads Library3 credits
- LinkedIn Basic Profile Posts4 credits
- LinkedIn Company2 credits
- LinkedIn Company Employees3.75 credits per result
- LinkedIn Company Search4 credits
- LinkedIn Email Finder13 credits
- LinkedIn Job1 credit
- LinkedIn Jobs1 credit
- LinkedIn Jobs with Details0.45 credits per result
- LinkedIn Post3 credits
- LinkedIn Post Comments4 credits
- LinkedIn Post Reactions4 credits
- LinkedIn Post Search with Details4 credits
- LinkedIn Profile5 credits
- LinkedIn Profile Comments4 credits
- LinkedIn Profile Posts4 credits
- LinkedIn Profile Reactions4 credits
- LinkedIn Profile Search5 credits per result
- LinkedIn Profile Search + Email12.5 credits per result
- LinkedIn ArticlePlanned
- LinkedIn Basic Profile SearchPlanned
- LinkedIn Comment ReactionsPlanned
- LinkedIn Comment RepliesPlanned
- LinkedIn GroupPlanned
- LinkedIn Group PostsPlanned
- LinkedIn Group SearchPlanned
- LinkedIn Lead SearchPlanned
- LinkedIn Post EngagersPlanned
- LinkedIn Services SearchPlanned
Generated from the PrimaryAPI catalog. Machine-readable contract: GET https://api.primaryapi.com/v1/apis/linkedin.company_posts.