LinkedIn scraping API Python Client

Extract LinkedIn scraping data with our LinkedIn scraping API Python client. Get programmatic access to email addresses, education history, comprehensive profile information, work experience, company details, and more using simple Python code. Start free, no credit card required.

Trusted by industry leaders all over the world

Integrate our LinkedIn scraping API

The Apify API client for Python is the official library that allows you to use LinkedIn scraping API in Python, providing convenience functions and automatic retries on errors. Get started with simple pip installation and robust error handling built-in.

Python

Python

JavaScript

JavaScript

HTTP

HTTP

MCP

MCP

1from apify_client import ApifyClient
2
3# Initialize the ApifyClient with your Apify API token
4# Replace '<YOUR_API_TOKEN>' with your token.
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7# Prepare the Actor input
8run_input = { "profileUrls": [
9 "https://www.linkedin.com/in/williamhgates",
10 "http://www.linkedin.com/in/jeannie-wyrick-b4760710a",
11 ] }
12
13# Run the Actor and wait for it to finish
14run = client.actor("dev_fusion/linkedin-profile-scraper").call(run_input=run_input)
15
16# Fetch and print Actor results from the run's dataset (if there are any)
17print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
18for item in client.dataset(run["defaultDatasetId"]).iterate_items():
19 print(item)
20
21# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

Get data with LinkedIn scraping API Python client

Use our Python API client to extract LinkedIn profile data by providing LinkedIn profile URLs. The API returns structured data, including names, occupations, headlines, summaries, job history, education, skills, languages, honors, certifications, company information, and email addresses when available.

Input

{
"profileUrls": [
"<https://www.linkedin.com/in/williamhgates>",
"<http://www.linkedin.com/in/jeannie-wyrick-b4760710a>"
]
}

Output

[
{
"urn": "ACoAAA8BYqEBCGLg_vT_ca6mMEqkpp9nVffJ3hc",
"about": "Chair of the Gates Foundation. Founder of Breakthrough Energy. Co-founder of Microsoft. Voracious reader. Avid traveler. Active blogger.",
"email": "bill.gates@gatesfoundation.org",
"promos": [],
"skills": [],
"courses": [],
"patents": [],
"updates": [],
"fullName": "Bill Gates",
"headline": "Chair, Gates Foundation and Founder, Breakthrough Energy",
"jobTitle": "Co-chair",
"lastName": "Gates",
"projects": [],
"firstName": "Bill",
"followers": 38914463,
"interests": [],
"languages": [],
"educations": [],
"highlights": [],
"profilePic": "https://media.licdn.com/dms/image/v2/D5603AQF-RYZP55jmXA/profile-displayphoto-shrink_200_200/B56ZRi8g.aGsAY-/0/1736826818802?e=1762387200&v=beta&t=9WVVq-mEfwKiuHsuAjz8jlE77gj3jwyvmNnDYgp0sV4",
"testScores": [],
"companyName": "Gates Foundation",
"companySize": "1001-5000",
"connections": 8,
"experiences": [],
"linkedinUrl": "https://www.linkedin.com/in/williamhgates",
"mobileNumber": null,
"publications": [],
"organizations": [],
"verifications": [],
"companyWebsite": "gatesfoundation.org",
"creatorWebsite": {
"link": "https://gatesnot.es/tgn",
"name": "https://gatesnot.es/tgn"
},
"openConnection": null,
"companyIndustry": "Investment Management",
"companyLinkedin": "linkedin.com/company/bill-&-melinda-gates-foundation",
"honorsAndAwards": [],
"recommendations": [],
"volunteerCauses": [],
"companyFoundedIn": 2000,
"publicIdentifier": "williamhgates",
"addressCountryOnly": "United States",
"addressWithCountry": "Seattle, Washington, United States",
"currentJobDuration": "25 yrs 10 mos",
"volunteerAndAwards": [],
"addressWithoutCountry": "Seattle, Washington",
"profilePicHighQuality": "https://media.licdn.com/dms/image/v2/D5603AQF-RYZP55jmXA/profile-displayphoto-shrink_800_800/B56ZRi8g.aGsAc-/0/1736826818808?e=1762387200&v=beta&t=_fMi8DjHXxJQ-lNHpR4irqb3vjBWoMWatKXdp5BHPts",
"licenseAndCertificates": [],
"currentJobDurationInYrs": 25.83,
"profilePicAllDimensions": [],
"topSkillsByEndorsements": null
},
{
"urn": "ACoAABt_nacBhrbuCWC2KtgmRRpggAqSv275RDE",
"about": null,
"email": null,
"promos": [],
"skills": [],
"courses": [],
"patents": [],
"updates": [],
"fullName": "Jeannie Wyrick",
"headline": "Service Coordinator at AMETEK Chandler Engineering",
"jobTitle": "Service Coordinator - Ametek Chandler Engineering",
"lastName": "Wyrick",
"projects": [],
"firstName": "Jeannie",
"followers": 121,
"interests": [],
"languages": [],
"educations": [],
"highlights": [],
"profilePic": null,
"testScores": [],
"companyName": "Chandler Engineering",
"companySize": "51-200",
"connections": 119,
"experiences": [],
"linkedinUrl": "http://www.linkedin.com/in/jeannie-wyrick-b4760710a",
"mobileNumber": null,
"publications": [],
"organizations": [],
"verifications": [],
"companyWebsite": "chandlereng.com",
"openConnection": null,
"companyIndustry": "Oil & Energy",
"companyLinkedin": "linkedin.com/company/chandlereng",
"honorsAndAwards": [],
"recommendations": [],
"volunteerCauses": [],
"companyFoundedIn": 1949,
"publicIdentifier": "jeannie-wyrick-b4760710a",
"addressCountryOnly": "United States",
"addressWithCountry": "Tulsa Metropolitan Area",
"currentJobDuration": "3 yrs 10 mos",
"volunteerAndAwards": [],
"addressWithoutCountry": "Tulsa Metropolitan Area",
"profilePicHighQuality": null,
"licenseAndCertificates": [],
"currentJobDurationInYrs": 3.83,
"profilePicAllDimensions": [],
"topSkillsByEndorsements": "Customer Service, Microsoft Office, Microsoft Excel, Microsoft Word, Manufacturing"
}
]

How to use LinkedIn scraping API

Sign up for Apify account01

Creating an account is quick and free — no credit card required. Your account gives you access to more than 5,000 scrapers and APIs.

Get started for free
Install Apify Python client02

Install the Apify Python client using pip: pip install apify-client. This package provides a simple interface to interact with LinkedIn scraping API from your Python applications.

Get your Apify API token03

Go to settings in the Apify console and navigate to the “API & Integrations” tab. There, create a new token and save it for later.

Integrate LinkedIn scraping API04

Navigate to the LinkedIn scraping API page and click on the API dropdown menu in the top right corner. In the dropdown menu, you can see API clients, API endpoints, and more. Use the provided Python code examples to integrate LinkedIn scraping API into your Python application.

Open LinkedIn scraping Python API
Get your LinkedIn scraping data via API05

The LinkedIn scraping API returns structured JSON data that works perfectly with pandas, NumPy, and other Python data analysis libraries.

Why use Apify?

Never get blocked

Every plan (free included) comes with Apify Proxy, which is great for avoiding blocking and giving you access to geo-specific content.

Customers love us

We truly care about the satisfaction of our users and thanks to that we're one of the best-rated data extraction platforms on both G2 and Capterra.

Monitor your runs

With our latest monitoring features, you always have immediate access to valuable insights on the status of your web scraping tasks.

Export to various formats

Your datasets can be exported to any format that suits your data workflow, including Excel, CSV, JSON, XML, HTML table, JSONL, and RSS.

Integrate Apify to your workflow

You can integrate your Apify runs with platforms such as Zapier, Make, Keboola, Google Drive, or GitHub. Connect with practically any cloud service or web app.

Large developer community

Apify is built by developers, so you'll be in good hands if you have any technical questions. Our Discord server is always here to help!

Frequently asked questions

No, LinkedIn does not provide an official Python API for scraping comprehensive profile data including email addresses. This Python API client serves as an alternative solution that extracts publicly available LinkedIn profile information without requiring cookies or authentication, making it accessible for lead generation and research purposes.

Yes, you can try the LinkedIn scraping Python API client for free with Apify's free tier. New users receive free credits to test the Python API client's capabilities. The Python API client accesses actors priced at $10.00 per 1,000 results, making it cost-effective for both small tests and large-scale data extraction projects.

You can extract comprehensive LinkedIn profile data using a Python API client including personal information (names, occupations, headlines, summaries), professional details (job history, education, skills, languages, honors, certifications), company information (company name, industry, website, LinkedIn URL), email addresses, and for paying users, mobile numbers when available.

Getting started with our LinkedIn scraping Python API is easy — simply create a free Apify account, get your API token, and start using the LinkedIn scraping API in Python, JavaScript, CLI, cURL, OpenAPI, or MCP.

Get started with LinkedIn scraping API Python client today

Get your first LinkedIn scraping data in Python in less than 5 minutes. No credit card required. No commitment. Cancel anytime.