# LinkedIn Profile Search Mass Scraper (`jobscrawler/linkedin-profile-search`) Actor

Our powerful tool helps you search all LinkedIn Profiles and filter by companies, job titles, locations, and more without compromising security or violating platform policies.

- **URL**: https://apify.com/jobscrawler/linkedin-profile-search.md
- **Developed by:** [Jobs Scraper](https://apify.com/jobscrawler) (community)
- **Stats:** 1 total users, 0 monthly users, 85.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## LinkedIn Profile Search Mass Scraper

Our powerful tool helps you search all LinkedIn Profiles and filter by companies, job titles, locations, and more without compromising security or violating platform policies. This Actor can find and scrape nearly everyone on LinkedIn. The number of possible results to extract is much bigger than with other actors.

### Other LinkedIn Profile Search Scrapers:

- For searching by keywords without filters, consider using our LinkedIn Profile Search by services Actor. It's cheaper, doesn't apply rate limits, and can be used at a larger scale. The drawback is that it doesn't support many filters and may find fewer profiles.
- For searches by a person's full name, we recommend using our Profile Search by name Actor instead.
- For scraping profiles by profile URLs, please use our Linkedin Profile Scraper.
- Find more LinkedIn scraping actors: <https://apify.com/scrapeai>.

***

### How It Works

#### Choose Profile Scraper Mode

- **Short**: The Actor will scrape only search pages and will output only basic profile data. One search page yields up to 25 results (short profiles). The actor will charge $0.10 per search page, regardless of how many profiles were found on the page. It will not charge for short profiles additionally.
- **Full**: In addition to scraping search pages, it will open the profile link for each short profile found on the search page and scrape all profile details as well. The actor will charge $0.10 per search page + $0.004 per each full profile scraped.
- **Full + email search**: In addition to Full profiles, it will attempt to find email addresses for the profiles. See details below. The actor will charge $0.10 per search page + $0.01 per each full profile scraped with email search performed.

#### Search Parameters

Provide any combination of the following search parameters to find LinkedIn profiles:

- General search query (fuzzy search). (e.g., Founder, Marketing Manager, John Doe). The query supports operators
- List of current Job titles (e.g., Marketing Manager, Data Scientist)
- List of past Job titles (e.g., Marketing Manager, Data Scientist)
- List of locations where they currently live (e.g., New York, San Francisco, London).
- List of LinkedIn Company URLs where they currently work (e.g., google, meta, amazon)
- List of LinkedIn Company URLs where they previously worked (e.g., google, meta, amazon)
- List of LinkedIn School URLs where they studied (e.g., stanford-university, MIT)
- List of LinkedIn industry IDs (only numbers).
- List of total years of experience.
- List of years at the current company.

#### Other params (optionally):

- `startPage` - The page number to start scraping from. Default is 1.
- `takePages` - The number of pages to scrape. One page is up to 25 results. Maximum is 100 pages (LinkedIn limitation).
- `maxItems` - Maximum number of profiles to scrape for all queries. If you set to 0, it will scrape all available items or up to 2500 items per search query.

#### Email search

By selecting the "Full + email search" mode, you can enable our tool to perform email search for LinkedIn profiles, which is ideal for lead generation, recruitment, and networking. We perform comprehensive validation checks, including SMTP checks, to ensure the email addresses are valid and deliverable. Adaptive cost: if a LinkedIn profile is not complete enough to perform the email search - we will not charge you for the search.

> **Important Note:** The scraper cannot extract emails directly from a LinkedIn profile as this information is not publicly available on the platform. The email search is performed independently and it is not guaranteed to find an email for every profile.

***

### Pagination

If you scraped a query partially and want to continue later, you can start a new run from the last scraped search page. Check the Actor's logs or check the last result in the dataset under `_meta.pagination.pageNumber`.

Start a new run specifying `startPage` in input:

```json
{
  "searchQuery": "Machine Learning Engineer",
  "profileScraperMode": "Full",
  "startPage": 11
}
```

***

### Automatic Query Segmentation

When there are more than 2500 results for your search query, Automatic Query Segmentation splits your main query into smaller, manageable sub-queries.

#### Segmentation Levels

1. **Countries**: Splits across top user base countries.
2. **State/Region**: Segments within specific countries by state.
3. **Experience Level**: Segments by experience level.
4. **Industries**: Segments by industry.

***

### Deduplication across multiple runs

Connect your MongoDB database using `mongoDbConnectionString` to store profile IDs and skip duplicates across runs.

***

### Post-Filtering with MongoDB Queries

Use `postFilteringMongoDbQuery` to filter collected profiles based on specific attributes like skills or current employment status.

***

### Data You'll Receive

- Profile summary and headline
- Current and previous work experience
- Educational qualifications
- Location and contact information
- Skills and endorsements
- Recommendations and connections
- Certifications and projects

# Changelog

This Actor's version history is a separate document: https://apify.com/jobscrawler/linkedin-profile-search/changelog.md

# Actor input Schema

## `profileScraperMode` (type: `string`):

Choose the mode for scraping LinkedIn profiles. The Short mode provides basic information, while the Full mode includes full detailed profile data.

## `searchQuery` (type: `string`):

Query to search LinkedIn profiles. (e.g., Founder, Marketing Manager, John Doe). The query supports search operators

## `maxItems` (type: `integer`):

Maximum number of profiles to scrape. The actor will stop scraping when this limit is reached.

## `locations` (type: `array`):

Filter Profiles by these LinkedIn locations. Example: San Francisco.

## `currentCompanies` (type: `array`):

Filter Profiles by these LinkedIn companies. Provide full LinkedIn URLs

## `pastCompanies` (type: `array`):

Filter Profiles by these LinkedIn past companies. Provide full LinkedIn URLs

## `schools` (type: `array`):

Filter Profiles by these LinkedIn schools. Example: Stanford University.

## `currentJobTitles` (type: `array`):

Filter Profiles by these LinkedIn current job titles. Example: Software Engineer.

## `pastJobTitles` (type: `array`):

Filter Profiles by these LinkedIn past job titles. Example: Software Engineer.

## `yearsOfExperienceIds` (type: `array`):

Filter Profiles by these LinkedIn years of experience IDs. Example: 3 for '3 to 5 years'.

## `yearsAtCurrentCompanyIds` (type: `array`):

Filter Profiles by these LinkedIn years at current company IDs. Example: 3 for '3 to 5 years'.

## `seniorityLevelIds` (type: `array`):

Filter Profiles by these LinkedIn seniority level IDs. Example: 120 for 'Senior'.

## `functionIds` (type: `array`):

Filter Profiles by these LinkedIn function IDs. Example: 8 for 'Engineering'.

## `industryIds` (type: `array`):

Filter Profiles by these LinkedIn industry IDs. Example: 4 for 'Software Development'.

## `firstNames` (type: `array`):

Filter Profiles by these LinkedIn first names.

## `lastNames` (type: `array`):

Filter Profiles by these LinkedIn last names.

## `profileLanguages` (type: `array`):

Filter Profiles by these LinkedIn profile languages.

## `companyHeadcount` (type: `array`):

Filter Profiles by their current company's headcount.

## `companyHeadquarterLocations` (type: `array`):

Filter Profiles by their current company's headquarter location.

## `recentlyChangedJobs` (type: `boolean`):

Filter Profiles to only those who have changed jobs in the last 90 days.

## `recentlyPostedOnLinkedIn` (type: `boolean`):

Filter Profiles to only those who have posted on LinkedIn in the last 30 days.

## `excludeLocations` (type: `array`):

Exclude Profiles by these LinkedIn locations. Example: San Francisco.

## `excludeCurrentCompanies` (type: `array`):

Exclude Profiles by these LinkedIn companies. Provide full LinkedIn URLs

## `excludePastCompanies` (type: `array`):

Exclude Profiles by these LinkedIn past companies. Provide full LinkedIn URLs

## `excludeSchools` (type: `array`):

Exclude Profiles by these LinkedIn schools. Example: Stanford University.

## `excludeCurrentJobTitles` (type: `array`):

Exclude Profiles by these LinkedIn current job titles. Example: Software Engineer.

## `excludePastJobTitles` (type: `array`):

Exclude Profiles by these LinkedIn past job titles. Example: Software Engineer.

## `excludeIndustryIds` (type: `array`):

Exclude Profiles by these LinkedIn industry IDs. Example: 4 for 'Software Development'.

## `excludeSeniorityLevelIds` (type: `array`):

Filter Profiles by these LinkedIn seniority level IDs. Example: 120 for 'Senior'.

## `excludeFunctionIds` (type: `array`):

Filter Profiles by these LinkedIn function IDs. Example: 8 for 'Engineering'.

## `excludeCompanyHeadquarterLocations` (type: `array`):

Exclude Profiles by their current company's headquarter location.

## `startPage` (type: `integer`):

The page number to start scraping from.

## `takePages` (type: `integer`):

The number of search pages to scrape. Each page contains 25 profiles.

## `autoQuerySegmentation` (type: `boolean`):

Enable automatic query segmentation to split broad search queries into smaller segments based on LinkedIn filters.

## `autoQuerySegmentationLevels` (type: `array`):

Select the segmentation levels to be used for automatic query segmentation.

## `autoQuerySegmentationTargetCountries` (type: `array`):

Select the target country to focus the automatic query segmentation.

## `profileDeduplicationMode` (type: `string`):

Choose how the actor should handle deduplication of LinkedIn profiles across multiple runs using your MongoDB database.

## `mongoDbConnectionString` (type: `string`):

Your MongoDB connection string to the database where the actor will store and check scraped profile IDs for deduplication.

## `mongoDbDatabaseName` (type: `string`):

The name of the MongoDB database where the actor will store and check scraped profile IDs for deduplication. Default name is: harvestapi

## `postFilteringMongoDbQuery` (type: `object`):

A MongoDB query in JSON format to further filter the scraped profiles before saving them to the dataset.

## `postFilteringMongoDbAggregation` (type: `array`):

A MongoDB aggregation pipeline in JSON format to further filter the scraped profiles before saving them to the dataset.

## `queries` (type: `array`):

List of LinkedIn profile URLs or public identifiers to scrape directly.

## `urls` (type: `array`):

List of direct profile URLs.

## `publicIdentifiers` (type: `array`):

List of LinkedIn public identifiers.

## `profileIds` (type: `array`):

List of profile IDs.

## `connectionProxy` (type: `object`):

Apify proxy configuration. Residential recommended.

## Actor input object example

```json
{
  "profileScraperMode": "Full",
  "maxItems": 50,
  "startPage": 1,
  "takePages": 1,
  "profileDeduplicationMode": "off",
  "mongoDbDatabaseName": "harvestapi",
  "connectionProxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing all LinkedIn profile records.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "profileScraperMode": "Full",
    "startPage": 1,
    "takePages": 1,
    "profileDeduplicationMode": "off"
};

// Run the Actor and wait for it to finish
const run = await client.actor("jobscrawler/linkedin-profile-search").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "profileScraperMode": "Full",
    "startPage": 1,
    "takePages": 1,
    "profileDeduplicationMode": "off",
}

# Run the Actor and wait for it to finish
run = client.actor("jobscrawler/linkedin-profile-search").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "profileScraperMode": "Full",
  "startPage": 1,
  "takePages": 1,
  "profileDeduplicationMode": "off"
}' |
apify call jobscrawler/linkedin-profile-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jobscrawler/linkedin-profile-search"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/4dT9ArnXRqHBLmhkJ/builds/oGQs25Tv78lzlCqP0/openapi.json
