100 free credits — no credit card required.Start building
Logo
Back to blog

How to Scrape LinkedIn in 2026: A Developer's Guide

By Friday··12 min read

Scrape LinkedIn profiles, companies, and posts in 2026: why the official API is partner-gated, the DIY and legal realities of the most litigated network, and a working API tutorial with real code and a real response.

How to Scrape LinkedIn in 2026: A Developer's Guide

The quickest way to scrape LinkedIn in 2026 is a single GET request to a data API, no logged-in session and no browser extension. Here is the whole thing:

curl "https://www.socialcrawl.dev/v1/linkedin/profile?url=https://www.linkedin.com/in/williamhgates" \
  -H "x-api-key: sc_your_api_key_here"

That returns a normalized LinkedIn profile: name, headline, location, and enrichment flags. The rest of this guide is the honest version, and LinkedIn deserves more honesty than most: its official API is effectively closed, it is the most aggressive network about enforcing against scraping, and it is the company at the center of the case law everyone cites. Below: what the official API allows, what a DIY LinkedIn scraper really costs, the legal picture, and how to pull profiles, companies, and posts through a real endpoint with runnable Python, Node, and curl.

Stack: Python 3.10+ or Node 18+ · requests / fetch · a SocialCrawl API key (free tier: 100 credits, no card)


Can you get LinkedIn data from the official API?

For scraping public profiles, no.

LinkedIn does have a developer platform, but it is partner-gated by design. The programs that exist, Sign In with LinkedIn, the Marketing Developer Platform, and Talent Solutions, grant narrow, purpose-specific access: authenticating a user into your app, managing ad campaigns you run, or integrating with LinkedIn's recruiting products under an approved partnership. None of them gives you a general endpoint that takes an arbitrary profile URL and returns that person's data. There is no official "read any public profile" API, and LinkedIn does not intend for there to be one.

So for lead enrichment, recruiting research, competitor headcount tracking, or company monitoring on accounts you do not own, the official platform does not cover it. Your real choices are a DIY scraper or a third-party data API.

Should you build your own LinkedIn scraper?

LinkedIn is the hardest of the big platforms to scrape yourself, and the riskiest. Be clear-eyed about all three dimensions.

Anti-bot reality. LinkedIn requires login for almost anything useful, aggressively fingerprints sessions, rate-limits hard, and issues account restrictions and permanent bans to accounts it flags as automated. A DIY scraper typically burns through logged-in accounts and residential proxies, and each banned account is a real cost, not just a retry.

Maintenance. The authenticated DOM and internal endpoints change often, and detection tightens continuously, so a scraper that works this month can be blocked next month. You are maintaining an adversarial system against a company that actively invests in stopping you.

Legal considerations. LinkedIn is the network the case law is actually about. In hiQ Labs v. LinkedIn, US courts found that scraping publicly accessible data did not violate the Computer Fraud and Abuse Act, but the same litigation also saw LinkedIn prevail on breach-of-contract grounds tied to its User Agreement, which prohibits automated collection. The honest summary: scraping truly public data has meaningful legal protection in the US, but LinkedIn's terms still create real contractual exposure, and profile data is personal data under GDPR and CCPA. No API can promise to get around LinkedIn's User Agreement. What a data API removes is the anti-bot and account-burning problem; the legal and product questions remain yours. Read the legal and technical guide to social media scraping, and for LinkedIn specifically, talk to a lawyer before anything commercial.

The rest of this guide takes the API route: public LinkedIn data in a normalized shape, so you never operate or burn logged-in accounts yourself.

Setting up: one key, one request

Get an API key at socialcrawl.dev, sign up, then open Dashboard → API Keys. Keys look like sc_ plus 32 random bytes, shown in full once, so copy it immediately. New accounts get 100 free credits that never expire. LinkedIn is a Premium-tier surface, so profile and company calls cost 5 credits each, which the free tier covers for 20 reads.

Keep the key out of source control:

export SOCIALCRAWL_API_KEY=sc_your_api_key_here

To preview the response shape before writing code, paste a LinkedIn profile or company URL into the Visual Explorer.

Scraping a LinkedIn profile

The endpoint is GET /v1/linkedin/profile. It takes one required parameter, url, the full LinkedIn profile URL, and returns the normalized author object plus a LinkedIn-specific ext block.

import os
import requests

API_KEY = os.environ["SOCIALCRAWL_API_KEY"]
BASE = "https://www.socialcrawl.dev/v1"

resp = requests.get(
    f"{BASE}/linkedin/profile",
    params={"url": "https://www.linkedin.com/in/williamhgates"},
    headers={"x-api-key": API_KEY},
    timeout=30,
)
author = resp.json()["data"]["author"]
print(author["display_name"], "-", author["bio"])

The same call in Node:

const url = "https://www.linkedin.com/in/williamhgates";
const res = await fetch(
  "https://www.socialcrawl.dev/v1/linkedin/profile?url=" + encodeURIComponent(url),
  { headers: { "x-api-key": process.env.SOCIALCRAWL_API_KEY } },
);
const { data } = await res.json();
console.log(data.author.display_name, "-", data.author.bio);

Here is a real, unmodified response captured with a live dev key in July 2026 (avatar URL truncated):

{
  "success": true,
  "platform": "linkedin",
  "endpoint": "/v1/linkedin/profile",
  "data": {
    "author": {
      "id": "williamhgates",
      "username": "williamhgates",
      "display_name": "Bill Gates",
      "avatar_url": "https://media.licdn.com/dms/image/...",
      "bio": "Chair, Gates Foundation and Founder, Breakthrough Energy",
      "url": "https://www.linkedin.com/in/williamhgates",
      "location": "Seattle, Washington, United States",
      "ext": {
        "urn": "ACoAAA8BYqEBCGLg_vT_ca6mMEqkpp9nVffJ3hc",
        "is_top_voice": true,
        "is_premium": true
      }
    },
    "computed": {
      "content_category": "other"
    }
  },
  "credits_used": 5,
  "credits_remaining": 184256,
  "request_id": "req-HNHz4ZDcFhTlGBHB"
}

The core author fields (username, display_name, bio, location, url) are the same names every other platform returns, so shared parsing code works. LinkedIn-specific extras, like the profile urn, is_top_voice, and is_premium, land in the ext block so they never collide with the unified schema.

Scraping LinkedIn companies and posts

Company pages use a parallel endpoint, GET /v1/linkedin/company, taking the company url:

resp = requests.get(
    f"{BASE}/linkedin/company",
    params={"url": "https://www.linkedin.com/company/microsoft"},
    headers={"x-api-key": API_KEY},
    timeout=30,
)
company = resp.json()["data"]["author"]
print(company["display_name"], company["followers"], "followers")

That returns the company name, follower count, description, and location in the same envelope (also 5 credits). To pull a company's activity, GET /v1/linkedin/company/posts lists its posts, and GET /v1/linkedin/search/posts searches posts by keyword, both paginating with the standard cursor.

Pagination, rate limits, and credits

Three operational facts, all from the live API:

  • Pagination is a cursor contract. Paginated LinkedIn endpoints (company posts, post search) carry data.next_cursor; pass it back verbatim as the cursor parameter and stop when it is null. The pagination page lists the exact parameter per endpoint.
  • There is no requests-per-minute quota. The only ceiling is 50 concurrent requests per API key; exceed it and you get a 429 CONCURRENCY_LIMIT envelope with no credits charged.
  • Failures refund credits. Errors use the same envelope with success: false. Empty-upstream 404s and transient 502/503s refund automatically, which matters more here because LinkedIn calls are 5 credits each. The full matrix is in the error handling docs.

LinkedIn is Premium-tier: profile and company calls are 5 credits, and paginated reads are 5 credits per page, so budget accordingly. The free 100 credits cover 20 reads; after that, pricing is pay-as-you-go and never expires (£15 for 2,500 credits, £49 for 20,000).

Where to go from here

You now have LinkedIn profiles, companies, and posts in one schema, without operating or burning logged-in accounts. Next steps:

Frequently asked questions

This is the most litigated corner of scraping. In hiQ Labs v. LinkedIn, US courts found that scraping publicly accessible data did not violate the Computer Fraud and Abuse Act, but LinkedIn separately prevailed on breach-of-contract grounds tied to its User Agreement, which prohibits automated collection. So public data has real legal protection in the US, while LinkedIn's terms still create contractual exposure, and profile data is personal data under GDPR and CCPA. No API can get around LinkedIn's User Agreement. Read the legal and technical guide and talk to a lawyer before anything commercial.

Can you scrape LinkedIn without an account?

With a data API, you never operate a LinkedIn account yourself, the API runs its own collection infrastructure and returns public data through your API key. A DIY scraper, by contrast, needs logged-in accounts for almost everything on LinkedIn, and those accounts get restricted or banned when flagged as automated, which is the single biggest reason teams move to an API.

Is there an official LinkedIn API for scraping profiles?

No. LinkedIn's developer platform is partner-gated (Sign In with LinkedIn, Marketing Developer Platform, Talent Solutions) and scoped to authentication, ad management, and approved recruiting integrations. There is no official endpoint that returns an arbitrary public profile or company, which is why third-party data APIs exist for that use case.

How do you scrape LinkedIn company data?

Use GET /v1/linkedin/company with the company URL for name, follower count, and description, then GET /v1/linkedin/company/posts to list its activity. Both return the unified schema; the company call is 5 credits and post pagination is 5 credits per page.

Why does LinkedIn scraping get accounts banned?

Because LinkedIn requires login for most data and actively detects automation, then restricts or permanently bans accounts it flags. A DIY scraper drives those logged-in sessions directly, so it burns accounts. A data API keeps that risk on its own infrastructure rather than your credentials.

What is the best language for scraping LinkedIn?

Any language that can make an HTTP request. The endpoints are single authenticated GETs, so Python with requests, Node with fetch, or a plain curl command work identically, with the same envelope and cursor pagination.

How much does it cost to scrape LinkedIn?

On SocialCrawl, LinkedIn is Premium-tier at 5 credits per profile, company, or paginated page. The free tier is 100 credits (no card, never expires), which covers 20 reads; after that £15 buys 2,500 credits and £49 buys 20,000, pay-as-you-go with no expiry. DIY scraping has no per-call fee but costs proxies, burned accounts, and maintenance time.

Topics
#linkedin-scraper#linkedin-data-scraper#how-to-scrape-linkedin#scrape-linkedin#linkedin-scraper-api#linkedin-profile-scraper#linkedin-scraping#linkedin-api

Related posts

🤖 AI agent or LLM? Read this page as markdown