Scraping LinkedIn Pages—Methods, Tips, and More

Author
Authors
Clay Team
&
Date
Apr 30, 2024

Scraping LinkedIn has become a popular way of extracting prospect data used for outbound campaigns. If you’re looking to add it to your workflow, you might have many questions like:

  • How to do it? 
  • Is it legal? 
  • Which data can you get?

This guide answers all of the above questions and many more. We’ve helped thousands of marketing and sales teams get abundant LinkedIn data and act on it, so we’ll share the best methods and tips for successful LinkedIn scraping. 🙌

Does LinkedIn Allow Web Scraping?

LinkedIn doesn’t “allow” scraping per se—the platform is serious about data protection, so it has measures in place to prevent automated actions that indicate the use of bots. Still, this doesn’t mean you can’t do it—as long as you’re careful with your approach.

If you’re only looking to scrape public data (i.e., data that doesn’t require a login), you shouldn’t worry about the legality of this process. In a well-known case between hiQ Labs and LinkedIn, the Ninth Circuit Court of Appeals made it clear that scraping public data doesn’t violate the Computer Fraud and Abuse Act (CFAA).

Of course, there are other regulations to be mindful of, such as GDPR and CCPA, which protect personally identifiable information. If your scraping efforts aren’t in conflict with such regulations, and you don’t misuse the gathered data, you can scrape LinkedIn without worries. The question is—how?

Source: LinkedIn

How To Web Scrape LinkedIn

You have three options when it comes to scraping LinkedIn:

  1. Using an API
  2. Building a custom scraper (typically in Python)
  3. Using a ready-made LinkedIn scraping platform

Each of these methods has specific use cases, so none of them is universally applicable to everyone’s needs. To help you choose the best one, we’ll cover each in a bit more depth.

Use an API

An Application Programming Interface (API) lets two software solutions communicate and share data. LinkedIn offers various APIs that enable various tasks—including data collection.

Source: LinkedIn

Two of them are particularly useful for LinkedIn lead generation and prospecting:

  1. Profile API—Lets you get the profile information of authenticated users
  2. Connections API—Extracts a list of an authenticated user’s first-degree connections

To use a LinkedIn API, you must apply for one of the platform’s partner programs. If you’re accepted, you can request API access and start gathering the data you need.

As you can imagine, doing so requires quite a bit of technical knowledge, so this option isn’t for everyone. It’s mainly reserved for developers with extensive coding experience, and the scraping process can be complex and time-consuming.

The learning curve may not be worth it as using an API comes with significant limitations, outlined in the table below:

Limitation Explanation
📂 Limited data LinkedIn’s Profile API only gets you basic data like the user’s name, company, and role. This most likely won’t be enough to let you execute personalized campaigns
🚫 User consent As mentioned above, you can only extract an authenticated user’s information. This means you need their consent, so this method isn’t appropriate for bulk scraping
🚧 Rate limits LinkedIn’s APIs come with rate limits that prevent a high number of requests, which further stifles their usability

Build a Custom LinkedIn Scraper

To overcome the above limitations, developers often steer away from APIs and build a LinkedIn scraper from scratch. You can find many Python libraries that make it easier to do so (provided that you have the necessary knowledge).

The main advantage of using a Python scraper is greater flexibility and data availability. You can program the scraper to extract valuable data like contact information and specific details from a user’s profile (skills, experience, etc.)

That being said, this method isn’t without flaws. There’s a substantial risk of your account getting blocked because LinkedIn does a solid job of detecting automated actions, so you need to be careful. Specifically, you can take the following steps to reduce the risk of getting blocked and automate scraping tasks:

  1. Use a headless browser
  2. Rotate proxies
  3. Leverage automated CAPTCHA solving

Using a Headless Browser

A headless browser works similarly to a standard browser, except it doesn’t have a user interface. This gives them a considerable advantage from the web scraping perspective—a lower chance of being detected by anti-scraping measures.

There are numerous headless scrapers you can use, most notably:

  • Headless Chrome
  • Selenium
  • Playwright

Whichever option you choose, you can scrape dynamic page content without having to reprogram your scraping bots as the content changes. Of course, the process is still automated, so a headless browser alone won’t eliminate the risk of getting blocked. That’s why you should pair it with proxies.

Rotating Proxies

A proxy is an intermediary between you and the server you’re sending a request to. It masks your IP address, reducing the risk of your request being blocked due to scraping.

Now, one proxy may not be enough for larger scraping jobs because requests are still sent from a single source. If there are too many such requests within a short time frame, you might still get blocked.

The best way around this is to use several proxies and rotate them to spread out your scraping efforts. This will make it seem like requests are coming from multiple users, so the blocking risk is significantly lower.

Note that you can program your scraper to rotate proxies independently, so this won’t involve ongoing manual work.

Using a CAPTCHA Solver

Like many websites, LinkedIn uses CAPTCHAs to weed out humans from bots. If your scraper runs into one, it won’t be able to access your desired page. This is why it should contain automated CAPTCHA-solving capabilities.

You can find many services that offer CAPTCHA solving, which you can connect to your scraper through an API. Of course, such services typically aren’t free, so you’ll need to invest a bit if you wish to use them. While you may not need to pay exorbitant prices, budget-conscious users might find this idea off-putting.

Use a Ready-Made LinkedIn Scraper

If you don’t have the coding background necessary for using the above two scraping methods (or don’t want to bother with all the technicalities), there’s a much simpler solution—a commercial LinkedIn scraper. Many options come with all the features you need out of the box, which means you can enjoy several benefits:

  • 🚀 Easy implementation—Various LinkedIn scrapers offer a no-code interface, so all you need to do is create an account and ask for the data you need
  • 🙌 Hands-off scraping—Prebuilt LinkedIn scrapers take care of all the heavy lifting in the background. Manual work is limited to simple data mapping, although some options even automate this process
  • 📈 Scalability—You can find a LinkedIn scraper that comes at a fixed price for unlimited users, which means you can expand your team without increased costs.

Numerous LinkedIn scrapers have entered the market over the years, but not all options check the above boxes. Certain platforms might still involve quite a bit of manual work, such as defining scraping paths or processing data by yourself.

Steering away from such solutions and zeroing in on the right scraper requires diligent research. To give you a shortcut, we’ve reviewed three highly popular options:

  1. Clay
  2. PhantomBuster
  3. Lemlist

Clay

Clay is a data enrichment platform that offers various ways to access lists of companies and people without coding or other manual work. You can choose your search criteria, and the platform will return a robust list in no time.

Better yet, the list can be automatically populated with tons of data, such as:

This is because Clay offers access to 50+ major data providers and scours them without your involvement through waterfall enrichment. The way it works is simple—you select the data you need, and Clay goes through providers one by one until it finds the information. The search stops when you have the necessary data, and you only pay once it’s obtained. The platform provides data far beyond the basics to let you create highly targeted emails.

You can then leverage the AI Email Builder, which automatically pulls from the Clay table to write emails in seconds. Clay doesn’t send emails, but you can push them to your sequencer instantly thanks to the platform’s integration with 100+ tools

Pros Cons

✔️ No-code platform

✔️ Several ways to scrape LinkedIn

✔️ 50+ data providers

✔️ Waterfall enrichment

❌ No built-in email sender

PhantomBuster

Source: PhantomBuster

PhantomBuster is a convenient app you can use regardless of your tech skills. It comes with numerous prebuilt workflows called Phantoms and Flows, which automate various scraping tasks. Some of the main things you can do with PhantomBuster include the following:

  • Extracting users from a search and automatically connecting with them
  • Scraping individual LinkedIn profiles
  • Scraping data from company pages

You can explore over 100 Phantoms and Flows, so you should be able to find the right one for most LinkedIn prospecting and engagement activities. Still, not all of them are equally easy to implement, as evidenced by some users complaining about the platform’s considerable learning curve.

PhantomBuster also offers a Chrome extension, giving you another way to scrape LinkedIn data without coding. It lets you retrieve session cookies while browsing websites, which is a simple way to fill any gaps in your lead data.

Unfortunately, all these features come at a cost. After a 14-day free trial, you must subscribe to one of PhantomBuster’s three paid tiers:

  1. Starter—$69/month
  2. Pro—$159/month
  3. Teams—$439/month

Depending on your chosen plan, you’ll have a specific number of operation hours to use Phantoms and Flows, and you’ll get access to additional features like the platform’s AI email writer.

Pros Cons

✔️ Over 100 prebuilt workflows

✔️ Chrome extension

✔️ AI email writing

❌ No free plan

❌ Might be overwhelming for beginners

Lemlist

Source: Lemlist

Lemlist is a multichannel prospecting platform with several features geared toward data enrichment. The first one is the platform’s Chrome extension, which pulls data directly from LinkedIn or Sales Navigator and adds it to your outreach campaigns.

The way it works is simple—open LinkedIn and enable the extension, and you’ll see your leads’ data mirrored in it. You can either pull data from LinkedIn searches or specific profiles, so you have lots of flexibility without manual labor. Some of the key data Lemlist gathers includes the following:

  • Name and LinkedIn URL
  • Company details
  • Role, experience, certifications, and similar details from the lead’s profile

Besides the extension, Lemlist offers a built-in database with over 450 million B2B contacts, helping you find verified email addresses and phone numbers. 

Like PhantomBuster, Lemlist doesn’t offer a free plan. You get a 14-day free trial, after which you can choose between four plans:

  1. Email Starter—$39/month
  2. Email Pro—$69/month
  3. Multichannel Expert—$99/month
  4. Outreach Scale—$159/month

Speaking of the cost, some users believe Lemlist isn’t worth the price. One customer said it’s too expensive compared to many competitors, so cost-effectiveness might not be the platform’s strongest suit.

Pros Cons

✔️ Convenient Chrome extension

✔️ Multichannel prospecting

✔️ Large database of B2B contacts

❌ No free plan

❌ Value for money could be better

How To Choose the Right LinkedIn Scraper

If you decide to scrape LinkedIn with a dedicated platform, you’ll want to consider the following factors before making the final decision:

  • 🗃️ Scraping scope—Some platforms only let you pull data from the basic LinkedIn version, while others also encompass Sales Navigator, Recruiter, and other connected solutions
  • 💰 Cost—Seeing as you can scrape data manually without hefty investments, you should find a platform that automates the process without breaking the bank
  • 🔗 Additional features and integrations—Look for a scraper that seamlessly fits into your current tech stack and goes beyond data scraping to streamline your outbound campaigns

If you want a platform that checks all the necessary boxes and expands your scraping efforts beyond LinkedIn, Clay can be a perfect solution

Bonus: Clay integrates with PhantomBuster and Lemlist, letting you try out each platform—and many more—with a single Clay account.

Scrape the Web With Clay

If you wish to scrape LinkedIn, Sales Navigator, or virtually any page you can think of, use Clay’s Chrome extension. It gives you two options:

  1. Use premade recipes to automatically map and scrape data from a page
  2. Create a custom recipe to extract specific data points and enjoy more flexibility

To uplevel your scraping process and eliminate manual work altogether, you can use ClaygentClay’s AI scraper and assistant that lets you find any data based on a simple prompt. It works similarly to ChatGPT, so everything happens through a user-friendly, conversation-based interface.

Flexible Pricing, Zero Waste

Clay’s scraping, AI research and writing, and various other features are available for a test drive through the platform’s robust free plan. You get 100 monthly credits to experiment with Clay and start building your campaigns. If you want to tap into the platform’s full potential, you can sign up for one of its four paid tiers:

  1. Starter—$149/month
  2. Explorer—$349/month
  3. Pro—$800/month
  4. Enterprise—Custom

Each plan allows you to choose a specific number of credits, which are only spent on successful searches. Better yet, plans encompass unlimited users, so you don’t need to worry about the cost increasing as you add more team members.

All of this makes Clay one of the most loved platforms among marketing and sales pros. It empowers every SDR to tackle the work of several people, trimming the fat from your outreach campaigns.

Source: Clay Wall of Love

Create a Free Clay Account

If you want to see Clay’s features in action, you can get started in three simple steps:

  1. Go to the signup page 👈
  2. Enter your name, email, and password
  3. Explore Clay’s LinkedIn scraping and other useful features

To learn more about the platform, feel free to visit the University and join Clay’s rich Slack community. You can also sign up for the newsletter to get ongoing support with your outreach tactics. 

💡 Keep reading: Want to learn more about LinkedIn scraping? Check out these articles:

Scraping LinkedIn has become a popular way of extracting prospect data used for outbound campaigns. If you’re looking to add it to your workflow, you might have many questions like:

  • How to do it? 
  • Is it legal? 
  • Which data can you get?

This guide answers all of the above questions and many more. We’ve helped thousands of marketing and sales teams get abundant LinkedIn data and act on it, so we’ll share the best methods and tips for successful LinkedIn scraping. 🙌

Does LinkedIn Allow Web Scraping?

LinkedIn doesn’t “allow” scraping per se—the platform is serious about data protection, so it has measures in place to prevent automated actions that indicate the use of bots. Still, this doesn’t mean you can’t do it—as long as you’re careful with your approach.

If you’re only looking to scrape public data (i.e., data that doesn’t require a login), you shouldn’t worry about the legality of this process. In a well-known case between hiQ Labs and LinkedIn, the Ninth Circuit Court of Appeals made it clear that scraping public data doesn’t violate the Computer Fraud and Abuse Act (CFAA).

Of course, there are other regulations to be mindful of, such as GDPR and CCPA, which protect personally identifiable information. If your scraping efforts aren’t in conflict with such regulations, and you don’t misuse the gathered data, you can scrape LinkedIn without worries. The question is—how?

Source: LinkedIn

How To Web Scrape LinkedIn

You have three options when it comes to scraping LinkedIn:

  1. Using an API
  2. Building a custom scraper (typically in Python)
  3. Using a ready-made LinkedIn scraping platform

Each of these methods has specific use cases, so none of them is universally applicable to everyone’s needs. To help you choose the best one, we’ll cover each in a bit more depth.

Use an API

An Application Programming Interface (API) lets two software solutions communicate and share data. LinkedIn offers various APIs that enable various tasks—including data collection.

Source: LinkedIn

Two of them are particularly useful for LinkedIn lead generation and prospecting:

  1. Profile API—Lets you get the profile information of authenticated users
  2. Connections API—Extracts a list of an authenticated user’s first-degree connections

To use a LinkedIn API, you must apply for one of the platform’s partner programs. If you’re accepted, you can request API access and start gathering the data you need.

As you can imagine, doing so requires quite a bit of technical knowledge, so this option isn’t for everyone. It’s mainly reserved for developers with extensive coding experience, and the scraping process can be complex and time-consuming.

The learning curve may not be worth it as using an API comes with significant limitations, outlined in the table below:

Limitation Explanation
📂 Limited data LinkedIn’s Profile API only gets you basic data like the user’s name, company, and role. This most likely won’t be enough to let you execute personalized campaigns
🚫 User consent As mentioned above, you can only extract an authenticated user’s information. This means you need their consent, so this method isn’t appropriate for bulk scraping
🚧 Rate limits LinkedIn’s APIs come with rate limits that prevent a high number of requests, which further stifles their usability

Build a Custom LinkedIn Scraper

To overcome the above limitations, developers often steer away from APIs and build a LinkedIn scraper from scratch. You can find many Python libraries that make it easier to do so (provided that you have the necessary knowledge).

The main advantage of using a Python scraper is greater flexibility and data availability. You can program the scraper to extract valuable data like contact information and specific details from a user’s profile (skills, experience, etc.)

That being said, this method isn’t without flaws. There’s a substantial risk of your account getting blocked because LinkedIn does a solid job of detecting automated actions, so you need to be careful. Specifically, you can take the following steps to reduce the risk of getting blocked and automate scraping tasks:

  1. Use a headless browser
  2. Rotate proxies
  3. Leverage automated CAPTCHA solving

Using a Headless Browser

A headless browser works similarly to a standard browser, except it doesn’t have a user interface. This gives them a considerable advantage from the web scraping perspective—a lower chance of being detected by anti-scraping measures.

There are numerous headless scrapers you can use, most notably:

  • Headless Chrome
  • Selenium
  • Playwright

Whichever option you choose, you can scrape dynamic page content without having to reprogram your scraping bots as the content changes. Of course, the process is still automated, so a headless browser alone won’t eliminate the risk of getting blocked. That’s why you should pair it with proxies.

Rotating Proxies

A proxy is an intermediary between you and the server you’re sending a request to. It masks your IP address, reducing the risk of your request being blocked due to scraping.

Now, one proxy may not be enough for larger scraping jobs because requests are still sent from a single source. If there are too many such requests within a short time frame, you might still get blocked.

The best way around this is to use several proxies and rotate them to spread out your scraping efforts. This will make it seem like requests are coming from multiple users, so the blocking risk is significantly lower.

Note that you can program your scraper to rotate proxies independently, so this won’t involve ongoing manual work.

Using a CAPTCHA Solver

Like many websites, LinkedIn uses CAPTCHAs to weed out humans from bots. If your scraper runs into one, it won’t be able to access your desired page. This is why it should contain automated CAPTCHA-solving capabilities.

You can find many services that offer CAPTCHA solving, which you can connect to your scraper through an API. Of course, such services typically aren’t free, so you’ll need to invest a bit if you wish to use them. While you may not need to pay exorbitant prices, budget-conscious users might find this idea off-putting.

Use a Ready-Made LinkedIn Scraper

If you don’t have the coding background necessary for using the above two scraping methods (or don’t want to bother with all the technicalities), there’s a much simpler solution—a commercial LinkedIn scraper. Many options come with all the features you need out of the box, which means you can enjoy several benefits:

  • 🚀 Easy implementation—Various LinkedIn scrapers offer a no-code interface, so all you need to do is create an account and ask for the data you need
  • 🙌 Hands-off scraping—Prebuilt LinkedIn scrapers take care of all the heavy lifting in the background. Manual work is limited to simple data mapping, although some options even automate this process
  • 📈 Scalability—You can find a LinkedIn scraper that comes at a fixed price for unlimited users, which means you can expand your team without increased costs.

Numerous LinkedIn scrapers have entered the market over the years, but not all options check the above boxes. Certain platforms might still involve quite a bit of manual work, such as defining scraping paths or processing data by yourself.

Steering away from such solutions and zeroing in on the right scraper requires diligent research. To give you a shortcut, we’ve reviewed three highly popular options:

  1. Clay
  2. PhantomBuster
  3. Lemlist

Clay

Clay is a data enrichment platform that offers various ways to access lists of companies and people without coding or other manual work. You can choose your search criteria, and the platform will return a robust list in no time.

Better yet, the list can be automatically populated with tons of data, such as:

This is because Clay offers access to 50+ major data providers and scours them without your involvement through waterfall enrichment. The way it works is simple—you select the data you need, and Clay goes through providers one by one until it finds the information. The search stops when you have the necessary data, and you only pay once it’s obtained. The platform provides data far beyond the basics to let you create highly targeted emails.

You can then leverage the AI Email Builder, which automatically pulls from the Clay table to write emails in seconds. Clay doesn’t send emails, but you can push them to your sequencer instantly thanks to the platform’s integration with 100+ tools

Pros Cons

✔️ No-code platform

✔️ Several ways to scrape LinkedIn

✔️ 50+ data providers

✔️ Waterfall enrichment

❌ No built-in email sender

PhantomBuster

Source: PhantomBuster

PhantomBuster is a convenient app you can use regardless of your tech skills. It comes with numerous prebuilt workflows called Phantoms and Flows, which automate various scraping tasks. Some of the main things you can do with PhantomBuster include the following:

  • Extracting users from a search and automatically connecting with them
  • Scraping individual LinkedIn profiles
  • Scraping data from company pages

You can explore over 100 Phantoms and Flows, so you should be able to find the right one for most LinkedIn prospecting and engagement activities. Still, not all of them are equally easy to implement, as evidenced by some users complaining about the platform’s considerable learning curve.

PhantomBuster also offers a Chrome extension, giving you another way to scrape LinkedIn data without coding. It lets you retrieve session cookies while browsing websites, which is a simple way to fill any gaps in your lead data.

Unfortunately, all these features come at a cost. After a 14-day free trial, you must subscribe to one of PhantomBuster’s three paid tiers:

  1. Starter—$69/month
  2. Pro—$159/month
  3. Teams—$439/month

Depending on your chosen plan, you’ll have a specific number of operation hours to use Phantoms and Flows, and you’ll get access to additional features like the platform’s AI email writer.

Pros Cons

✔️ Over 100 prebuilt workflows

✔️ Chrome extension

✔️ AI email writing

❌ No free plan

❌ Might be overwhelming for beginners

Lemlist

Source: Lemlist

Lemlist is a multichannel prospecting platform with several features geared toward data enrichment. The first one is the platform’s Chrome extension, which pulls data directly from LinkedIn or Sales Navigator and adds it to your outreach campaigns.

The way it works is simple—open LinkedIn and enable the extension, and you’ll see your leads’ data mirrored in it. You can either pull data from LinkedIn searches or specific profiles, so you have lots of flexibility without manual labor. Some of the key data Lemlist gathers includes the following:

  • Name and LinkedIn URL
  • Company details
  • Role, experience, certifications, and similar details from the lead’s profile

Besides the extension, Lemlist offers a built-in database with over 450 million B2B contacts, helping you find verified email addresses and phone numbers. 

Like PhantomBuster, Lemlist doesn’t offer a free plan. You get a 14-day free trial, after which you can choose between four plans:

  1. Email Starter—$39/month
  2. Email Pro—$69/month
  3. Multichannel Expert—$99/month
  4. Outreach Scale—$159/month

Speaking of the cost, some users believe Lemlist isn’t worth the price. One customer said it’s too expensive compared to many competitors, so cost-effectiveness might not be the platform’s strongest suit.

Pros Cons

✔️ Convenient Chrome extension

✔️ Multichannel prospecting

✔️ Large database of B2B contacts

❌ No free plan

❌ Value for money could be better

How To Choose the Right LinkedIn Scraper

If you decide to scrape LinkedIn with a dedicated platform, you’ll want to consider the following factors before making the final decision:

  • 🗃️ Scraping scope—Some platforms only let you pull data from the basic LinkedIn version, while others also encompass Sales Navigator, Recruiter, and other connected solutions
  • 💰 Cost—Seeing as you can scrape data manually without hefty investments, you should find a platform that automates the process without breaking the bank
  • 🔗 Additional features and integrations—Look for a scraper that seamlessly fits into your current tech stack and goes beyond data scraping to streamline your outbound campaigns

If you want a platform that checks all the necessary boxes and expands your scraping efforts beyond LinkedIn, Clay can be a perfect solution

Bonus: Clay integrates with PhantomBuster and Lemlist, letting you try out each platform—and many more—with a single Clay account.

Scrape the Web With Clay

If you wish to scrape LinkedIn, Sales Navigator, or virtually any page you can think of, use Clay’s Chrome extension. It gives you two options:

  1. Use premade recipes to automatically map and scrape data from a page
  2. Create a custom recipe to extract specific data points and enjoy more flexibility

To uplevel your scraping process and eliminate manual work altogether, you can use ClaygentClay’s AI scraper and assistant that lets you find any data based on a simple prompt. It works similarly to ChatGPT, so everything happens through a user-friendly, conversation-based interface.

Flexible Pricing, Zero Waste

Clay’s scraping, AI research and writing, and various other features are available for a test drive through the platform’s robust free plan. You get 100 monthly credits to experiment with Clay and start building your campaigns. If you want to tap into the platform’s full potential, you can sign up for one of its four paid tiers:

  1. Starter—$149/month
  2. Explorer—$349/month
  3. Pro—$800/month
  4. Enterprise—Custom

Each plan allows you to choose a specific number of credits, which are only spent on successful searches. Better yet, plans encompass unlimited users, so you don’t need to worry about the cost increasing as you add more team members.

All of this makes Clay one of the most loved platforms among marketing and sales pros. It empowers every SDR to tackle the work of several people, trimming the fat from your outreach campaigns.

Source: Clay Wall of Love

Create a Free Clay Account

If you want to see Clay’s features in action, you can get started in three simple steps:

  1. Go to the signup page 👈
  2. Enter your name, email, and password
  3. Explore Clay’s LinkedIn scraping and other useful features

To learn more about the platform, feel free to visit the University and join Clay’s rich Slack community. You can also sign up for the newsletter to get ongoing support with your outreach tactics. 

💡 Keep reading: Want to learn more about LinkedIn scraping? Check out these articles:

Share Article

More Articles

Clay brand asset shaped as a 3D group of abstract objects made out of purple and pink clayClay brand asset shaped as a 3D group of abstract objects made out of purple and pink clay

Scale your outbound motion in seconds, not months

14 day free Pro trial - No credit card required

Try Clay free
Skip to main content