Scraping Bot Animated

scrapingbot

LinkedIn Scraper API

Extract entry point for the platform as structured JSON from public LinkedIn targets. Queue a request, then retrieve the result with its responseId.

Get your API keyRead the documentation1,000 free credits per month, no card required.

Decide before you build

Endpoint
POST /scrape/data-scraper
Scrapers
linkedinProfile linkedinPost
Cost
30 credits / call
Free plan
1,000 credits / month
Call pattern
async, POST then GET
On failure
credits refunded
Response format
JSON
Concurrency
by plan tier

Launching a Social Media scrape costs 30 credits. Retrieving a pending result costs nothing; failed scrapes are refunded.

Try the LinkedIn scraper on your own targetRun a request against a public target and inspect the JSON before you integrate.

Open the live test

What you get back

linkedinProfile

Member profile

Use linkedinProfile to retrieve member profile data from a public LinkedIn target.

  • Required input: url
  • Optional input: language
  • Structured JSON once the result is ready
  • Public data only; no account login is used
linkedinPost

Single post

Use linkedinPost to retrieve single post data from a public LinkedIn target.

  • Required input: url
  • Optional input: language
  • Structured JSON once the result is ready
  • Public data only; no account login is used

Call the LinkedIn scraper

Send the scraper name with the input required by that scraper. The POST returns a responseId to poll for the final JSON.

Step 1Submit a linkedinProfile request and keep the responseId returned by the API.
bash
# POST - queue a public social media scrape
curl -X POST "https://api.scraping-bot.io/scrape/data-scraper" \
  -u "yourUsername:yourApiKey" \
  -H "Content-Type: application/json" \
  -d '{
  "scraper": "linkedinProfile",
  "url": "https://example.com/public-page",
  "language": "en"
}'
Step 2Wait a few seconds, then retrieve the linkedinProfile result with the responseId. Repeat the GET while the status is pending.
bash
# GET - retrieve the result after the POST returns a responseId
curl -G "https://api.scraping-bot.io/scrape/data-scraper-response" \
  -u "yourUsername:yourApiKey" \
  --data-urlencode "responseId=RESPONSE_ID" \
  --data-urlencode "scraper=linkedinProfile"

Code example

Authenticate with your ScrapingBot username and API key, then poll until the queued result is ready.

const auth = "Basic " + Buffer.from(
  "yourUsername:yourApiKey",
).toString("base64");

const queued = await fetch("https://api.scraping-bot.io/scrape/data-scraper", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: auth },
  body: JSON.stringify({
  "scraper": "linkedinProfile",
  "url": "https://example.com/public-page",
  "language": "en"
}),
});

const { responseId } = await queued.json();
let result;
do {
  await new Promise((resolve) => setTimeout(resolve, 5000));
  result = await fetch(
    "https://api.scraping-bot.io/scrape/data-scraper-response?" +
      new URLSearchParams({ responseId, scraper: "linkedinProfile" }),
    { headers: { Authorization: auth } },
  ).then((response) => response.json());
} while (result.status === "pending");

Run this call in two minutesCreate an account, copy your API key, then use the example above.

Get your API key

Request parameters

ParameterTypeDefaultDescription
scraperstring—One of the scraper names supported by this endpoint.
urlstring—Public page URL, including https://.
languagestring—Optional for this scraper.

Response example

Example returned by the legacy LinkedIn scraper documentation.

json
[
  {
      "followers": "3M followers",
      "activities": [
          {
              "title": "Personne, surtout pas moi, ne peut rester sourd à cette revendication de justice sociale et de rénovation de notre vie démocratique. J’ai entendu…",
              "attribution": "Posted by Emmanuel Macron",
              "img": "https://static.licdn.com/aero-v1/sc/h/51xdp0u9qm8nhegwpxoxgd0mb",
              "link": "null"
          },
          ...
      ],
      "url": "https://fr.linkedin.com/in/emmanuelmacron",
      "name": "Emmanuel Macron",
      "position": "President of the French Republic.",
      "current_company": {
          "name": "Présidence de la République",
          "link": "https://eg.linkedin.com/company/pr-sidence-de-la-r-publique?trk=public_profile_topcard-current-company"
      },
      "avatar": "https://media.licdn.com/dms/image/D4E03AQGbTdwOdlURyg/profile-displayphoto-shrink_800_800/0/1678377684180?e=2147483647&v=beta&t=f6W63jFYRFTmJefM5-FpQmRq-gW_NlpD9TKj6wU4rOE",
      "city": "Paris, Île-de-France, France",
      "following": "26 connections",
      "educations_details": "",
      "posts": [
          {
              "title": "Journée de sensibilisation à l’autisme.",
              "attribution": "By Emmanuel Macron",
              "img": "https://media.licdn.com/dms/image/D4E12AQEPEX_WFWeaHg/article-cover_image-shrink_180_320/0/1680428457830?e=2147483647&v=beta&t=O7g11RCv_HhWYasjIUkGor7OfGv9n0qKwNKRaQO1yPE",
              "link": "https://www.linkedin.com/pulse/journ%C3%A9e-de-sensibilisation-%C3%A0-lautisme-emmanuel-macron?trk=public_profile_article_view",
              "created_at": "2023-04-02T00:00:00.000Z"
          },
          ...
      ],
      "experience": [
          {
              "title": "President of the French Republic",
              "subtitle": "Présidence de la République",
              "subtitleURL": "https://eg.linkedin.com/company/pr-sidence-de-la-r-publique?trk=public_profile_experience-item_profile-section-card_subtitle-click",
              "location": "",
              "description": "",
              "duration": "May 2017 - Present 6 years",
              "start_date": "May 2017",
              "end_date": "Present",
              "duration_short": "6 years"
          },
          ...
      ],
      "languages": [
          {
              "title": "Français",
              "subtitle": "Native or bilingual proficiency",
              "meta": ""
          },
          {
              "title": "Anglais",
              "subtitle": "-",
              "meta": ""
          }
      ],
  }
]

Credits, failures and limits

CaseCreditsNotes
Launch a scrape30 creditsConsumed when a result is ready.
Result not readyNot consumedThe API returns a pending status; retry after a few seconds.
Failed, blocked or timed-out scrapeRefundedCredits are returned for an unsuccessful request.

LinkedIn API or Raw HTML scraper?

LinkedIn APIRaw HTML scraper
Endpoint/scrape/data-scraper/scrape/raw-html
ReturnsEntry point for the platform JSONRendered page HTML
FlowAsynchronous: POST then GETOne synchronous request
Starting cost30 credits1 credit
Use it whenYou need parsed LinkedIn dataYou need your own extraction logic

Questions about the LinkedIn API

Which LinkedIn scraper names can I use?
This page supports linkedinProfile and linkedinPost. Send the exact name in the scraper field.
Why does the API return a responseId?
Social Media requests are asynchronous. The responseId lets you retrieve the result without holding the initial request open.
What if the result is still pending?
Wait a few seconds and repeat the GET request. A pending response does not consume credits.
Does this scraper access private account data?
No. It is intended for public pages and does not sign in to a social media account to access private data.

Source: ScrapingBot API documentation.

Other social media scrapers

Browse the Social Media category for the complete list of guides, or visit the ScrapingBot blog for implementation guides.

4.9
★★★★★
133 Google reviews

Trusted by developers and social media teams.
Customer reviews apply to ScrapingBot's service overall, not specifically to this scraper.

Start scraping LinkedIn today

1,000 free credits every month. No card required, cancel anytime.