Harivony Ratefiarison
July 11, 2025
•
5
min read
•
63
votes
•
Scraping
Data has become one of the most valuable assets for any company. Having reliable and well-structured information about a business or its competitors can provide a significant strategic edge. In this tutorial, we’ll explore how to combine the precision of Google Dorks with the automation capabilities of Piloterr APIs to collect public LinkedIn profile data. The end result will be a structured .json
dataset, ready for analysis.
Generate a list of employees from a specific company to build a dataset for HR purposes, recruitment efforts, or organizational structure analysis.
This tutorial is divided into two standalone sections that you can follow in any order:
In this chapter, we will learn how to connect google dork with Piloterr API and LinkedIn profile scraping, step by step.
Google Dorks are advanced search operators that help filter search results.
Google already indexes billions of pages, we can take advantage of that by crafting smart queries.
To test and run a Google dork, we just need a Google search bar.
Let’s start with the following sample syntax on how to list public LinkedIn profiles related to “Apple Inc.”
The search :
The result :
We get a list of people that have “Apple” in their LinkedIn profile.
It is not magic, let’s see the syntax break down to understand what’s happening :
Setting up Piloterr API request :
Once your dork is ready, the next step is automating the search
To complete the request:
Set parameters :
Run request and print result :
Congratulation, we get our first data :
The search results with profile link are stored in the key “organic_result”.
💡 Tips : Explore more parameters here : Piloterr Google Search API docs
The Google Search API returns several keys such as pagination
, search_parameters
, search_information
and organic_results
.
But we’re only interested in the profile links found under organic_results
.
Let’s save the first link in profile_url by accessing results[0]['link']
Then, send that link to Piloterr’s LinkedIn Profile API using the query parameter.
Set request parameters
Make request and print results :
Run the request and print the result, and that’s it! You now have public data from a real LinkedIn profile :
💡 Tips : Full API reference here : Piloterr LinkedIn API docs
Get the project
Clone repositories https://github.com/harivonyR/LinkedIn_company_employee_scrap
Setup dependencies :
Setup Your API Key
Copy the example credentials file by executing command :
Edit ‘credential.py’ and paste your API key:
Choose Your Target Company and Set Result Limits
Company :
The default target company is set to Apple Inc. in main.py. You can change it in wish :
Limit Google Results :
Google Search can return several pages of results. Adjust the search range and link to optimise resources and time :
Run the Pipeline :
This will :
Test a Single Profile for debugging (Optional) :
Test() is a special function in main.py designed to test and debug the workflow by executing each part step-by-step.
To run the test, just use:
Now you're ready to automate public LinkedIn employee data extraction with a clean and reusable script.
Interviews, tips, guides, industry best practices and news.