# Linkedin B2b Lead Generator Email Scraper (`scrapers-hub/linkedin-b2b-lead-generator-email-scraper`) Actor

LinkedIn B2B Lead Generator Email Scraper turns search terms into contact-ready leads - email, email domain, profile title, description, URL and country. 📈 Scale outbound prospecting, pipeline building and CRM enrichment.

- **URL**: https://apify.com/scrapers-hub/linkedin-b2b-lead-generator-email-scraper.md
- **Developed by:** [Scrapers Hub](https://apify.com/scrapers-hub) (community)
- **Categories:** Lead generation, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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?

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 B2B Lead Generator Email Scraper – Business Email Extraction by Job Title & Country

The **LinkedIn B2B Lead Generator Email Scraper** builds targeted B2B contact lists by searching public LinkedIn pages for a set of job titles, industries or company names and extracting the business email addresses that appear in the indexed public content. You choose the search keywords, the target country, the type of LinkedIn content to focus on — profiles, company pages, posts or Pulse articles — and how many emails to collect, and the actor returns structured records containing the page title, the LinkedIn URL, the surrounding description text, the email address and its domain.

The mechanism matters, so it is worth stating plainly. This LinkedIn scraper does not log in to LinkedIn, does not read anyone's connections, and does not access private profile fields. It works from publicly indexed LinkedIn content reached through search-engine result pages using `site:linkedin.com` operators, restricted to the content type you select. What it recovers are the email addresses that professionals and companies have themselves chosen to publish in their public profile summaries, company pages, posts and articles.

Two scraping engines are available. The Standard engine is the reliable default and routes through the GOOGLE\_SERP proxy. The Performance engine is a newer, faster path using residential proxies. Proxy handling in both cases is managed inside the actor, with no credentials for you to configure.

***

### 📊 What Data Can You Extract with This LinkedIn Email Scraper?

Every record is a flat JSON object with consistent keys, so it drops straight into a CRM import template or a spreadsheet. The output fields fall into four groups.

| Category | Fields | What it gives you |
|---|---|---|
| **Search context** | `keyword`, `scrape_from` | The search term that produced this lead and the source domain the record was extracted from, so you can attribute every contact to its origin |
| **Lead identity** | `title`, `url` | The public page title — typically the person's name and headline, or the company name — plus the canonical LinkedIn URL for manual verification |
| **Contact detail** | `email`, `email_domain` | The extracted business email address and its domain, which is the key you use to group contacts by employer |
| **Geography** | `country` | The target country the search was localised to, letting you segment a multi-country run by region |

The field that does the most work in practice is `email_domain`. It is what separates corporate contacts from free-mail addresses, lets you roll individual leads up into company-level accounts, and is the natural join key against a firmographic dataset you may already hold. Filtering out the common consumer providers on `email_domain` alone typically produces a much cleaner B2B list in one step than any amount of downstream cleansing on the full email string.

`description` carries the snippet of public text surrounding the match, which is frequently where the person's role, specialism or company is stated. It is the field to read when you want to qualify a lead before adding it to a sequence.

***

### 🌟 Key Features of the LinkedIn B2B Email Scraper

| Feature | Description |
|---|---|
| 🔍 **Multi-keyword targeting** | `searchTerms` accepts an array of job titles, industries or company names, each searched independently and tagged in the `keyword` field |
| 🌍 **140+ country targeting** | `country` localises results to a specific market, from major economies down to small territories, so lists are geographically relevant |
| 📑 **Content-type filtering** | `sourceRegion` restricts the search to Profiles, Company pages, Posts, Pulse articles, or All — each yields a different kind of lead |
| ⚙️ **Two scraping engines** | Choose Performance (faster, cheaper, residential proxies) or Standard (reliable, GOOGLE\_SERP proxy, slower) via the `engine` field |
| 📧 **Domain-split emails** | Every email arrives with `email_domain` broken out separately, making corporate-versus-freemail filtering and account rollup trivial |
| 🎯 **Hard collection cap** | `maxEmails` bounds the run between 1 and 10,000 emails, so cost and volume stay predictable |
| 📝 **Context snippets** | The `description` field preserves the surrounding public text, giving you role and company context for qualification |
| 🔗 **Verifiable source URLs** | Every record includes the LinkedIn `url` it came from, so any lead can be checked manually before outreach |
| 🚫 **No LinkedIn login needed** | The actor never authenticates to LinkedIn, so no account of yours is exposed to any risk |

***

### 🚀 Why Choose This LinkedIn B2B Lead Generator?

**No LinkedIn credentials, no account risk.** Tools that automate a logged-in LinkedIn session put your own account in jeopardy. This LinkedIn scraper works entirely from publicly indexed content and never authenticates, so building a lead list carries no exposure for your profile.

**Content type is a targeting lever, not an afterthought.** Setting `sourceRegion` to `Company` produces a fundamentally different list from `Profile` — organisational contacts versus individual professionals — and `Posts` or `Pulse` surfaces people actively publishing on a topic, which is a strong intent signal. Being able to choose deliberately is what turns a scrape into a targeted prospecting run.

**Engine choice matched to the job.** The Standard engine, routing through the GOOGLE\_SERP proxy, is the dependable option for accuracy-critical lists. The Performance engine trades some of that for speed and lower cost on residential proxies. Having both means one actor covers a quick exploratory pull and a careful production run.

**Output built for CRM ingestion.** `keyword`, `title`, `url`, `description`, `email`, `email_domain`, `country` and `scrape_from` map onto the fields most CRMs expect, so import requires little transformation, and the `url` field means every record retains a verifiable provenance trail.

***

### 📥 Input

```json
{
  "searchTerms": [
    "software engineer",
    "marketing director",
    "startup founder"
  ],
  "country": "United States",
  "sourceRegion": "All",
  "engine": "legacy",
  "maxEmails": 20
}
```

#### 🔧 LinkedIn Email Scraper Input Fields

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `searchTerms` | array of strings | ✅ Yes | prefilled with `["software engineer", "marketing director", "startup founder"]` | Job titles, industries, or company names to search for on LinkedIn. |
| `country` | string (enum) | ✅ Yes | `United States` | Select the country for localised professional search results. Over 140 countries and territories are available, including the United Kingdom, Canada, Australia, Germany, France, India, Japan, Brazil, Singapore and the UAE. |
| `sourceRegion` | string (enum) | ✅ Yes | `All` | Select LinkedIn content type: `All`, `Profile`, `Company`, `Posts`, or `Pulse`. |
| `engine` | string (enum) | No | `legacy` | Scraping method. `cost-effective` (Performance — faster, cheaper, residential proxies) or `legacy` (Standard — reliable, GOOGLE\_SERP proxy, slower). |
| `maxEmails` | integer | ✅ Yes | `20` | Limit the number of emails to collect. Minimum 1, maximum 10,000. |

#### 💡 Input Examples

**Targeted profile search in a single market**

```json
{
  "searchTerms": ["chief technology officer", "vp of engineering"],
  "country": "United Kingdom",
  "sourceRegion": "Profile",
  "engine": "legacy",
  "maxEmails": 200
}
```

**Company-page contacts for account-based marketing**

```json
{
  "searchTerms": ["fintech startup", "payments platform"],
  "country": "Singapore",
  "sourceRegion": "Company",
  "engine": "cost-effective",
  "maxEmails": 500
}
```

**Thought-leader discovery from published content**

```json
{
  "searchTerms": ["supply chain automation"],
  "country": "Germany",
  "sourceRegion": "Pulse",
  "engine": "legacy",
  "maxEmails": 100
}
```

***

### 📤 Output

Each dataset item is one lead with an extracted business email address.

```json
{
  "keyword": "marketing director",
  "title": "Anna Weber - Marketing Director - Nordwind GmbH | LinkedIn",
  "url": "https://www.linkedin.com/in/anna-weber-marketing",
  "description": "Marketing Director at Nordwind GmbH. Demand generation, brand strategy and partner marketing across DACH. Contact: a.weber@nordwind-gmbh.de",
  "email": "a.weber@nordwind-gmbh.de",
  "email_domain": "nordwind-gmbh.de",
  "country": "Germany",
  "scrape_from": "linkedin.com"
}
```

#### 🧾 LinkedIn Email Scraper Output Fields

| Field | Type | Description |
|---|---|---|
| `keyword` | string | null | Keyword that produced this item. |
| `title` | string | null | Title of the item. |
| `url` | string | null | Canonical URL of the scraped item. |
| `description` | string | null | Long-form description text. |
| `email` | string | null | Email address found for the item. |
| `email_domain` | string | null | Email domain of the item. |
| `country` | string | null | Country. |
| `scrape_from` | string | null | Scrape from of the item. |

Fields may be `null` where the source page did not expose that value. In particular, `description` depends on how much surrounding public text the indexed page provided.

***

### 💻 How to Use the LinkedIn B2B Email Scraper (Step by Step)

#### Step 1: Open the LinkedIn B2B Lead Generator on Apify

Sign in to your Apify account and open the actor page. If you are new to the platform, create a free account first — you will also need an API token if you plan to trigger the LinkedIn scraper from your own systems, which is how most sales teams eventually run it. Click **Try for free** or **Start** to open the input form. Every field is prefilled with a working default, so you can execute a small demonstration run before committing to a real list build.

#### Step 2: Define your search terms

`searchTerms` is where targeting begins. Add one term per line in the string list editor. Job titles work well for finding individuals — "head of procurement", "operations director", "founder" — while industry phrases and company names work better for organisational discovery. Be specific rather than broad: "VP of demand generation" produces a far more coherent lead list than "marketing". Each term is searched independently and every returned record carries the originating term in its `keyword` field, so you can compare which terms performed well and prune the weak ones on the next run.

#### Step 3: Choose the target country

`country` localises the search and is required. It accepts over 140 countries and territories, covering major markets such as the United States, United Kingdom, Germany, India, Japan, Brazil and Australia as well as smaller territories. Country selection matters more than most people expect: it changes which pages surface, and it also determines which data protection regime your resulting list falls under. A run targeting an EU or UK country produces contacts covered by the GDPR, which has direct consequences for how you may lawfully approach them.

#### Step 4: Select the LinkedIn content type

`sourceRegion` is the second targeting lever and it changes the character of the results substantially. `Profile` restricts the search to individual LinkedIn profiles, giving you person-level leads. `Company` targets organisation pages, which tends to yield general or departmental company addresses well suited to account-based outreach. `Posts` and `Pulse` surface people who are actively publishing on your topic, which is a meaningful intent signal even though the volume is lower. `All` casts the widest net and is the right starting point when you are still calibrating.

#### Step 5: Pick a scraping engine

`engine` offers two paths. `legacy` — labelled Standard — routes through the GOOGLE\_SERP proxy and is the reliable, slower default. `cost-effective` — labelled Performance — is the newer, faster and cheaper path running on residential proxies. Use Standard when list accuracy is the priority and you can absorb the extra runtime. Use Performance for exploratory runs, large-volume pulls, or when you are testing several keyword variants and want to iterate quickly.

#### Step 6: Set the email collection limit

`maxEmails` bounds the run, accepting any value from 1 to 10,000 with a default of 20. The default is intentionally small so a first run costs almost nothing while you check that your search terms return the kind of leads you expected. Once the sample looks right, raise the limit. Bear in mind that not every LinkedIn page contains a published email address, so the run explores considerably more pages than the number of emails it ultimately returns.

#### Step 7: Export, deduplicate and qualify

When the run completes, open **Storage → Dataset** and export to JSON, CSV, Excel or XML, or push straight to Google Sheets. Before importing anything into your CRM, deduplicate on `email`, then filter `email_domain` to strip free-mail providers if you want a purely corporate list. Read `description` for the leads that survive — it usually contains enough role and company context to decide whether a contact is genuinely worth approaching.

***

### 🔌 API Access & Integrations

Run the LinkedIn B2B lead generator from your own code or automation platform.

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers-hub~linkedin-b2b-lead-generator-email-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "searchTerms": ["marketing director", "head of growth"],
    "country": "United Kingdom",
    "sourceRegion": "Profile",
    "engine": "legacy",
    "maxEmails": 100
  }'
```

Python, using the official client:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")

run_input = {
    "searchTerms": ["chief technology officer"],
    "country": "Canada",
    "sourceRegion": "Profile",
    "engine": "cost-effective",
    "maxEmails": 250,
}

actor = client.actor("scrapers-hub/linkedin-b2b-lead-generator-email-scraper")
run = actor.call(run_input=run_input)

seen = set()
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    email = item.get("email")
    if email and email not in seen:
        seen.add(email)
        print(email, "|", item.get("email_domain"), "|", item.get("title"))
```

The actor connects to Zapier, Make, Google Sheets and Slack through Apify's integrations, and webhooks can fire on run completion so new leads flow into your CRM or outreach tool automatically.

***

### 💡 Best Use Cases for LinkedIn B2B Lead Data

#### 📈 Outbound sales prospecting

Set `sourceRegion` to `Profile` and use precise job titles in `searchTerms` to build a list of decision-makers matching your ideal customer profile. `title` gives you the role and employer for personalisation, `description` supplies context for the opening line, and `email_domain` lets you group multiple contacts at the same company into a single coordinated approach rather than a scatter of unrelated emails.

#### 🏢 Account-based marketing programmes

Run with `sourceRegion` set to `Company` against industry keywords to collect organisational contacts, then cluster by `email_domain` to assemble account-level target lists. Because each record retains its `url`, you can verify every account against its actual LinkedIn company page before allocating budget to it.

#### 🎯 Recruitment and talent sourcing

Search specific technical or leadership titles with `sourceRegion` set to `Profile` to build candidate pipelines. The `description` field frequently states specialisms and current employer, giving recruiters enough signal to prioritise outreach without opening every profile individually, while `country` keeps the pipeline within your hiring jurisdiction.

#### 🌐 Market entry and territory research

Run the same `searchTerms` across several `country` values and compare the volume and composition of the resulting lists. Which markets return dense results for your target role tells you where a professional community for your category actually exists, which is useful evidence before committing to a territory.

#### ✍️ Influencer and thought-leader identification

Set `sourceRegion` to `Pulse` or `Posts` to find professionals publishing on your topic rather than merely listing it in a headline. These contacts are a different and often better audience for partnership, guest content and community-building outreach than a cold title-matched list, because publishing behaviour demonstrates genuine engagement.

#### 🧹 CRM enrichment and data hygiene

If you already hold company records, run targeted searches on those company names and use `email_domain` as the join key to attach fresh contacts to existing accounts. This fills gaps where you have an organisation but no named individual, and `url` gives every added contact a verifiable source.

#### 🤝 Partnership and business development mapping

Search the roles that own partnerships — "head of partnerships", "alliances director", "BD lead" — restricted to your target country. The combination of `title`, `description` and `email_domain` lets you assemble a map of who owns partner relationships across an ecosystem, which is otherwise slow, manual research.

***

### ⚙️ Tips for Better LinkedIn Lead Scraping Results

- **Prefer specific job titles to broad categories.** "VP of revenue operations" returns a coherent, qualified set; "sales" returns noise. The precision of `searchTerms` is the single biggest driver of list quality.
- **Run several narrow terms rather than one wide one.** Because each result carries its originating `keyword`, a multi-term run tells you which phrasings actually work in your niche, and you can drop the unproductive ones from the next run.
- **Match `sourceRegion` to your outreach motion.** Individual sales outreach wants `Profile`. Account-based programmes want `Company`. Content partnerships want `Pulse` or `Posts`. Leaving it on `All` is fine for discovery but dilutes a production list.
- **Start with the default `maxEmails` of 20.** A tiny first run confirms your keyword and country combination produces relevant leads before you commit to a larger pull, and it is far cheaper than diagnosing a mis-targeted 1,000-email run.
- **Use Standard for accuracy, Performance for iteration.** The `legacy` engine on the GOOGLE\_SERP proxy is the dependable option for lists you will actually mail; `cost-effective` is better when you are experimenting with keyword variants.
- **Always verify emails before a campaign.** Addresses published in public text can be outdated or role-based. Run the list through an email verification service to protect your sending domain reputation from bounces.
- **Check the legal basis before you contact anyone.** Lists targeting EU, UK or Canadian recipients fall under the GDPR, PECR or CASL respectively. Confirm your lawful basis and include a clear opt-out in every message.

***

### 🛠️ Troubleshooting

**The run returned far fewer emails than `maxEmails`.**
This is normal and expected. Only a minority of public LinkedIn pages contain a published email address, so the actor examines many more pages than the number of leads it can return. Broaden `searchTerms`, switch `sourceRegion` to `All`, or try a country with a larger professional user base if the yield is too low for your purpose.

**I am getting free-mail addresses rather than corporate ones.**
Some professionals publish a personal address on their public profile. Filter the dataset on `email_domain` to exclude the common consumer providers, which usually cleans a list in a single step. If the proportion is high, tighten `searchTerms` toward senior corporate roles, which are more likely to publish a company address.

**The results are not from the country I selected.**
`country` localises the search but does not guarantee every returned page belongs to that market — professionals list international experience and companies operate across borders. Use `email_domain` country-code TLDs and the `description` text as secondary filters when strict geographic accuracy matters.

**The run is slow.**
The `legacy` Standard engine routes through the GOOGLE\_SERP proxy and is deliberately the slower, more reliable path. Switch `engine` to `cost-effective` for the faster Performance path on residential proxies, accepting that the two engines have different reliability characteristics.

**Can this scraper get emails that are not published anywhere?**
No. The LinkedIn B2B lead generator extracts only email addresses that appear in publicly indexed content. It does not guess, pattern-generate, or infer addresses from name and domain combinations, and it does not access private profile fields, so anything it returns was published by the person or company themselves.

***

### ❓ Frequently Asked Questions About LinkedIn B2B Email Scraping

**What does the LinkedIn B2B Lead Generator Email Scraper do?**
It searches publicly indexed LinkedIn content for your chosen job titles, industries or company names in a selected country, and returns structured records containing the page title, LinkedIn URL, surrounding description text, business email address, email domain, country and source domain.

**Do I need a LinkedIn account or login for this scraper?**
No. The actor never authenticates to LinkedIn. It works entirely from publicly indexed content, so your own LinkedIn account is never used and never at risk.

**Is scraping LinkedIn emails legal?**
The actor collects only publicly published information. Whether you may then contact those people is a separate question governed by law in their jurisdiction — the GDPR and PECR in Europe and the UK, CASL in Canada, CAN-SPAM in the United States. You are responsible for establishing a lawful basis and honouring opt-outs.

**Does this LinkedIn scraper guess or generate email addresses?**
No. It extracts addresses that actually appear in public page content. It does not construct addresses from name-and-domain patterns, so it will not produce speculative addresses that were never published.

**How many emails can I collect in one run?**
`maxEmails` accepts any value from 1 to 10,000, with a default of 20. Actual yield depends on how many pages matching your criteria publish an email address.

**What is the difference between the Performance and Standard engines?**
Performance (`cost-effective`) is the newer path — faster and cheaper, using residential proxies. Standard (`legacy`) is the reliable default, routing through the GOOGLE\_SERP proxy but running more slowly. Standard is the default value.

**What does the `sourceRegion` field control?**
It restricts which type of LinkedIn content is searched: `Profile` for individual profiles, `Company` for organisation pages, `Posts` for LinkedIn posts, `Pulse` for published articles, or `All` for everything.

**Which countries can I target?**
Over 140 countries and territories are available in the `country` enum, from major markets such as the United States, United Kingdom, Germany, India, Japan, Brazil, Australia and Singapore through to smaller territories.

**Do I need to configure proxies?**
No. Proxy handling is managed inside the actor for both engines. There are no proxy credentials for you to supply or maintain.

**Can I import the results directly into my CRM?**
Yes. Export the dataset as CSV or connect the Google Sheets integration, and the fields map cleanly onto standard CRM contact columns. Deduplicate on `email` before importing.

**Should I verify the emails before sending?**
Yes, always. Published addresses go stale, and some are role-based catch-alls. Running the list through a verification service before a campaign protects your sending domain reputation from bounce damage.

**Why is the `description` field empty on some records?**
The description reflects the surrounding public text available for that page. Where the indexed content provided little context, the field can legitimately be null while the email itself is still valid.

**Can I schedule the LinkedIn scraper to run automatically?**
Yes. Apify's scheduler runs the actor on any cron expression, which is how teams build a continuously refreshing lead pipeline. Attach a webhook so each completed run pushes new contacts into your CRM.

**How do I avoid duplicate leads across scheduled runs?**
Maintain your own set of previously seen `email` values and filter incoming records against it. Because `email` is a natural unique key, deduplication is straightforward and does not require fuzzy matching.

**Can I use this LinkedIn scraper for recruitment?**
Yes — searching job titles with `sourceRegion` set to `Profile` is a common talent-sourcing pattern. Employment-related outreach may carry additional obligations in some jurisdictions, so check the rules applying to candidates in your target country before contacting them.

***

### 🆘 Support & Feedback

If the LinkedIn scraper misbehaves — a run fails, a field stops populating, or a keyword returns nothing you expected — open a ticket on the **Issues** tab of the actor page and include the run ID and the exact input you used.

Need something beyond what this LinkedIn B2B lead generator currently does, such as additional content sources, a custom output shape, or direct delivery into your own data warehouse? Email **scraperhubapi@gmail.com** and describe what you are building.

If this LinkedIn email scraper helps your pipeline, please leave a review on its Apify page. Ratings and written feedback directly influence what gets improved next.

***

### ⚖️ Disclaimer

The LinkedIn B2B Lead Generator Email Scraper collects only publicly available information — email addresses and professional details that individuals and companies have themselves chosen to publish in public LinkedIn content. It does not authenticate to LinkedIn, access private profile fields, read connection graphs, or bypass any access control.

Email addresses and names are personal data. You are responsible for processing them lawfully, which includes establishing a valid legal basis under the GDPR or UK GDPR for contacts in Europe and the United Kingdom, complying with PECR, CASL, CAN-SPAM and equivalent electronic marketing rules in your recipients' jurisdictions, honouring opt-out and erasure requests promptly, and providing the transparency notices those regimes require. Publication of an address does not by itself constitute consent to receive marketing. You are also responsible for compliance with LinkedIn's terms of service and with the terms of any search engine whose results are involved.

This actor is an independent tool and is not affiliated with, endorsed by, or connected to LinkedIn Corporation or Microsoft. All trademarks referenced belong to their respective owners.

If you believe data collected through this actor relates to you and you would like it removed, contact **scraperhubapi@gmail.com** with the details and the request will be handled promptly.

# Actor input Schema

## `searchTerms` (type: `array`):

Job titles, industries, or company names to search for on LinkedIn.

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

Select the country for localized professional search results.

## `sourceRegion` (type: `string`):

Select LinkedIn content type: Profiles, Company Pages, Posts, or Pulse articles.

## `engine` (type: `string`):

Select your preferred scraping method. ⚡ Performance (New): Faster, cheaper, uses residential proxies. 🛡️ Standard: Reliable, uses GOOGLE\_SERP proxy, but slower.

## `maxEmails` (type: `integer`):

Limit the number of emails to collect.

## Actor input object example

```json
{
  "searchTerms": [
    "software engineer",
    "marketing director",
    "startup founder"
  ],
  "country": "United States",
  "sourceRegion": "All",
  "engine": "legacy",
  "maxEmails": 20
}
```

# Actor output Schema

## `results` (type: `string`):

Records scraped by Linkedin B2b Lead Generator Email Scraper, stored in the run's default dataset.

# 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 = {
    "searchTerms": [
        "software engineer",
        "marketing director",
        "startup founder"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers-hub/linkedin-b2b-lead-generator-email-scraper").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 = { "searchTerms": [
        "software engineer",
        "marketing director",
        "startup founder",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("scrapers-hub/linkedin-b2b-lead-generator-email-scraper").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 '{
  "searchTerms": [
    "software engineer",
    "marketing director",
    "startup founder"
  ]
}' |
apify call scrapers-hub/linkedin-b2b-lead-generator-email-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapers-hub/linkedin-b2b-lead-generator-email-scraper"
        }
    }
}

```

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/BfkWRb5hUb4kHHTFI/builds/9ugKB4trSPiStjvBd/openapi.json
