APILinkedIn Posts
Get the current user's LinkedIn home feed
Fetch posts from the authenticated user's LinkedIn home feed. Returns a mix of organic and promoted posts with author info, engagement metrics, and feed context (why the post appeared). Promoted posts are flagged with isPromoted: true.
POST
/feedAuthentication requiredPosts
Code Examples
curl -X POST 'https://api.connectsafely.ai/linkedin/feed' \ -H 'Authorization: Bearer <your_api_key>' \ -H 'Content-Type: application/json' \ -d '{"accountId":"acc_12345","count":5,"start":0,"sortOrder":"relevance"}'Parameters
No parameters.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | No | LinkedIn account ID to use. If not provided, uses the default account. |
count | number | No | Number of feed posts to retrieve (max 50) |
start | number | No | Starting offset for pagination |
sortOrder | string | No | Feed sort order: relevance (default algorithm) or recent (newest first) |
Example
{
"accountId": "acc_12345",
"count": 5,
"start": 0,
"sortOrder": "relevance"
}Responses
| Status | Description |
|---|---|
| 200 | Feed posts retrieved successfully |
| 401 | Unauthorized |
| 500 | Internal Server Error |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
posts | array | |
count | number | Number of posts returned |
200 Example
{
"success": true,
"posts": [
{
"activityUrn": "urn:li:example:123456",
"postUrl": "https://linkedin.com/posts/example-post",
"author": {},
"content": "example_value",
"timestamp": "2024-01-15",
"engagement": {},
"hashtags": [],
"isPromoted": false,
"feedContext": "example_value"
}
],
"count": 25
}401 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
401 Example
{
"error": "example_value"
}500 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
500 Example
{
"error": "Failed to fetch feed",
"success": false
}LinkedIn Posts API
Fetch, engage, and analyse LinkedIn posts with the ConnectSafely API. Comment, react, repost, search posts, and scrape content programmatically.
Get latest posts from a profile
Retrieve the most recent posts from a LinkedIn profile. Useful for monitoring competitor content, tracking influencer activity, or finding engagement opportunities. Can include or exclude reposts/shares.
