LinkedIn Scraper or API: What You Can Get
A LinkedIn scraper is a program that loads LinkedIn pages in a browser and reads company details, job postings or posts off the screen. It breaks when the page changes, and if it runs inside a logged-in session it acts under an account and that account's terms. The other route is a set of LinkedIn endpoints that return company pages, jobs and public posts as JSON at 1 credit per successful call, under restricted-endpoint terms. This post compares the two and gives a verdict per use case, for company and job data, not people.
What does building a LinkedIn scraper involve?
A LinkedIn scraper is browser automation, not a single HTTP request. You need a headless browser such as Playwright or Selenium, a script that opens each company page, job or post, waits for it to render and reads the text into fields, and a store for the results. Every one of those steps is code you own, and every change to the page's markup is a change you make in your parser.
The first decision is whether the scraper runs logged out or logged in. Logged out, it sees only what a visitor without an account sees, which may not include the fields you want. Logged in, it runs inside a session tied to an account, so every page it loads is a page that account loaded. That puts your data pipeline and the account in the same basket: if the account is restricted, the pipeline stops, and the use you made of it sits under the agreement the account holder accepted.
Then there's volume. A browser per job takes memory and time, so a scraper that tracks hundreds of companies a week needs scheduling, retries and monitoring before it's reliable. Large sites also limit automated traffic. If your scraper starts seeing blocks or challenge pages, stop: rotating proxies or solving challenges to get past a site's protections isn't something we'd recommend.
Read LinkedIn's own User Agreement before you automate anything against the site, and get legal advice for commercial use. Whether a scraper is permitted is a question for those terms and the law where you operate, not for this post.
What do the LinkedIn endpoints return?
The LinkedIn API has 11 endpoints, all GET, each costing 1 credit per successful call. For company and job data, the ones that matter are company pages, company posts, job search, single jobs, public post search, single posts, post transcripts, and the ads search and ad detail pair. Each returns JSON with named fields; there's no recorded sample for this API yet, so run a call in the playground on the LinkedIn API page to see the exact fields before you build on them.
| Endpoint | Returns | Required | Optional |
|---|---|---|---|
/v1/linkedin/company |
Company | none | url, company_id, use_cache, maximum_cache_age |
/v1/linkedin/company-posts |
Company posts | slug |
none |
/v1/linkedin/jobs-search |
Jobs search | query |
num, start, page, hl, gl, dateRestrict, sort and more |
/v1/linkedin/job |
Job | url |
use_cache, maximum_cache_age |
/v1/linkedin/posts-search |
Posts search | query |
num, start, page, hl, gl, dateRestrict, sort and more |
/v1/linkedin/post |
Post | url |
use_cache, maximum_cache_age |
/v1/linkedin/post-transcript |
Post transcript | none | url, activity_id |
/v1/linkedin/ads-search |
Ads search | keyword |
countries[], dateOption, startdate, enddate, accountOwner, pagination_token |
/v1/linkedin/ads-detail |
Ads detail | ad_id |
none |
A company lookup is one request with the company page's URL:
curl "https://api.perceptlayer.com/v1/linkedin/company?url=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fmicrosoft%2F" \
-H "X-API-Key: $API_KEY"
A job search takes a query, and sort accepts date, date:r or date:d:
curl "https://api.perceptlayer.com/v1/linkedin/jobs-search?query=data+engineer+berlin&sort=date" \
-H "X-API-Key: $API_KEY"
Ad research works the same way, with a keyword and an optional dateOption of last-30-days or custom-date-range:
curl "https://api.perceptlayer.com/v1/linkedin/ads-search?keyword=analytics+platform" \
-H "X-API-Key: $API_KEY"
Several endpoints take a use_cache boolean and a maximum_cache_age integer. The API documents their types and nothing more, so test how they behave in the playground before you rely on them for freshness.
Which terms apply to the LinkedIn endpoints?
The LinkedIn endpoints are restricted endpoints, because they return social media content. They work only after you accept the restricted-endpoint terms in your dashboard. The error codes include restricted_endpoint (403) for these endpoints. The terms add to the main terms of service and set out what you confirm when you use social or personal data.
In short, you confirm that you have a lawful basis for processing any personal data you receive and collect only what you need for that purpose. You confirm you won't use the data to identify, track or contact individuals without their consent where consent is required. You keep personal data only as long as you need it, keep it secure and act on access, correction, deletion and objection requests. And you respect content creators' rights and the platform terms that legally apply to you.
That's why this post is about companies, jobs and public posts in aggregate. Lead lists of people, outreach sequences and profile enrichment are out of scope here, and the restricted-endpoint terms don't support them. Data is collected from publicly available sources and returned as found at the time of the call; that something is public doesn't by itself give you the right to reuse it.
How do a scraper and the endpoints compare?
A scraper gives you control over exactly which page elements you read and no per-call bill, at the cost of browser upkeep, account risk and terms you have to interpret yourself. The endpoints give you JSON with named fields and no browser, at 1 credit per successful call and under restricted-endpoint terms. Neither route makes personal data fair game.
| DIY scraper, logged out | DIY scraper, logged in | LinkedIn endpoints | |
|---|---|---|---|
| Setup | Headless browser, parsers | Headless browser, parsers, an account session | API key in the X-API-Key header; accept restricted-endpoint terms |
| What you get | What a logged-out visitor sees | What the account sees | Company, company posts, jobs, public posts, transcripts, ads as JSON |
| Maintenance | High: selectors and flows break | High, plus session handling | Low: no browser or parser to maintain |
| Account risk | None tied to an account | Collection depends on one account | None tied to a LinkedIn account |
| Speed | One browser per job | One browser per job | 1 request a second free, at least 5 a second paid |
| Errors | Whatever the page shows | Whatever the page shows | HTTP status and a JSON code, message, request_id |
| Cost | Your hosting and time | Your hosting, time and the account | 1 credit per successful call; failed calls cost 0 |
What does tracking 100 companies cost?
On the endpoints, cost follows calls. Tracking 100 competitor companies weekly, with one company call and one company-posts call each, is 100 × 2 × 4 weeks × 1 credit = 800 credits a month. The 100 free credits you get after verifying an email address cover a first weekly run for 50 companies; the Starter pack's 10,000 covers all 100 for a year.
Add hiring signals: 20 jobs-search queries a day is 20 × 30 × 1 credit = 600 credits a month, and fetching 50 job postings a week with job is 50 × 4 × 1 credit = 200 credits. The three together come to 1,600 credits, inside the Starter pack's 10,000. Failed calls return X-Credits-Used: 0, so retries after a 429 or 503 only cost the call that succeeds. See pricing for what credits cost.
Which route should you choose?
Choose by what you'll collect and why, because that decides which terms apply and what the job costs to run. The verdicts below assume a recurring job about companies, roles or topics; for a one-off look at five company pages, open them in a browser.
- Competitor monitoring (what rivals post and how their company pages change): use
companyandcompany-postson a weekly schedule. Store the company-level fields you need. - Hiring trends by company, role or city: use
jobs-searchwith your queries andjobfor the postings you keep. Count postings by role and location; you don't need the people behind them. The API guides cover other job and company sources. - What's being said about a topic: use
posts-searchandpost, and analyse posts in aggregate: volume, themes, which companies post. Leave authors' names and profile links out of what you store. - Video posts you want as text: use
post-transcriptwith a posturloractivity_id. - Ad research: use
ads-searchwith akeywordand filters such ascountries[]and a date range, thenads-detailwith anad_id. - Lead generation or outreach to individuals: neither route. The restricted-endpoint terms don't support it, and a scraper doesn't make it permitted.
- Learning how scraping works: build a scraper against a practice site, not LinkedIn.
If LinkedIn offers an official integration that covers your use case, such as managing your own company page, read its terms and use it: data you're granted directly is the clearer path. For the same scraper-or-endpoint question on another site, see Google Maps Scraper or Places Data API.
To compare before you decide, accept the restricted-endpoint terms in your dashboard, then run company with a company page URL in the playground on the LinkedIn API page. When the fields fit, get a free API key.
APIs in this post
Frequently asked questions
Is scraping LinkedIn legal?
It depends on where you operate, what you collect and how you use it, so read LinkedIn's own User Agreement before you automate anything against the site. Company and job information is lower risk than personal data; profiles and names are personal data in many jurisdictions. Get legal advice for commercial use, and don't get around blocks or challenges.
Can I get LinkedIn company data without a scraper?
Yes. GET /v1/linkedin/company takes a company page url or a company_id and returns the company's data as JSON, and GET /v1/linkedin/company-posts takes a company slug and returns its posts. Each successful call costs 1 credit. Both are restricted endpoints, so accept the restricted-endpoint terms in your dashboard first.
Why does a LinkedIn call return a 403?
The LinkedIn endpoints are restricted, and the error codes include restricted_endpoint (403). Accept the restricted-endpoint terms in your dashboard and the call works with the same key. Like every error, the response has an HTTP status and a JSON body with code, message and request_id, and it costs nothing. The errors docs list every code.
Can I use LinkedIn data for lead generation?
Not through these endpoints. The restricted-endpoint terms require a lawful basis for any personal data you process and rule out using it to identify, track or contact individuals without consent where consent is required. Use the LinkedIn endpoints for company pages, job postings, public posts in aggregate and ads, and keep people's names and profile links out of what you store.
Can an AI agent read LinkedIn company pages?
Yes. Through the MCP server at https://perceptlayer.com/mcp, an agent finds the LinkedIn endpoints with search_endpoints, reads their parameters with get_endpoint (both free) and runs them with call_endpoint, which spends credits only on success and reports the credits used and remaining. The restricted-endpoint terms still apply to what the agent collects.