To extract data from a LinkedIn URL, send the profile URL to a people-enrichment API and read the structured JSON it returns. With Captain Data's People Enrichment endpoint, one authenticated GET to /v1/people/enrich with a LinkedIn URL returns the person's full name, headline, current role, and company — and, with full_enrich, their recent experiences, education, and skills. No scraper to build or keep alive. This guide shows the exact request and response, how to pull the full work history, what to do when you only have a name, how to extract company data the same way, and how to run it across a list. One thing up front: Captain Data returns profile and firmographic data, not email or phone.
#The one-call version
Authenticate with your API key in an X-API-Key header and call People Enrichment with the profile URL as li_profile_url. The endpoint accepts public /in/ URLs (and /pub/ or Sales Navigator URLs) and returns a structured profile for 1 credit — 2 with full_enrich, which adds recent experiences, education, and skills.
curl -G https://api.captaindata.com/v1/people/enrich \ -H "X-API-Key: $CAPTAINDATA_API_KEY" \ --data-urlencode "li_profile_url=https://www.linkedin.com/in/jane-doe" \ --data-urlencode "full_enrich=true"
#What comes back
The response is JSON. A trimmed example of the fields you'll reach for most:
{
"uid": "ppl_8f2c...",
"full_name": "Jane Doe",
"first_name": "Jane",
"last_name": "Doe",
"headline": "VP Engineering at Acme",
"job_title": "VP Engineering",
"company_name": "Acme",
"li_company_url": "https://www.linkedin.com/company/acme",
"location": "San Francisco, California",
"li_profile_url": "https://www.linkedin.com/in/jane-doe",
"li_profile_id": 123456789,
"experiences": [
{ "title": "VP Engineering", "company_name": "Acme", "date": "2021 - Present" }
],
"has_more_experiences": true,
"skills": [{ "name": "Distributed Systems" }],
"has_more_skills": true
}li_profile_id and uid are stable identifiers — store them to dedupe people across runs, even if someone later changes their vanity URL.
#Get the full work history, skills, and education
full_enrich previews at most the 5 most recent experiences, 2 skills, and 2 education entries. When the response sets has_more_experiences or has_more_skills to true, call the dedicated list endpoints for the complete lists, passing the uid you already received:
- GET /v1/people/experiences — full work history.
- GET /v1/people/skills — complete skills list.
- GET /v1/people/certifications — licenses & certifications, which Enrich doesn't return at all.
These lists are paginated at 20 results per page; follow the X-Pagination-Next cursor until it's no longer present.
#Don't have the URL? Resolve it from a name
If you start from a name, resolve it first with Find People — one GET with full_name and, ideally, company_name:
curl -G https://api.captaindata.com/v1/people/find \ -H "X-API-Key: $CAPTAINDATA_API_KEY" \ --data-urlencode "full_name=Jane Doe" \ --data-urlencode "company_name=Acme"
It returns the person's public LinkedIn URL and a stable uid; pass either to People Enrichment for the full profile. Adding the company is the single biggest accuracy lever for common names. Full walkthrough: how to find a LinkedIn profile by name and company.
#Extract company data from a URL or a domain
The same pattern works for companies. Pass a LinkedIn company URL to Company Enrichment (GET /v1/companies/enrich?li_company_url=...) for firmographics — industry, headcount, HQ, and locations. Only have a domain? Resolve it with Find Company (GET /v1/companies/find?domain=acme.com), which returns the company's LinkedIn URL and uid. From that uid, Find Employees lists the people at the account.
#Extract from a list of URLs
To enrich many profiles, loop over your list and call the endpoint for each — here in Python:
import os, requests
API = "https://api.captaindata.com/v1/people/enrich"
headers = {"X-API-Key": os.environ["CAPTAINDATA_API_KEY"]}
urls = [
"https://www.linkedin.com/in/jane-doe",
"https://www.linkedin.com/in/john-smith",
]
for url in urls:
r = requests.get(API, headers=headers,
params={"li_profile_url": url, "full_enrich": True})
r.raise_for_status()
person = r.json()
print(person["full_name"], "—", person["job_title"], "@", person["company_name"])Enrich accepts /in/, /pub/, and Sales Navigator URLs; a malformed or private URL returns a 400. Check for non-200 responses and retry transient failures before writing results.
#Credits at a glance
- People Enrichment — 1 credit, or 2 with full_enrich.
- Find People and Find Company — 2 credits each.
- List Experiences / Skills / Certifications — 1 credit per request plus 1 per 20 results.
- Company Enrichment — 1 credit.
#Why use an API instead of scraping a LinkedIn URL
Scraping a LinkedIn URL yourself means building and babysitting the extraction, rotating infrastructure, and re-fixing it every time the page changes. A managed data API removes that: you call a versioned REST endpoint and get fresh, structured JSON from 750M+ profiles, with no pipeline to maintain. Captain Data focuses on profile and firmographic data — not email or phone — which keeps it a clean, auditable source you can defend. For the product view, see the data extraction API page.
Start extracting — get an API key with 100 free credits, or explore People Enrichment in detail.