Retrieve company posts
The Linked API allows you to retrieve posts made by a company on LinkedIn programmatically. You can specify whether to retrieve only the posts using the include
query parameter. Below is an example of how to retrieve company posts using a GET
request.
Endpoint
GET /v1/companies
Parameters
url
(required, string): The URL of the LinkedIn company page to retrieve posts from.include
(optional, string): Set toposts
to retrieve only the company's posts.limit
(optional, integer): The maximum number of posts to retrieve. Default is 10.sortBy
(optional, string): Sort posts by eitherdate
orpopularity
. Default isdate
.
Example
curl -X GET "https://api.linkedapi.io/v1/companies?include=posts&limit=5&sortBy=date" \
-H "Content-Type: application/json" \
-H "x-api-token: your-api-token-here" \
-H "account-token: your-account-token-here" \
-d '{
"url": "https://www.linkedin.com/company/abc-corp/"
}'
Response
{
"data": {
"posts": [
{
"postId": "123456789",
"content": "We are excited to announce the launch of our new product!",
"timestamp": "2024-09-21T12:34:00Z",
"likes": 150,
"comments": 20
},
{
"postId": "987654321",
"content": "Our team had a fantastic time at the Tech Expo 2024!",
"timestamp": "2024-09-20T11:15:00Z",
"likes": 200,
"comments": 35
}
]
},
"success": true
}
Errors
400 Bad Request
: Invalid or missing parameters.401 Unauthorized
: Missing or invalid authorization token.404 Not Found
: Company profile or posts not found.