POST DETAILS API
Any Post URL to Structured JSON
Send a post URL and get the full text, the author, media, links, the exact publish time and engagement counts with a breakdown by reaction type. Reposts come with the original post attached.
POST/api/v1/post
{
"post_text": "We're growing the Product team!...",
"posted_at": "2024-07-17T20:14:41.000Z",
"social_count": {
"num_likes": 124,
"num_comments": 11,
"num_shares": 13
}
}What is the Datamagnet Post Details API?
The Datamagnet Post Details API turns a single post URL into structured JSON. It returns the full post text, the author with headline and profile link, links and media in the post, the exact publish time, and engagement counts for likes, comments and shares with a breakdown by reaction type. On a repost it also returns the original post and who reshared it.
- Input
- Post URL
- Cost
- 1 credit per post
- Freshness
- Live at request time
One request
Authenticate with your API key as a bearer token and send a JSON body. This is the request behind the sample response.
POST /api/v1/post- Input: Post URL
- Cost: 1 credit per post
curl -X POST \
"https://api.datamagnet.co/api/v1/post" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.linkedin.com/feed/update/urn:li:activity:7219434359085252608"}'→ 200 OK · 1 credit
{ "message": { "post_text": "We're growing the Product team! ...", "posted_at": "2024-07-17T20:14:41.000Z", "actor": { "actor_name": "John Smith", "actor_description": "VP of Product at ExampleCo", ... }, "is_repost": true, "social_count": { "num_likes": 124, "num_comments": 11, "num_shares": 13, "reaction_type_counts": [{ "count": 108, "reaction_type": "LIKE" }, ...] }, "urn": "urn:li:activity:7219434359085252608" }, "credit_used": 1}
What you get
The main fields in the response. The Post Details reference documents every field.
| Field | Type | Description |
|---|---|---|
post_text | string | Full text of the post. |
post_link | string | Direct link to the post. |
posted_at | string | ISO 8601 publish time. The field to sort and filter on. |
actor | object | The author: name, headline, picture, profile link, URN and numeric id. |
social_count | object | num_likes, num_comments, num_shares and reaction_type_counts. |
links_in_post | array | URLs found in the post text. |
mentions | array | People and companies tagged in the post, with name and URN. |
image_component_all_dimentions | array | Media attached to the post, in every size served. |
top_comments | array | The first comments shown under the post, at no extra cost. Often empty. |
is_repost | boolean | Whether the post reshares another post. |
header, reshared_post | object | null | On a repost: who reshared it, and the original post. |
urn | string | Unique identifier of the post. |
Use cases
Measure a post
Read likes, comments, shares and the reaction mix of any post from its URL, for campaign reporting or creator and partner programs.
Give an agent the full post
Hand an AI agent or a summariser the complete text, the links in it and the exact publish time instead of a truncated preview.
Untangle reposts
On a repost, actor is the original author and header is the account that reshared it, with the original post under reshared_post.
Frequently asked questions
Read your first posts with 10 free credits
No credit card required. Get an API key and turn ten post URLs into JSON in a few minutes.
- 1 credit per post
- Charged only on success
- Exact publish time and reaction breakdown
Interactive Demo
~15 minutes
Get your API key
1 minPOST a post URL
1 minUse the JSON
Instant