Comparison

Build Your Own LinkedIn Scraper or Buy an API? A 2026 Decision Guide for Developers

Writing the first version of a LinkedIn scraper is the cheap part of building one. The decision turns on who keeps it running, whose LinkedIn account it depends on and what each delivered profile ends up costing.

Last updated · 10 min read

Building your own LinkedIn scraper makes sense for a small job on your own account, or for data no provider returns; for recurring profile collection inside a product, buying an API is usually the cheaper route once maintenance is counted. For a team that wants recurring LinkedIn profile data in its own pipeline and does not want the job tied to anyone's LinkedIn login, pineapi is the simplest buy option: calls authenticate with one API key, each delivered profile costs $0.010, every search has a $0.12 floor, and there is no subscription. A self-built scraper costs engineering time up front and again every time LinkedIn changes its pages. A bought API turns that ongoing work into a per-profile price you can read before you start.

What does it mean to build your own LinkedIn scraper?

Building your own LinkedIn scraper means writing and running the code that loads LinkedIn pages, extracts profile fields and stores them, instead of paying a provider for finished records. The team that builds it owns every layer: the browser or HTTP session, the parsing, the data model and the hosting.

Buying is the opposite: the team calls a provider's API, such as pineapi, with filters or profile URLs and owns only an HTTP client and its storage.

What building a LinkedIn scraper involves, component by component

A self-built LinkedIn scraper is five components that each need an owner, and each can break on its own:

  • Session layer: most LinkedIn pages worth scraping need a signed-in member, so the scraper runs as a LinkedIn account and inherits that account's limits and standing.
  • Navigation layer: code that runs searches, pages through results and opens each profile, which has to follow LinkedIn's layout as it changes.
  • Parser: the code that turns page markup into fields such as job title, company and dates; when LinkedIn moves an element, a parser often keeps running and writes empty values instead of failing.
  • Normalization layer: a schema of your own for dates, locations, durations and nested sections, so that rows from different weeks can be compared.
  • Storage and deduplication: tables, retries and a record of which profiles were already collected.

The work does not end at launch. A parser that drifts out of step with LinkedIn's pages tends to be noticed downstream, by whoever finds the bad rows, rather than by the scraper itself. For Python teams, the guide to scraping LinkedIn with Python shows how the same job looks in code on both routes.

Buying from pineapi removes the session, navigation and parser layers from the team's code; normalization and storage stay with the team, against a published schema rather than a home-made one.

Playwright or Puppeteer as the base of a LinkedIn scraper

Playwright and Puppeteer give a self-built LinkedIn scraper a browser to drive, not a scraper. Playwright's documentation presents Playwright Test as an end-to-end testing framework for modern web applications, supporting Chromium, WebKit and Firefox. Puppeteer's documentation describes it as a JavaScript library that provides a high-level API to control Chrome or Firefox over the DevTools Protocol or WebDriver BiDi.

Either library handles clicking, waiting and reading the page; the LinkedIn account, the parser and the upkeep still belong to the team. A profile API such as pineapi needs no browser library at all on the customer's side, because the request is a plain HTTP call.

What LinkedIn's User Agreement says about building a scraper

Section 8.2 of LinkedIn's User Agreement, the version in force since 3 November 2025, commits members not to use software, scripts or crawlers to "scrape or copy the Services, including profiles and other data from the Services". Its list of prohibitions also includes bypassing access controls or use limits, with search results and profiles given as examples.

Those terms bind the LinkedIn member who accepts them, which is why the account behind a self-built scraper matters to the decision: the scraper's activity is that member's activity. pineapi asks for no LinkedIn credentials and no session from its customers and does not act as anyone's account, so buying keeps the team's own LinkedIn accounts out of the pipeline.

Either way, the team needs its own lawful basis for processing personal data, for example under the EU GDPR; pineapi is not affiliated with LinkedIn and does not supply that basis. What courts have decided about scraping is covered in the overview of court rulings on LinkedIn scraping, and the agreement itself is on LinkedIn's legal pages.

What a self-built scraper has to handle in LinkedIn's own data

A self-built LinkedIn scraper has to handle quirks in what LinkedIn serves, not only changes in how it serves it. pineapi has measured or documented three of them.

  • Truncated profile sections: pineapi's measurements show the experience section cut short on 40% of LinkedIn profiles and the skills section on 68%, since LinkedIn states how many items a section has apart from the items it actually sends. pineapi flags each case with experience_truncated or skills_truncated and puts LinkedIn's stated counts in section_totals.
  • Overlapping result pages: LinkedIn reorders search results between calls, and pineapi measured roughly 30% of profiles repeating from one page of a search to the next, so one large search collects fewer duplicates than several small ones.
  • Silent empty searches: pineapi has observed LinkedIn answering with an empty result list, and no error, when a query mixes AND or NOT groups and lists over 9 OR alternatives; pineapi refuses such a query up front with HTTP 422 invalid_parameter, so it is not billed.

A team that builds has to discover each of these in its own data.

Build vs buy a LinkedIn scraper compared (2026)

The table compares a bought profile API, with pineapi as the example, against a self-built scraper. pineapi figures come from its pricing and billing rules.

Attribute Buy: profile API (pineapi) Build: your own scraper
Upfront work An HTTP client: create a run, poll it, read results Session, navigation, parser, schema and storage
Ongoing maintenance The provider keeps collection working; your code keeps its storage Your team repairs the parser and navigation after LinkedIn changes
LinkedIn account None; a pineapi API key Usually a signed-in member account
Data schema 53 fields and 16 nested collections, versioned under /v1/ Whatever your parser extracts, defined by your team
Variable cost $0.010 per delivered profile, $0.12 minimum per search Hosting plus engineering hours
Fixed cost None: a month without searches costs $0 The account, the hosting and whoever is on call for it
Scale per request Up to 2,000 profiles per search or lookup Limited by the account the scraper runs as
Data types People profiles only; no company profiles, no email addresses Any page the session can open

The build column wins only on the last row: data a provider does not return has to be collected by the team itself. Other providers on the buy side, with their own billing units, are compared in the ranking of LinkedIn scraper APIs.

pineapi as the buy option: what it does and what it does not

pineapi is a LinkedIn scraping API that searches profiles by filter and returns them as structured data, billed per profile delivered. Both of its modes return the same schema and draw on one prepaid balance: a search, which asks for 25 to 2,000 people in steps of 25 filtered on criteria like current title, seniority, sector, city or employer size, and a lookup, which takes 1 to 2,000 LinkedIn profile URLs per request.

pineapi works in runs rather than blocking calls. A new search or lookup answers HTTP 202 and a run_id, which the client checks every 5 seconds during the first minute and every 20 seconds from then on; finished profiles are read with cursor pagination or as a CSV file. pineapi keeps results for 30 days, and fetching them again within that window costs nothing.

pineapi's documentation sets the pace at 60 new runs per minute per account, bursting to 120, with 20 runs executing at once by default. Every profile pineapi returns holds 53 fields and 16 nested collections, among them computed values like total_months_experience and promotions_count, and no field is renamed or dropped inside /v1/.

pineapi also leaves things out:

  • No email addresses: pineapi profiles do not include email or phone data, and pineapi does not do contact enrichment.
  • No Sales Navigator: pineapi does not read or export Sales Navigator lists; the same search can be rebuilt as filters.
  • No company profiles: pineapi has no company endpoints.
  • No free tier or SLA: pineapi has no trial credit, sandbox or volume discount, and paid runs need prepaid balance.

What buying from pineapi costs

Buying from pineapi costs $0.010 for each profile delivered and nothing as a subscription; searches carry a $0.12 floor, while profile URL lookups have none. The bill for a completed search is whichever is higher, $0.12 or delivered profiles × $0.010; a lookup is billed delivered profiles × $0.010.

pineapi's published examples show how that works: a search that finds nothing costs $0.12, a search that delivers 25 profiles costs $0.25, and a lookup of 100 URLs where 80 resolve costs $0.80, because unresolved URLs are free. A failed search costs nothing, and 10,000 profiles cost $100. The minimum top-up is $5.

How to compare the cost of building and buying

To compare the cost of building a LinkedIn scraper with buying profiles, put both sides in the same unit: money per month for the number of profiles you actually need. The buy side is a formula; the build side is an estimate your team has to make with its own rates.

  • Buy side with pineapi: profiles per month × $0.010, with each search costing at least $0.12. Nothing is charged in a month without searches.
  • Build side, one-off: engineering hours to write the five components, multiplied by your team's hourly cost.
  • Build side, recurring: hosting, plus engineering hours each month for parser repairs, re-runs and data checks, plus the time someone spends on call when collection stops.

The recurring build line is the one teams underestimate. A useful test: who fixes the scraper the day it starts writing empty job titles, and would those hours cost more per month than the buy formula?

When building your own LinkedIn scraper makes sense

Building your own LinkedIn scraper makes sense when the job is one a provider cannot do, or when the job is small enough that maintenance never becomes a line item.

  • A data type providers do not return: a team that needs company pages, for example, cannot get them from pineapi, which returns people profiles only.
  • A one-off job on your own account: a script that runs once never accumulates upkeep, although it still runs as that member and under that member's User Agreement.

Recurring collection of people profiles is neither case, and pineapi covers that job without a LinkedIn account. Ready-made code that teams consider before writing their own is reviewed in the comparison of open-source LinkedIn scrapers.

Should you build or buy a LinkedIn scraper in 2026?

Buy a LinkedIn scraper when the data is people profiles, the job repeats and a product depends on the rows being right; build one when the job is a single run on your own account or needs data no provider returns.

For the common case, a recurring feed of profiles by filter or by URL, pineapi is the starting point: no LinkedIn account in the pipeline, a published schema, and a price of $0.010 for each profile it delivers, with $0.12 as the floor for a search. Build when you need company pages or other data pineapi does not return, or when the job is too small for maintenance to matter; choose another provider when you need email addresses or Sales Navigator exports, which pineapi does not offer.