# LinkedIn Profile Search Mass Scraper (`scrapeai/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/scrapeai/linkedin-profile-search.md
- **Developed by:** [ScrapeAI](https://apify.com/scrapeai) (community)
- **Categories:** Lead generation, Jobs, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# 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

# Actor input Schema

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

Short: Scrapes only search pages (basic profile data). Full: Scrapes search pages and opens profile links for full details. Full + email search: Scrapes full profiles and searches for verified email addresses.

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

General search query (fuzzy search), e.g., Founder, Marketing Manager, John Doe.

## `jobTitles` (type: `array`):

List of current job titles (e.g., Marketing Manager, Data Scientist).

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

List of past job titles (e.g., Marketing Manager, Data Scientist).

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

List of locations where target profiles currently live (e.g., New York, San Francisco, London).

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

List of LinkedIn Company URLs or names where they currently work (e.g., google, meta, amazon).

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

List of LinkedIn Company URLs or names where they previously worked.

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

List of LinkedIn School URLs or names where they studied (e.g., stanford-university, MIT).

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

List of LinkedIn industry IDs (numbers only, e.g., 4 for Software Development, 43 for Financial Services).

## `yearsOfExperience` (type: `array`):

List of total years of experience requirements.

## `yearsAtCurrentCompany` (type: `array`):

List of years at current company requirements.

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

The page number to start scraping from. Default is 1.

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

The number of search pages to scrape. One page yields up to 25 results. Maximum 100 pages per query.

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

Maximum total number of profiles to scrape across all queries/segments. Set to 0 to scrape all available items up to 2,500 per query.

## `automaticQuerySegmentationLevels` (type: `array`):

Segmentation levels to split queries exceeding 2,500 results (e.g., Countries, State/Region, Experience Level, Industries).

## `targetCountries` (type: `array`):

Target country codes or names for location segmentation.

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

MongoDB URI string for cross-run profile deduplication (e.g., mongodb+srv://user:pass@cluster.mongodb.net).

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

JSON object defining MongoDB query language filter applied to scraped profile results.

## `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",
  "searchQuery": "Marketing Manager",
  "jobTitles": [],
  "pastJobTitles": [],
  "locations": [],
  "currentCompanies": [],
  "pastCompanies": [],
  "schools": [],
  "industryIds": [],
  "yearsOfExperience": [],
  "yearsAtCurrentCompany": [],
  "startPage": 1,
  "takePages": 1,
  "maxItems": 0,
  "automaticQuerySegmentationLevels": [
    "Countries",
    "State/Region"
  ],
  "targetCountries": [],
  "mongoDbConnectionString": "",
  "postFilteringMongoDbQuery": {},
  "queries": [],
  "urls": [],
  "publicIdentifiers": [],
  "profileIds": [],
  "connectionProxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# 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",
    "searchQuery": "Marketing Manager",
    "jobTitles": [],
    "pastJobTitles": [],
    "locations": [],
    "currentCompanies": [],
    "pastCompanies": [],
    "schools": [],
    "industryIds": [],
    "yearsOfExperience": [],
    "yearsAtCurrentCompany": [],
    "startPage": 1,
    "takePages": 1,
    "maxItems": 0,
    "automaticQuerySegmentationLevels": [
        "Countries",
        "State/Region"
    ],
    "targetCountries": [],
    "mongoDbConnectionString": "",
    "postFilteringMongoDbQuery": {},
    "queries": [],
    "urls": [],
    "publicIdentifiers": [],
    "profileIds": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapeai/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",
    "searchQuery": "Marketing Manager",
    "jobTitles": [],
    "pastJobTitles": [],
    "locations": [],
    "currentCompanies": [],
    "pastCompanies": [],
    "schools": [],
    "industryIds": [],
    "yearsOfExperience": [],
    "yearsAtCurrentCompany": [],
    "startPage": 1,
    "takePages": 1,
    "maxItems": 0,
    "automaticQuerySegmentationLevels": [
        "Countries",
        "State/Region",
    ],
    "targetCountries": [],
    "mongoDbConnectionString": "",
    "postFilteringMongoDbQuery": {},
    "queries": [],
    "urls": [],
    "publicIdentifiers": [],
    "profileIds": [],
}

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

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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",
  "searchQuery": "Marketing Manager",
  "jobTitles": [],
  "pastJobTitles": [],
  "locations": [],
  "currentCompanies": [],
  "pastCompanies": [],
  "schools": [],
  "industryIds": [],
  "yearsOfExperience": [],
  "yearsAtCurrentCompany": [],
  "startPage": 1,
  "takePages": 1,
  "maxItems": 0,
  "automaticQuerySegmentationLevels": [
    "Countries",
    "State/Region"
  ],
  "targetCountries": [],
  "mongoDbConnectionString": "",
  "postFilteringMongoDbQuery": {},
  "queries": [],
  "urls": [],
  "publicIdentifiers": [],
  "profileIds": []
}' |
apify call scrapeai/linkedin-profile-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapeai/linkedin-profile-search",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/7O1hzUasuJVvTnglE/builds/DSNxqV8C9k2XAcmdp/openapi.json
