LinkedIn Scraper API: Extract Professional Data at Scale
LinkedIn is essential for B2B marketing and recruiting. This guide shows you how to scrape LinkedIn profiles, companies, and posts for lead generation and market research.
LinkedIn API Endpoints
| Endpoint | Description |
|---|---|
| Profile | Get personal profile data |
| Company | Get company page info |
| Post | Get post details |
Profile Scraper
Get LinkedIn profile information:
const response = await fetch('https://api.sociavault.com/linkedin/profile', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://www.linkedin.com/in/williamhgates/'
})
});
const profile = await response.json();
Response
{
"id": "williamhgates",
"firstName": "Bill",
"lastName": "Gates",
"headline": "Co-chair, Bill & Melinda Gates Foundation",
"location": "Seattle, Washington, United States",
"connections": "500+",
"followers": 35000000,
"about": "Co-chair of the Bill & Melinda Gates Foundation...",
"experience": [
{
"title": "Co-chair",
"company": "Bill & Melinda Gates Foundation",
"duration": "2000 - Present",
"location": "Seattle, WA"
}
],
"education": [
{
"school": "Harvard University",
"degree": "N/A",
"years": "1973 - 1975"
}
],
"skills": ["Philanthropy", "Technology", "Business Strategy"],
"profilePicture": "https://...",
"backgroundImage": "https://..."
}
Company Scraper
Get LinkedIn company page information:
const response = await fetch('https://api.sociavault.com/linkedin/company', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://www.linkedin.com/company/microsoft/'
})
});
const company = await response.json();
Response
{
"id": "microsoft",
"name": "Microsoft",
"tagline": "Empowering every person and organization on the planet to achieve more",
"industry": "Software Development",
"companySize": "10,001+ employees",
"headquarters": "Redmond, Washington",
"founded": 1975,
"website": "https://www.microsoft.com",
"followers": 22000000,
"employees": 220000,
"specialties": [
"Business Software",
"Cloud Computing",
"Artificial Intelligence"
],
"about": "Every company has a mission...",
"logo": "https://...",
"coverImage": "https://..."
}
Post Details
Get information about a specific LinkedIn post:
const response = await fetch('https://api.sociavault.com/linkedin/post', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://www.linkedin.com/posts/...'
})
});
const post = await response.json();
Response
{
"id": "post_123",
"text": "Excited to announce our latest product launch...",
"author": {
"name": "John Smith",
"headline": "CEO at TechCorp",
"profileUrl": "https://..."
},
"likes": 5200,
"comments": 320,
"shares": 150,
"createdAt": "2026-01-08T09:00:00Z",
"media": [
{
"type": "image",
"url": "https://..."
}
]
}
Use Cases
B2B Lead Generation
Build prospect lists from LinkedIn:
async function buildProspectList(profileUrls) {
const prospects = [];
for (const url of profileUrls) {
const profile = await getProfile(url);
prospects.push({
name: `${profile.firstName} ${profile.lastName}`,
title: profile.headline,
company: profile.experience[0]?.company,
location: profile.location,
linkedin: url
});
}
return prospects;
}
Company Research
Analyze companies for competitive intelligence:
async function analyzeCompetitors(companyUrls) {
const analysis = await Promise.all(
companyUrls.map(async url => {
const company = await getCompany(url);
return {
name: company.name,
industry: company.industry,
size: company.companySize,
followers: company.followers,
specialties: company.specialties
};
})
);
return analysis;
}
Recruiting Research
Find talent for recruiting:
async function researchCandidate(profileUrl) {
const profile = await getProfile(profileUrl);
return {
name: `${profile.firstName} ${profile.lastName}`,
currentRole: profile.headline,
experience: profile.experience.map(e => ({
title: e.title,
company: e.company,
duration: e.duration
})),
skills: profile.skills,
education: profile.education
};
}
Industry Analysis
Research companies in a specific industry:
async function analyzeIndustry(companies) {
const industryData = await Promise.all(
companies.map(url => getCompany(url))
);
const avgEmployees = industryData.reduce((s, c) =>
s + parseInt(c.employees || 0), 0
) / industryData.length;
const avgFollowers = industryData.reduce((s, c) =>
s + c.followers, 0
) / industryData.length;
return {
companiesAnalyzed: industryData.length,
avgEmployees,
avgFollowers,
topCompany: industryData.sort((a, b) => b.followers - a.followers)[0]
};
}
Combining with Ad Library
Use LinkedIn data with ad research:
// Get company info
const company = await getCompany('https://linkedin.com/company/competitor');
// Check their LinkedIn ads
const ads = await searchLinkedInAds(company.name);
console.log(`${company.name} is running ${ads.length} LinkedIn ads`);
Related Endpoints
- LinkedIn Ad Library - LinkedIn ads
- Twitter/X Scraper - Twitter data
- Facebook Scraper - Facebook data
Frequently Asked Questions
Can I scrape private profiles?
No, only publicly visible profile information is accessible. Private profiles restrict their data.
How do I get profile URLs?
Profile URLs follow the format linkedin.com/in/username. You can find them through LinkedIn search or your existing contact lists.
Is this compliant with LinkedIn's terms?
SociaVault accesses publicly available data. Always use data responsibly and for legitimate business purposes.
Can I get contact information (email/phone)?
Contact information is only available if the user has made it public on their profile.
How fresh is the data?
Data is fetched in real-time, giving you the current state of profiles and companies.
Get Started
Sign up free and start extracting LinkedIn data.
Documentation: /docs/api-reference/linkedin/profile
Found this helpful?
Share it with others who might benefit
Ready to Try SociaVault?
Start extracting social media data with our powerful API. No credit card required.