LinkedIn Recruiter is a powerful tool for sourcing, engaging, and tracking potential candidates. With Recruiter, you can access LinkedIn’s database of over 740 million professionals. This allows you to search for qualified candidates based on various criteria like skills, experience, education, and more. Once you identify promising candidates, Recruiter provides tools to communicate with them and nurture relationships over time.
Why extract data from LinkedIn Recruiter?
While Recruiter offers a great interface for searching and engaging with candidates directly on the platform, there are also benefits to extracting Recruiter data into an external system. Here are some common reasons you may want to extract Recruiter data:
- Integrate with your ATS or other HR systems: Extracting Recruiter data allows you to transfer candidate profiles and conversations into your existing applicant tracking system or HRMS. This helps centralize all candidate information in one place for a streamlined recruiting workflow.
- Report on recruiting metrics: Recruiter provides some high-level reporting, but extracting the data into a tool like Excel gives you more flexibility to analyze and visualize recruiting KPIs like source of hire, time to fill, recruiter productivity, etc.
- Backup your candidate database: Extracting your Recruiter contacts provides a backup of this data in case anything ever happens to your LinkedIn account.
- Analyze candidate demographics: Pulling Recruiter data into a CSV or Excel format allows you to better analyze demographic information across your candidate pipeline to identify areas for improving diversity sourcing.
- Comply with GDPR: For companies subject to GDPR, extracting Recruiter data may be part of your compliance requirements for providing data portability or deletion rights.
Options for extracting LinkedIn Recruiter data
LinkedIn does not provide a standard way to export all of your Recruiter data. However, there are a few options for extracting the data you need:
Option 1: Recruiter “Add Contact” CSV export
The most straightforward way to export contacts from Recruiter is to use the “Add Contacts” CSV import/export functionality. Here’s an overview of how to use it:
- In Recruiter, go to the Contacts tab.
- Click on “Add Contacts.”
- Switch to the “Export” tab.
- Select the columns you want to export.
- Click “Export” to download a CSV with your selected contact data.
This lets you easily export profile information and Recruiter activity/notes for your contacts. However, there are some limitations:
- You can only export 100,000 rows per CSV file.
- It doesn’t include communication history or InMail messages.
- Contacts must be currently in your Recruiter account to export them.
Option 2: Use Recruiter API
For more advanced Recruiter data exports, you can leverage the Recruiter API. With the API, you can build custom integrations to extract nearly all Recruiter data including:
- Profiles
- Contacts
- InMails
- Notes
- Searches
- Projects
The Recruiter API uses OAuth for authentication and REST endpoints for data extraction. You can use any programming language like Python, JavaScript, Go, etc to build an integration that extracts the Recruiter data you need and loads it into an external database or file system.
Compared to the CSV export, the API provides much more flexibility but requires more technical expertise to leverage.
Option 3: Use a Recruiter data extractor tool
If you don’t have the in-house technical resources to build a custom integration with the Recruiter API, another option is to use a third-party recruiter data extractor tool. Some examples include:
- X-Ray Search
- Elastic Recruiter Extractor
- HiringSolved Data Extractor
- Talentrackr
These tools have already built connectors to extract data through Recruiter API. You simply connect your Recruiter account, configure the data you want to extract, and export to JSON, CSV, database, etc. This can save considerable time and effort compared to building your own API integration. Costs range from free to paid plans.
Step-by-step guide to extracting data from Recruiter
Now that we’ve covered some high-level options, let’s walk through a concrete step-by-step guide to extracting your Recruiter data using the API. We’ll use Python to build the integration, but the same overall process applies for any language.
Step 1 – Get API credentials
First, you need to get API credentials to authenticate with LinkedIn. Here’s how:
- Log in to your LinkedIn account.
- Go to https://www.linkedin.com/developers/apps/new and create a new app. This will be used to generate your API credentials.
- Fill out the form to register your app. Make sure to select “r_recruiting” under “Authorized API Products”.
- On the next screen, copy the Client ID and Client Secret. We’ll need these in our integration.
Step 2 – Install Python libraries
We’ll use two Python libraries to build the integration:
- simple_rest_client: Provides a wrapper for REST API calls
- json: Used for parsing JSON responses from the API
Install these with pip:
pip install simple_rest_client json
Step 3 – Set up API client
In your Python script, import the libraries and set up the API client with your credentials:
import simple_rest_client import json # Set up API client BASE_URL = 'https://api.linkedin.com' CLIENT_ID = '[Your Client ID]' CLIENT_SECRET = '[Your Client Secret]' client = simple_rest_client.ApiClient(BASE_URL, CLIENT_ID, CLIENT_SECRET)
Step 4 – Make API call to extract data
Now we can start making API calls. As an example, let’s extract profile data for our Recruiter contacts.
The endpoint we need is:
GET /v2/clientAwareMemberHandles
Here is how to call it and parse the response in Python:
# API request response = client.get('/v2/clientAwareMemberHandles?q=members&count=max') # Parse response as JSON profiles = json.loads(response.body) print(profiles)
The response will contain profile data for all your Recruiter contacts. You can process this data further, save to a CSV or database, etc.
You can follow a similar pattern to call other Recruiter APIs like searching contacts, getting InMails, etc. The LinkedIn documentation provides details on all available endpoints.
Step 5 – Handle pagination
For endpoints that return a list of items, the Recruiter API uses pagination. This means you need to make multiple API requests to fetch all the data by following next
links in the response.
Here is some sample code to handle pagination:
# Initial request response = client.get('/v2/inMails?count=100') # Parse response inmails = json.loads(response.body) # Paginate through results while 'next' in response.headers: next_link = response.headers['next'] # Subsequent requests using next link response = client.get(next_link) # Append to inmails array inmails.extend(json.loads(response.body))
This loops through all pages until there is no next
link, collecting all InMails across pages. The same pattern works for other endpoints that require pagination.
Step 6 – Handle errors
It’s also important to properly handle errors when making API requests. You can check the status code on the response and handle different cases:
try: response = client.get('/v2/inMails) except simple_rest_client.ApiException as e: # API error if e.status == 404: print("API endpoint not found") elif e.status == 401: print("Invalid credentials") else: print("An API error occurred") except Exception: # Non-API error print("An error occurred")
This makes your integration more robust by accounting for possible errors from invalid requests, expired tokens, or other issues.
Conclusion
By leveraging the Recruiter API and a programming language like Python, you can build a script to efficiently extract all of your Recruiter data. The key steps covered in this guide include:
- Generating API credentials in LinkedIn
- Installing Python libraries for API requests/JSON parsing
- Setting up an API client
- Making API calls to extract recruiter data like profiles or InMails
- Handling pagination
- Checking for errors
Following these steps, you can extract your LinkedIn Recruiter data into CSV or JSON formats for reporting and analysis or loading into databases and other systems.
Some additional tips for handling large data extractions include:
- Use multiple worker threads/processes for parallel extraction
- Write data out incrementally vs. keeping it all in memory
- Use SQLite or similar for queued writes if inserting into a database
With a well-designed API integration, you can replicate key Recruiter data in an external system for backups, analytics, integrations, and more. Just be sure to follow LinkedIn’s usage guidelines and rate limits.
Let me know if you have any other questions! I’m happy to provide more details about using LinkedIn’s APIs to extract Recruiter data.
Keep recruiting!
Regards,
Claude