All posts

How to Scrape LinkedIn Data: Rules, APIs and Safe Methods

November 9, 2026

Short answer

To scrape LinkedIn data with the least risk, stick to public company pages, public posts and the ad library, because LinkedIn's own APIs only cover a signed-in member's basic profile and Pages you administer. LinkedIn's User Agreement bans scraping and bots, and in hiQ v. LinkedIn a federal court held those terms enforceable in November 2022, so collecting while logged in carries real contract risk.

LinkedIn is the strictest of the big networks about scraping, and the most litigated. So this guide starts with the rules, then covers what the official APIs give you, then shows methods for the data most teams actually need: company pages, posts and ads. For a comparison of tools, see best LinkedIn scrapers.

What LinkedIn data is public

DataTypically visible logged offRisk level
Company pagesName, industry, size range, headquarters, description, follower count, websiteLow: business data
Public postsText, author, time, reactions, comments count, mediaLow to medium
Ads in the LinkedIn Ad LibraryCreative, advertiser, datesLow: published for transparency
Job postingsTitle, company, location, descriptionLow to medium
Member profilesWhatever the member set as publicHigh: personal data, GDPR and similar laws apply
Connections, messages, private profilesNoOff limits

Member visibility settings vary, so the same profile can show more or less depending on who is looking. Never log in to see more.

What LinkedIn's official APIs allow

LinkedIn's getting access page says "Most permissions and partner programs require explicit approval from LinkedIn." The only open, self-serve permissions are:

PermissionWhat it does
profile (Sign in with LinkedIn)The signed-in member's own name, headline and photo
emailThe signed-in member's primary email
w_member_social (Share on LinkedIn)Post, comment and like on behalf of the member

Everything else needs approval: the Advertising API for marketing partners, Sales Navigator permissions for approved SNAP partners, and talent programs for ATS partners. Compliance permissions are closed. None of them lets a new app read arbitrary public profiles or other companies' posts. Details are in Is the LinkedIn API free? and LinkedIn Advertising API.

What LinkedIn's terms say

The User Agreement, effective 3 November 2025, lists in section 8.2 that you may not "Develop, support or use software, devices, scripts, robots or any other means or processes" to scrape or copy the Services, including profiles and other data, and may not "Use bots or other unauthorized automated methods to access the Services". If you have a LinkedIn account, you agreed to this.

The hiQ v. LinkedIn case, briefly

  • 18 April 2022. On remand from the Supreme Court, the Ninth Circuit again upheld a preliminary injunction that stopped LinkedIn from blocking hiQ's access to public profiles, finding hiQ had raised serious questions about whether LinkedIn could use the Computer Fraud and Abuse Act against it (opinion).
  • 4 November 2022. The district court ruled that LinkedIn's terms prohibiting scraping and fake profiles were enforceable against hiQ as a contract.
  • December 2022. The parties agreed to a $500,000 judgment against hiQ and a permanent injunction requiring it to stop scraping LinkedIn and destroy the code and data built from it (National Law Review).

The lesson most lawyers draw: reading public pages may not be "hacking", but if you agreed to the terms, a breach of contract claim can still win. hiQ also used fake profiles, which made things worse.

This is not legal advice. Terms and law change, and the answer depends on where you are and what you do with the data. Our guide to the main web scraping cases has the background.

Method 1: track company pages weekly

Company pages change slowly, so a weekly snapshot is enough. Store each answer whole, then compare it to last week's. This flattening diff works on any JSON, so you don't have to hard-code field names:

import json, datetime, pathlib, requests

KEY = "YOUR_KEY"
COMPANIES = ["https://www.linkedin.com/company/stripe/"]
today = datetime.date.today().isoformat()

def flat(d, prefix=""):
    out = {}
    for k, v in (d or {}).items():
        if isinstance(v, dict):
            out.update(flat(v, prefix + k + "."))
        elif not isinstance(v, list):
            out[prefix + k] = v
    return out

for url in COMPANIES:
    r = requests.get("https://scrapeio.com/v1/linkedin/company", params={"url": url},
                     headers={"x-api-key": KEY}, timeout=60).json()
    if not r.get("success"):
        continue
    slug = url.rstrip("/").split("/")[-1]
    folder = pathlib.Path("snapshots", slug)
    folder.mkdir(parents=True, exist_ok=True)
    old = sorted(folder.glob("*.json"))
    (folder / (today + ".json")).write_text(json.dumps(r["data"]))
    if old:
        a, b = flat(json.loads(old[-1].read_text())), flat(r["data"])
        for key in sorted(set(a) | set(b)):
            if a.get(key) != b.get(key):
                print(slug, key, a.get(key), "->", b.get(key))

Changes worth a human look: employee count jumps of more than 10% in a quarter, a new headquarters, a rewritten tagline. Our company page scraper guide lists what each signal usually means.

Method 2: collect public posts by company or keyword

  1. Pull a company's recent posts by page URL, then each post by URL when you need full detail.
  2. Search public posts by keyword with a date filter (last day, week, month or year) to find who talks about a topic.
  3. Compare posts by reactions per 1,000 followers, not raw reactions, so big and small companies sit on one scale.
  4. For video posts, pull the transcript instead of watching.

The LinkedIn post scraper guide has a method for reverse-engineering top posts on a topic.

Method 3: research ads in the Ad Library

LinkedIn publishes ads in a public Ad Library. Search by advertiser or keyword, then open each ad for its creative and dates. See LinkedIn Ad Library scraper for a full method.

Profiles: do less

If your project needs people data, write down why, keep only the fields that serve that purpose, and set a deletion date. Under GDPR, public data is still personal data, and the people concerned have rights to be told (Article 14) and to object (Article 21). Enrich a CRM record you already have instead of building a database of strangers.

A checklist before you collect

  1. Use no LinkedIn account in your pipeline, and no fake profiles.
  2. Prefer company, post and ad data over member profiles.
  3. Store the source URL and pull date on every row.
  4. Respect deletions: if a post or profile disappears, delete your copy.
  5. Rate-limit yourself, and stop if a source tells you to.

Doing it with ScrapeIO

ScrapeIO reads public LinkedIn data with no LinkedIn account on your side: the LinkedIn company API, company posts API, post search API and Ad Library search API, each 1 credit a call. The LinkedIn platform page lists all of them, and the LinkedIn MCP server lets an AI agent call them.

FAQ

Is it legal to scrape LinkedIn?

LinkedIn's terms forbid it, and a court enforced those terms against hiQ in 2022. Reading public pages without an account is a different situation from logged-in scraping, but the answer depends on your country and use. Ask a lawyer.

Can LinkedIn ban you for scraping?

Yes. Its terms let it restrict accounts that use bots. That is one more reason to keep personal accounts out of any data pipeline.

Does LinkedIn have an API for profiles?

Only for the signed-in member's own name, headline, photo and email. Matched public profile data is limited to approved Sales Navigator partners.

Can I scrape LinkedIn without an account?

Company pages, many public posts and the Ad Library are visible logged off, and hosted APIs read them without your account.

What LinkedIn data is safest to collect?

Company pages, public company posts and ads. They describe businesses, not people.

Sources

Checked on 9 November 2026 from each vendor's own pages. Prices and limits change; follow the links before you decide.

100 free credits, no card. Credits never expire.

Get API key