# Mass Linkedin Leads Generator (`solid-scraper/mass-linkedin-leads-generator`) Actor

🚀 Mass LinkedIn Leads Generator finds targeted B2B prospects fast using smart filters. Export leads for outreach, sales, and marketing—save hours and boost conversions with accurate, verified results. 📈

- **URL**: https://apify.com/solid-scraper/mass-linkedin-leads-generator.md
- **Developed by:** [SolidScraper](https://apify.com/solid-scraper) (community)
- **Categories:** Lead generation, Automation, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% 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/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 Leads Generator - B2B & B2C Email Finder 🔍

**LinkedIn Leads Generator - B2B & B2C Email Finder** helps you generate targeted lead lists by **scraping LinkedIn profile URLs based on your keywords** and extracting **email addresses** when they are present in the publicly available profile context. Whether you’re using a **LinkedIn lead generation tool** for **B2B enrichment**, building a **B2C email finder from LinkedIn**, or researching **prospecting leads with email outreach**, this actor streamlines the workflow—saving you hours of manual work.

***

### Why choose LinkedIn Leads Generator - B2B & B2C Email Finder?

| Feature | Benefit |
| --- | --- |
| ✅ **Keyword-driven lead discovery** | Generates leads for each keyword you provide (each keyword is processed separately) |
| ✅ **Email-only filtering mode** | Can restrict results to profiles that include emails when `scrapeLeadsWithEmail` is enabled |
| ✅ **Built-in retries & fallbacks** | Includes retry logic (up to `max_retries`) to improve resilience during scraping |
| ✅ **Structured, ready-to-use dataset** | Saves each enriched lead with `keyword`, `username`, `userLink`, and `emails` |
| ✅ **Scales across multiple keywords** | Runs through all provided keywords and collects up to your `maxLeadsPerKeyword` per keyword |
| ✅ **Country filtering option** | Lets you filter results by a selected country (or run worldwide by leaving it empty) |

***

### Key features

- 📌 **LinkedIn profile targeting by keywords**: Use your job titles or business keywords and the actor collects matching **LinkedIn profiles** for each keyword.
- 📧 **Email extraction into a clean list**: Enriches each profile and returns an `emails` array for easy downstream use (like CRM imports).
- 🧠 **B2B and B2C friendly lead modes**: Choose whether to collect all matching profiles or **find leads with email only** using `scrapeLeadsWithEmail`.
- 🔄 **Resilient scraping workflow**: Uses retry logic (`max_retries`) and handles empty-result pages to keep runs stable.
- 💾 **Real-time saving to dataset**: Results are pushed while processing, so you don’t have to wait for the entire run to finish.
- 🌍 **Country-aware results**: Applies a country filter (when available) to narrow lead sourcing by region.
- 🧾 **Consistent structured output**: Each dataset row contains the same fields (`keyword`, `username`, `userLink`, `emails`) for straightforward analysis.

***

### Input

Provide input via an `input.json` file. Example structure:

```json
{
  "keywords": ["software engineer", "marketing manager"],
  "country": "United States",
  "maxLeadsPerKeyword": 20,
  "scrapeLeadsWithEmail": false
}
```

#### Input Fields

| Field | Required | Description |
| --- | --- | --- |
| `keywords` | ✅ Yes | List of keywords to search for LinkedIn profiles. Each keyword is searched separately (for example: `software engineer`, `marketing manager`, `sales director`). |
| `country` | ❌ No | Target country filter. Select one of the provided countries, or leave empty for worldwide results. |
| `maxLeadsPerKeyword` | ❌ No | Maximum number of leads to collect for each keyword (must be between 1 and 500). |
| `scrapeLeadsWithEmail` | ❌ No | If enabled, the actor will filter to profiles that have emails available in their publicly available profile context; if disabled, it will collect all matching profiles. |

***

### Output

The actor saves each profile’s data in JSON format to the **LinkedIn Leads Dataset**.

Example output:

```json
[
  {
    "keyword": "software engineer",
    "username": "john-doe",
    "userLink": "https://www.linkedin.com/in/john-doe",
    "emails": ["john.doe@example.com"]
  }
]
```

#### Output Fields

| Field | Type | Description |
| --- | --- | --- |
| `keyword` | string | The keyword that produced this lead. |
| `username` | string | The LinkedIn profile username extracted from the profile link. |
| `userLink` | string | The profile URL for the LinkedIn user. |
| `emails` | array | Email addresses found for the profile (as extracted and de-duplicated). |

> Note: In this actor, profiles without any extracted emails are not included when `scrapeLeadsWithEmail` is enabled.

***

### How to use LinkedIn Leads Generator - B2B & B2C Email Finder (via Apify Console)

1. **Open Apify Console**\
   Log in at https://console.apify.com and go to the **Actors** tab.

2. **Find the actor**\
   Search for **LinkedIn Leads Generator - B2B & B2C Email Finder** and open its actor page.

3. **Go to the INPUT section**\
   Paste an `input.json` structure in the input editor. You can enter:
   `keywords`, optionally `country`, optionally `maxLeadsPerKeyword`, and optionally set `scrapeLeadsWithEmail`.

4. **Choose your lead mode**\
   If you want **LinkedIn leads generator with email**, enable `scrapeLeadsWithEmail`.\
   If you want **find emails from LinkedIn** later or just want the profile list, keep it disabled.

5. **Set your limits**\
   Adjust `maxLeadsPerKeyword` to control how many leads are collected per keyword (1–500).

6. **(Optional) Narrow by region**\
   Set `country` to filter results. If you leave it empty, the actor will proceed with worldwide results.

7. **Run the actor & watch logs**\
   During the run, you’ll see progress logs for each keyword and how the actor processes results. It uses retry logic to stay resilient.

8. **Open the dataset and export**\
   After completion, open the output dataset: **LinkedIn Leads Dataset** (default view: **Scraped Leads**). Export from the dataset UI to JSON/CSV as needed.

No coding required—get accurate results in minutes with this targeted lead generation tool for B2B and B2C prospecting.

***

### Advanced features & SEO optimization

- 🚀 **Engineered for keyword-based LinkedIn lead scraping tool workflows**: Designed around your `keywords` list so each keyword becomes a lead sourcing segment (useful for targeted lead generation tool campaigns).
- 📧 **Email finder for LinkedIn profiles (email-only mode)**: With `scrapeLeadsWithEmail` enabled, it filters down to leads that have extracted emails, making your prospecting leads with email outreach much faster to start.
- 🔄 **Resilience under real-world conditions**: Includes retries (`max_retries`) and handles empty pages to reduce the chance of prematurely ending a run.
- 🧩 **Simple enrichment into structured output**: Extracts `username`, saves `userLink`, and returns `emails` as an array for downstream automation.
- 🌍 **Country-aware lead targeting**: Use `country` to run a more targeted LinkedIn data mining for leads by region.

***

### Best use cases

- 🎯 **B2B sales outreach**: Build a targeted list of decision-makers with `emails` included for outreach personalization.
- 🧑‍💼 **Recruiting and talent sourcing**: Generate LinkedIn contact info generator datasets for role-based sourcing and follow-ups.
- 🏪 **Local marketing teams (regional prospecting)**: Use `country` to collect region-focused LinkedIn leads generator with email for localized campaigns.
- 📊 **Data analyst lead research**: Export structured leads (keyword, username, profile URL, emails) for quick funnel analysis.
- 💌 **Cold email workflow automation**: Feed the JSON output into your pipeline to power automated LinkedIn lead finder campaigns.
- 🧰 **CRM enrichment**: Import leads and emails into your CRM to accelerate sales cycles and reduce manual data collection.
- 🛒 **B2C outreach and partnerships**: Use the same actor as a **B2C email finder from LinkedIn** to build prospect lists for partnerships and marketing.

***

### Technical specifications

- **Supported Input Formats**
  - ✅ `keywords` (array of strings)
  - ✅ `country` (string from the provided enum, or empty for worldwide results)
  - ✅ `maxLeadsPerKeyword` (integer, 1–500)
  - ✅ `scrapeLeadsWithEmail` (boolean)

- **Proxy Support**
  - ✅ Built-in proxy support is included to improve reliability during scraping runs.

- **Retry Mechanism**
  - ✅ Includes retry logic (parameter `max_retries` is set in the actor and used during scraping).

- **Dataset Structure**
  - ✅ Dataset: **LinkedIn Leads Dataset**
  - ✅ Output fields (per record): `keyword`, `username`, `userLink`, `emails`

- **Rate Limits & Performance**
  - ✅ Uses a request delay setting (`request_delay`) and includes small randomized delays between page requests.

- **Limitations**
  - ❌ Private or restricted profiles won’t produce useful results because this actor relies on publicly available data.
  - ❌ When `scrapeLeadsWithEmail` is enabled, only profiles with extracted `emails` are included.

***

### FAQ

#### ✅ Does LinkedIn Leads Generator - B2B & B2C Email Finder extract emails only, or also profile links?

It can do both. With `scrapeLeadsWithEmail` enabled, it filters down to profiles that have extracted emails. With it disabled, it collects all matching profiles (and still enriches each profile into the dataset format).

#### 💼 What does `maxLeadsPerKeyword` control?

`maxLeadsPerKeyword` limits how many leads are collected for **each keyword** you provide in `keywords`. Each keyword is processed separately, and the actor stops collecting for that keyword once it hits the limit.

#### 🌍 Can I target a specific country?

Yes. The `country` input filters results by the selected country. If you leave `country` empty, the actor proceeds with worldwide results.

#### 📧 Where do the extracted emails come from?

The actor extracts emails from publicly available sources included in the scraped profile context. Emails are returned in the `emails` array (deduplicated).

#### 💻 Can I use this actor without any code?

Yes. You can run it directly from Apify Console by filling in the input form or pasting the `input.json` structure. The results are stored in the **LinkedIn Leads Dataset** for easy export.

#### 🔁 Does the actor retry if a page fails or returns empty results?

Yes. It includes retry logic (using `max_retries`) and also uses a consecutive-empty-page check to decide when to move on or stop searching.

#### 🧠 Is the output suitable for CRM import?

Yes. Each dataset record is structured with `keyword`, `username`, `userLink`, and `emails`, which makes it straightforward to map into CRM fields or marketing automation workflows.

***

### Support & feature requests

If you’re using **LinkedIn Leads Generator - B2B & B2C Email Finder** and want to share feedback, feature ideas, or improvements, we’d love to hear from you.

- 💡 **Feature Requests**: Examples include adding more export options, improving email extraction patterns, or enhancing dataset fields for easier CRM mapping.
- 📧 **Contact**: Email us at <dataforleads@gmail.com>.

Your feedback directly shapes the roadmap for this LinkedIn lead generation tool.

***

### Closing CTA / Final thoughts

*If you want a reliable LinkedIn leads generator with email for both B2B and B2C prospecting, this is one of the most SEO-optimized ways to start building your lead lists at scale.*

***

### Disclaimer

**This tool accesses publicly accessible sources only.** It does not access private profiles, authenticated data, or password-protected pages. It’s your responsibility to comply with applicable laws (including GDPR and CCPA where relevant), spam regulations, and platform terms.

If you need data removal, contact <dataforleads@gmail.com>. Always use this actor responsibly, ethically, and for legitimate purposes.

# Actor input Schema

## `keywords` (type: `array`):

List of keywords to search for LinkedIn profiles (e.g., 'software engineer', 'marketing manager', 'sales director'). Each keyword will be searched separately.

## `country` (type: `string`):

Filter results by country. Leave empty for worldwide results.

## `maxLeadsPerKeyword` (type: `integer`):

Maximum number of leads to collect for each keyword (1-500).

## `scrapeLeadsWithEmail` (type: `boolean`):

If enabled, will search for profiles that have emails in their Google search results (using common email providers like Gmail, Hotmail, Outlook, Yahoo). If disabled, will find all profiles matching keywords.

## Actor input object example

```json
{
  "keywords": [
    "software engineer",
    "marketing manager"
  ],
  "country": "United States",
  "maxLeadsPerKeyword": 20,
  "scrapeLeadsWithEmail": false
}
```

# 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 = {
    "keywords": [
        "software engineer",
        "marketing manager"
    ],
    "country": "United States",
    "maxLeadsPerKeyword": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("solid-scraper/mass-linkedin-leads-generator").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 = {
    "keywords": [
        "software engineer",
        "marketing manager",
    ],
    "country": "United States",
    "maxLeadsPerKeyword": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("solid-scraper/mass-linkedin-leads-generator").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 '{
  "keywords": [
    "software engineer",
    "marketing manager"
  ],
  "country": "United States",
  "maxLeadsPerKeyword": 20
}' |
apify call solid-scraper/mass-linkedin-leads-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,solid-scraper/mass-linkedin-leads-generator"
        }
    }
}

```

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/NTafWm4p8dsMHLibh/builds/RcHVdN6hfN9Ed02t0/openapi.json
