Everyone in B2B needs profile data eventually: enriching a lead list, vetting a candidate, watching a market's job titles shift. The data sits in plain sight on LinkedIn, and getting it out programmatically is famously miserable. This post covers the DIY route, why it decays, and the shortcut I use: the LinkedIn Profile API on Apify, which takes public profile URLs and returns clean, structured JSON.
Disclosure: the Apify links in this post are affiliate links. If you run the Actor, I may earn a referral commission at no extra cost to you.
Does LinkedIn have a public profile API?
Officially, yes; practically, no. LinkedIn's APIs sit behind partner programs with approval processes aimed at large integrations, and none of them offer a general-purpose "give me this person's profile" endpoint for ordinary developers. That is why a LinkedIn profile scraper you call like an API is the working answer: send one or many public profile URLs, get one structured record back per person.
What the LinkedIn Profile API returns
The LinkedIn Profile API returns each public profile as structured JSON: name, headline, about, location, currentCompany, currentTitle, experience[], education[], followers, and connections.
| Field | Example | Notes |
|---|---|---|
name |
"Satya Nadella" | Plus firstName and lastName
|
headline |
"Chairman and CEO at Microsoft" | The line under the name |
currentCompany |
"Microsoft" | With currentTitle alongside |
experience[] |
roles with companies and dates | Work history, plus pastCompanies[]
|
education[] |
schools and degrees | Education history |
followers |
11200000 |
With connections as its own field |
You also get about, location, avatar, publicUrl, and a short summary per profile. One field worth flagging up front: email is always null. This is a profile scraper, not an email finder.
Who this is for
Sales and RevOps teams enriching CRM records with live titles and companies, recruiters building candidate lists from sourced URLs, and analysts or founders tracking how teams at competitor companies change shape.
The manual way, and where it breaks
The DIY route is a headless browser logged into an account, navigating profile pages and parsing a thicket of obfuscated class names. It breaks in every direction at once: the markup churns, the anti-automation systems flag the account, and the account you burned was probably yours. I tried this years ago with a throwaway profile and it lasted four days. Maintaining a LinkedIn scraper in-house is a part-time job with a firing risk attached.
The faster way: run the LinkedIn Profile API
Apify Console
- Open the LinkedIn Profile API and click Try for free.
- Paste one or more public profile URLs into
profileUrls. - Run it and download the dataset as JSON, CSV, or Excel.
REST
curl -X POST "https://api.apify.com/v2/acts/johnvc~linkedin-profile-api/runs?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "profileUrls": ["https://www.linkedin.com/in/satyanadella"] }'
Run endpoint reference: the Apify API docs.
Scrape LinkedIn profiles in Python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("johnvc/linkedin-profile-api").call(
run_input={
"profileUrls": [
"https://www.linkedin.com/in/satyanadella",
"https://www.linkedin.com/in/jeffweiner08",
]
}
)
for profile in client.dataset(run["defaultDatasetId"]).iterate_items():
print(profile["name"], "|", profile["currentTitle"], "@", profile["currentCompany"])
The task LinkedIn profile data API for Python carries a runnable version of this exact setup.
Bulk scrape profiles from a URL list
Most real jobs start with a spreadsheet of URLs, not one profile. Bulk scrape LinkedIn profiles from a URL list shows the batch pattern, with collection chunked and capped so a long list cannot run away with your budget.
Turn one profile into clean JSON
For a single lookup, two tasks show the minimal path: Extract LinkedIn profile data to JSON and Scrape LinkedIn profiles to structured JSON. Paste a URL, get the record.
Enrich a lead list
Titles and companies go stale faster than any CRM admits. LinkedIn profile enrichment API is the enrichment loop: feed in the URLs you already have, write back current currentTitle and currentCompany.
Monitor employee profiles for flight risk
Headline and title changes are a leading indicator. Monitor employee LinkedIn profiles for flight risk runs a fixed URL list on a cadence and lets you diff the results.
Run it inside n8n
No-code pipelines work too: Scrape LinkedIn profiles in an n8n workflow wires the Actor into an n8n flow, from trigger to sheet.
Use it from Claude and other MCP clients
The Actor is MCP-ready, so Claude, Claude Code, and Cursor can fetch profile data as a tool call: "pull these five profiles and summarize who has changed jobs since last quarter" becomes one prompt. The task Get LinkedIn profile data in Claude via MCP has the setup, and you can read more about Claude and Claude Code at claude.ai.
FAQ about scraping LinkedIn profiles
Is it legal to use a LinkedIn profile scraper?
This Actor collects only publicly visible profile data, and courts have generally treated public-data scraping differently from bypassing logins. That said, profile data is personal data under rules like GDPR and CCPA, so what you store and how you use it still matters. I am not your lawyer; if you are building a product on this, ask one.
How much does the LinkedIn profile scraper cost?
It bills per profile collected, so a 50-URL list costs 50 events and nothing more. New Apify accounts include free platform credit, which covers a first enrichment batch.
Does the scraper return email addresses?
No, and this is deliberate: email is always null in the output. It is a profile scraper for public fields like name, headline, experience, and education, not an email finder. Pair it with a dedicated enrichment source if you need contact data.
Can Claude or ChatGPT use this LinkedIn scraper?
Claude, Claude Code, and Cursor can, through the Apify MCP server, which exposes the Actor as a callable tool. The agent sends profile URLs and reasons over the returned JSON in the same conversation.
Can I schedule the scraper to watch profiles for changes?
Yes, that is the monitoring pattern behind the flight-risk task: save a URL list as a task, attach an Apify schedule, and compare runs over time. Start from the LinkedIn Profile API.
Can the scraper export profiles to a spreadsheet?
Yes. Every run writes to an Apify dataset, and datasets download as CSV or Excel as well as JSON, so the path from URL list to spreadsheet is two clicks.
More from Truffle Pig Data
Profiles are one of three LinkedIn surfaces I cover with the same clean-JSON approach: the LinkedIn Posts API for what people publish, the LinkedIn Company API for company pages, and the LinkedIn Jobs API for open roles.
Wrapping up
Public LinkedIn profiles are readable by anyone; the hard part was only ever the plumbing. The LinkedIn Profile API turns a URL list into structured records you can actually build on.
Top comments (0)