Skip to main content
GET
/
v1
/
linkedin
/
posts
/
{post_slug}
Get Post
curl --request GET \
  --url https://api.scrapebadger.com/v1/linkedin/posts/{post_slug} \
  --header 'X-API-Key: <x-api-key>'
import requests

url = "https://api.scrapebadger.com/v1/linkedin/posts/{post_slug}"

headers = {"X-API-Key": "<x-api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-Key': '<x-api-key>'}};

fetch('https://api.scrapebadger.com/v1/linkedin/posts/{post_slug}', 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.scrapebadger.com/v1/linkedin/posts/{post_slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-api-key>"
],
]);

$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.scrapebadger.com/v1/linkedin/posts/{post_slug}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-Key", "<x-api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.scrapebadger.com/v1/linkedin/posts/{post_slug}")
.header("X-API-Key", "<x-api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.scrapebadger.com/v1/linkedin/posts/{post_slug}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<x-api-key>'

response = http.request(request)
puts response.read_body
{
  "post": {
    "post_id": "<string>",
    "url": "<string>",
    "type": "<string>",
    "author_name": "<string>",
    "author_url": "<string>",
    "title": "<string>",
    "text": "<string>",
    "published_at": "<string>",
    "like_count": 123,
    "comment_count": 123,
    "comments": [
      {}
    ]
  }
}
Fetch a public LinkedIn post by its post_slug (the activity slug from the post URL). Returns the author, body text, reaction and comment counts, and top-level comments. Credits: 5

Authorization

X-API-Key
string
required
Your ScrapeBadger API key.

Path Parameters

post_slug
string
required
Post slug, e.g. activity-7212345678901234567.

Query Parameters

country
string
default:"us"
Country/locale for the request.

Response

post
object
The Post.

Example

curl "https://api.scrapebadger.com/v1/linkedin/posts/activity-7212345678901234567" \
  -H "X-API-Key: YOUR_API_KEY"
const res = await fetch(
  "https://api.scrapebadger.com/v1/linkedin/posts/activity-7212345678901234567",
  { headers: { "X-API-Key": process.env.SCRAPEBADGER_API_KEY } },
);
const { post } = await res.json();
import requests

res = requests.get(
    "https://api.scrapebadger.com/v1/linkedin/posts/activity-7212345678901234567",
    headers={"X-API-Key": "YOUR_API_KEY"},
)
post = res.json()["post"]
Response
{
  "post": {
    "post_id": "7212345678901234567",
    "url": "https://www.linkedin.com/posts/activity-7212345678901234567",
    "type": "social",
    "author_name": "Satya Nadella",
    "author_url": "https://www.linkedin.com/in/satyanadella",
    "title": null,
    "text": "Thrilled to share what our teams have been building this quarter…",
    "published_at": "2026-07-08T15:30:00Z",
    "like_count": 48200,
    "comment_count": 1320,
    "comments": [
      {
        "author": "Jane Doe",
        "author_url": "https://www.linkedin.com/in/jane-doe",
        "text": "Congratulations to the whole team!",
        "published_at": "2026-07-08T16:02:00Z",
        "like_count": 84
      }
    ]
  }
}