🚀 Announcement: We are releasing a new API that gives data from all major search engines in one call.

Add Your Heading Text Here

How to use Scrapingdog’s Linkedin Scraping API?

How to use Scrapingdog’s Linkedin Scraping API

Table of Contents

TL;DR

  • Scrapes LinkedIn public profiles (people & companies); handles CAPTCHA and non-CAPTCHA cases.
  • For CAPTCHA profiles, switch to private mode; you may get 202 (Accepted) while it scrapes, then 200 when ready; 202 isn’t charged.
  • After a 202, keep processing other profiles and retry in 2–3 minutes.
  • 1,000 free credits to try; docs + video linked.

In this tutorial, I will explain how you can use Scrapingdog’s LinkedIn Scraping API to scrape any Person’s Public Profile and Company’s Public Profile.

How To Scrape LinkedIn Public Profile via Scrapingdog

There are two kinds of public profiles on Linkedin when it comes to scraping them.

  • Profile with a captcha
  • A profile without a captcha

Let’s first discuss how you can scrape a profile without a captcha on it.

Let’s say I want to scrape this profile. Then simply you will try to scrape it like this.

o["rating"]=soup.find("span",{"class":"ebay-review-start-rating"}).text.strip(
    

This is the most basic way in which you can scrape any Linkedin Profile with our API. But sometimes some profiles throw a captcha like this.

In this case, our API will respond with either a 404 or 400. In this case, you can take advantage of the private parameter.

Try to open this profile in incognito mode. You will face a captcha similar to that shown in the above image. Scrapingdog’s API can scrape these profiles as well. Just add a private parameter and you are done.

https://api.scrapingdog.com/linkedin/?api_key=Your-API-Key&type=profile&linkId=bradshapcott&private=true

When you make the above API call then you will get one of the two status codes.

  • 200
  • 202

When it is 200 then it means the data has been successfully scraped and returned to you.

But if it is 202 then it means your request is accepted but the profile is still being scraped. Once the profile is scraped the copy of that profile will be saved in our DB. Of course, you will be not charged when you get a 202. Now anytime after 2 to 3 minutes, you can scrape this profile and you will get a 200 in that case.

When you get a 202 you are advised to scrape other profiles in your list rather than waiting for 2 to 3 minutes. This will increase your work productivity.

Let us know if you have any questions regarding the API. You can contact us here. You can watch this quick tutorial in the video to further understand how this API works.

My name is Manthan Koolwal and I am the founder of scrapingdog.com. I love creating scraper and seamless data pipelines.
Manthan Koolwal

Web Scraping with Scrapingdog

Scrape the web without the hassle of getting blocked

Recent Blogs

Summarize web pages at scale

How To Summarize Web Pages at Scale using Scrapingdog’s AI Scraping API

Discover how Scrapingdog’s AI Scraping API helps you summarize web pages at scale, streamline workflows, and boost productivity.
search engine scraping

Search Engine Scraping: Challenges, Use Cases & Tools

In this blog, we have explained what search engine scraping is. What are the challenges in scraping search engines, its use cases and finally some tools to do it.