Introduction
Until now, Datamagnet's API focused on people and company data. Today, we're expanding into LinkedIn post analytics with 4 new endpoints that let you extract everything about a LinkedIn post—from the full post content to every comment, reaction, and repost.
Whether you're building a social listening dashboard, tracking content performance for clients, or analyzing engagement patterns at scale, these endpoints give you the raw data you need.
All you need is a LinkedIn post URL. We handle extracting the activity ID, calling the right upstream APIs, and returning clean, paginated, snake_case JSON.
What's New
Here's a quick overview of the 4 new endpoints:
| Endpoint | What It Does | Cost |
|---|---|---|
| POST /api/v1/linkedin/post | Full post details, author, social counts | 5 credits |
| POST /api/v1/linkedin/post/comments | Paginated comments with commenter profiles | 5 credits |
| POST /api/v1/linkedin/post/reactions | Who reacted and reaction types (Like, Praise, etc.) | 5 credits |
| POST /api/v1/linkedin/post/reposts | Who reposted, with commentary and reshare info | 5 credits |
All endpoints accept a simple JSON body:
{
"url": "https://www.linkedin.com/posts/username_slug-activity-7430615551086850048-XXXX"
}
We support every common LinkedIn post URL format—whether it's a /posts/ share link, a /feed/update/ link, or a ugcPost URL. The API auto-extracts the activity ID for you.
1. Post Details
Endpoint: POST /api/v1/linkedin/post
This is your starting point. Given any LinkedIn post URL, it returns the complete post data in a single call:
- Post content — full text, posted timestamp, and the post's URN
- Author info — name, headline, profile picture, and profile link
- Social counts — total likes, comments, shares, and a reaction-type breakdown (e.g., 108 Likes, 10 Praise, 4 Empathy)
- Article attachments — title, subtitle, link, and thumbnail for shared articles
- Repost metadata — if the post is a repost, you get the original post header and who reposted it
- Related URNs — the
reactions_urn,comments_urn, andreposts_urnyou can use with the other endpoints
import requests
response = requests.post(
"https://api.datamagnet.co/api/v1/linkedin/post",
json={"url": "https://www.linkedin.com/feed/update/urn:li:activity:7219434359085252608"},
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
data = response.json()
print(data["message"]["post_text"])
print(f"Likes: {data['message']['social_count']['num_likes']}")
2. Post Comments
Endpoint: POST /api/v1/linkedin/post/comments
Retrieve every comment on a post with full commenter profiles. Supports cursor-based pagination to walk through all comments.
Each comment includes:
- Comment text and permalink
- Commenter name, headline, and profile picture
- Whether the comment is pinned or edited
- Reaction breakdown on the comment itself
- Reply count and top replies
page = 1
all_comments = []
while page is not None:
response = requests.post(
"https://api.datamagnet.co/api/v1/linkedin/post/comments",
json={
"url": "https://www.linkedin.com/posts/...",
"page": page
},
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
data = response.json()
all_comments.extend(data["message"]["comments"])
page = data.get("cursor")
print(f"Total comments: {len(all_comments)}")
The cursor field returns the next page number. When it's null, you've reached the end.
3. Post Reactions
Endpoint: POST /api/v1/linkedin/post/reactions
See exactly who reacted to a post and what type of reaction they gave. LinkedIn supports 6 reaction types:
- 👍 Like
- 👏 Praise (Celebrate)
- ❤️ Empathy (Love)
- 💡 Interest (Insightful)
- 🙏 Appreciation (Support)
- 😄 Entertainment (Funny)
Each reaction record includes the person's name, headline, profile URL, profile picture, and the specific reaction type. Paginated the same way as comments.
response = requests.post(
"https://api.datamagnet.co/api/v1/linkedin/post/reactions",
json={
"url": "https://www.linkedin.com/posts/...",
"page": 1
},
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
data = response.json()
for reaction in data["message"]["reactions"]:
print(f"{reaction['title']} — {reaction['reaction_type']}")
4. Post Reposts
Endpoint: POST /api/v1/linkedin/post/reposts
Track how content spreads across LinkedIn. This endpoint returns everyone who reposted a specific post, including:
- Direct reposts — the reposter's name, headline, profile picture, and any commentary they added
- Reshares — when someone reposted a repost, you get a nested header showing the chain (e.g., "Michael Chen reposted this")
- Company reposts — when a company page reshares, you get the company name, logo, and follower count
response = requests.post(
"https://api.datamagnet.co/api/v1/linkedin/post/reposts",
json={
"url": "https://www.linkedin.com/posts/...",
"page": 1
},
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
Design Decisions
A few things worth highlighting about how we built these:
Snake case everywhere. All response keys are in snake_case, even though LinkedIn's internal API uses camelCase. We convert everything automatically so your Python and Ruby code looks idiomatic without post-processing.
Consistent pagination. Every paginated endpoint uses the same pattern: pass page in the request body, read cursor from the response. When cursor is null, you're done. No offset math required.
Any URL format. We auto-detect and extract activity IDs from multiple LinkedIn URL formats — /posts/ share links, /feed/update/ links, ugcPost URLs, and more. Just paste whatever URL you have.

