Company posts
GET
/v1/company-posts
$0.0400 per request
Get LinkedIn company posts by company URL, ID, or universal name.
Get LinkedIn company posts by company URL, ID, or universal name.
Try it
Runs against the sandbox, so it is free and needs no API key. The response shape is identical to the live endpoint.
GET
Sandbox · free
/v1/company-posts
Parameters
Billed equivalent
With a real key this call costs at Starter, less your tier discount.
Response
msQuery parameters
At least one of
company, companyId, companyUniversalName is required.
| Parameter | Example | Description |
|---|---|---|
company
required
|
https://www.linkedin.com/company/google | Filter posts by this company URL |
companyId
required
|
— | Filter posts by company ID. It's faster to search by ID |
companyUniversalName
required
|
— | Filter posts by company universal name (last part in the URL) |
page
|
1 | Page number for pagination |
paginationToken
|
— | Required if it was returned by the previous page. Otherwise the page will always be 1 (on LinkedIn side). Doesn't apply for all queries, usually profile posts return this token |
postedLimit
|
— | Filter posts by maximum posted date. Supported values: '24h', 'week', 'month'. Since LinkedIn doesn't offer a way to filter by date, the filtering will be done on our side, due to that the pagination might have incorrect values, because pagination is returned by LinkedIn without applying the postedLimit filter |
Code
curl 'https://api.enricho.io/v1/company-posts?company=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fgoogle' \
-H 'X-API-Key: YOUR_API_KEY'
import requests
response = requests.get(
"https://api.enricho.io/v1/company-posts",
headers={"X-API-Key": "YOUR_API_KEY"},
params={
'company': 'https://www.linkedin.com/company/google',
},
timeout=30,
)
response.raise_for_status()
# Every response reports what it cost and what is left.
print(response.headers["X-Request-Cost"], response.headers["X-Balance-Remaining"])
print(response.json())
const params = new URLSearchParams({
"company": "https://www.linkedin.com/company/google"
});
const response = await fetch(`https://api.enricho.io/v1/company-posts?${params}`, {
headers: { 'X-API-Key': 'YOUR_API_KEY' },
});
if (!response.ok) {
throw new Error(`${response.status}: ${(await response.json()).error.message}`);
}
console.log(response.headers.get('X-Request-Cost'));
console.log(await response.json());
$client = new GuzzleHttp\Client();
$response = $client->get('https://api.enricho.io/v1/company-posts', [
'headers' => ['X-API-Key' => 'YOUR_API_KEY'],
'query' => [
'company' => 'https://www.linkedin.com/company/google',
],
'timeout' => 30,
]);
echo $response->getHeaderLine('X-Request-Cost');
$data = json_decode((string) $response->getBody(), true);
Example response
{
"pagination": null,
"elements": null,
"error": "No valid target provided",
"status": 400,
"query": []
}
Error response
Full list of codes on the errors page.
{
"error": {
"code": "invalid_params",
"message": "company-posts requires at least one of: company, companyId, companyUniversalName.",
"docs": "https://enricho.io/docs/errors#invalid_params",
"required_one_of": [
"company",
"companyId",
"companyUniversalName"
]
}
}