LinkedIn Post Data
curl --request POST \
--url https://api.datamagnet.co/api/v1/posts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.datamagnet.co/api/v1/posts"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datamagnet.co/api/v1/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.datamagnet.co/api/v1/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.datamagnet.co/api/v1/posts"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.datamagnet.co/api/v1/posts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.datamagnet.co/api/v1/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"credit_used": 1,
"message": {
"author": {
"articles_count": 256,
"cover_image": "https://media.licdn.com/...",
"followers_count": 37242615,
"headline": "Chair, Gates Foundation and Founder, Breakthrough Energy",
"name": "Bill Gates",
"posts_count": 1418,
"profile_image": "https://media.licdn.com/...",
"profile_url": "https://www.linkedin.com/in/williamhgates"
},
"author_linkedin_id": "williamhgates",
"author_linkedin_url": "https://www.linkedin.com/in/williamhgates",
"comments": [],
"content": "Post content text...",
"created_at": "2024-12-15T10:00:00Z",
"engagement": {
"comments_count": 125,
"likes_count": 5420,
"shares_count": 89
},
"media": [
{
"type": "image",
"url": "https://..."
}
],
"post_url": "https://www.linkedin.com/posts/williamhgates_...",
"reactions": [
{
"count": 4800,
"type": "LIKE"
},
{
"count": 420,
"type": "PRAISE"
}
]
},
"status": "success"
}
LinkedIn Post Data
Retrieve structured data for a LinkedIn post from its URL, including author, content, media, reactions, comments, reposts, and publish timestamp.
POST
/
api
/
v1
/
posts
LinkedIn Post Data
curl --request POST \
--url https://api.datamagnet.co/api/v1/posts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.datamagnet.co/api/v1/posts"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datamagnet.co/api/v1/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.datamagnet.co/api/v1/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.datamagnet.co/api/v1/posts"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.datamagnet.co/api/v1/posts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.datamagnet.co/api/v1/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"credit_used": 1,
"message": {
"author": {
"articles_count": 256,
"cover_image": "https://media.licdn.com/...",
"followers_count": 37242615,
"headline": "Chair, Gates Foundation and Founder, Breakthrough Energy",
"name": "Bill Gates",
"posts_count": 1418,
"profile_image": "https://media.licdn.com/...",
"profile_url": "https://www.linkedin.com/in/williamhgates"
},
"author_linkedin_id": "williamhgates",
"author_linkedin_url": "https://www.linkedin.com/in/williamhgates",
"comments": [],
"content": "Post content text...",
"created_at": "2024-12-15T10:00:00Z",
"engagement": {
"comments_count": 125,
"likes_count": 5420,
"shares_count": 89
},
"media": [
{
"type": "image",
"url": "https://..."
}
],
"post_url": "https://www.linkedin.com/posts/williamhgates_...",
"reactions": [
{
"count": 4800,
"type": "LIKE"
},
{
"count": 420,
"type": "PRAISE"
}
]
},
"status": "success"
}
Post
Cost:1 credit / successful request.
This endpoint retrieves post data from a LinkedIn post URL based on the provided post URL.
Post endpoint
This endpoint allows you to get structured data of posts from a LinkedIn post URL.Required attributes
string
required
The LinkedIn post URL.
Response
{
"credit_used": 1,
"message": {
"author": {
"articles_count": 256,
"cover_image": "https://media.licdn.com/...",
"followers_count": 37242615,
"headline": "Chair, Gates Foundation and Founder, Breakthrough Energy",
"name": "Bill Gates",
"posts_count": 1418,
"profile_image": "https://media.licdn.com/...",
"profile_url": "https://www.linkedin.com/in/williamhgates"
},
"author_linkedin_id": "williamhgates",
"author_linkedin_url": "https://www.linkedin.com/in/williamhgates",
"comments": [],
"content": "Post content text...",
"created_at": "2024-12-15T10:00:00Z",
"engagement": {
"comments_count": 125,
"likes_count": 5420,
"shares_count": 89
},
"media": [
{
"type": "image",
"url": "https://..."
}
],
"post_url": "https://www.linkedin.com/posts/williamhgates_...",
"reactions": [
{
"count": 4800,
"type": "LIKE"
},
{
"count": 420,
"type": "PRAISE"
}
]
},
"status": "success"
}
The post model
Properties
integer
Number of credits used for this request.
object
Post data object.
Show Post data
Show Post data
object
string
Author’s LinkedIn identifier.
string
Author’s LinkedIn profile URL.
string
Text content of the post.
string
Timestamp when the post was created.
string
URL of the LinkedIn post.
object
array
array
array
List of comments on the post.
string
Status of the request (success/error).
Was this page helpful?
⌘I