# LinkedIn B2B Lead Scraper (no login) (`scrapyx/linkedin-b2b-leads-scraper`) Actor

Finds companies hiring for your keywords on LinkedIn and enriches each one with public firmographics — industry, headcount, HQ, website, founded year. Uses only LinkedIn's public guest surfaces; no login, no cookies, no people-profile scraping.

- **URL**: https://apify.com/scrapyx/linkedin-b2b-leads-scraper.md
- **Developed by:** [Ibnu Adzim](https://apify.com/scrapyx) (community)
- **Categories:** Lead generation, Jobs
- **Stats:** 2 total users, 1 monthly users, 85.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Scraper (no login)

Finds **companies that are hiring** for the roles you care about, then enriches
each one with public firmographics — industry, headcount, HQ, website, founded
year, company type. A job opening is a buying signal; this actor turns that
signal into a lead list.

Uses only LinkedIn's **public guest surfaces**. No login, no cookies, no session
transplant, no CAPTCHA solving, no browser. Pure HTTP.

### What you get

**`leads` mode (default)** — one row per employer:

| Field | Example |
|---|---|
| `companyName` / `companySlug` / `companyUrl` | Kerry Consulting |
| `openJobCount` | 3 |
| `openJobs[]` | every matching posting: title, location, posted date, URL |
| `company.industry` | Staffing and Recruiting |
| `company.employeeCountRange` / `employeeCountExact` | 51-200 employees / 148 |
| `company.headquarters` | Singapore |
| `company.website` | https://www.kerryconsulting.com |
| `company.companyType` | Privately Held |
| `company.foundedOn`, `company.specialties`, full postal address | |

**`jobs` mode** — one row per posting. With `fetchJobDetail` you also get the
full description, seniority level, employment type, job function and industries.

**`companies` mode** — firmographics for LinkedIn company URLs you already have.
Accepts full URLs, country-subdomain URLs (`de.linkedin.com/company/siemens`)
and bare slugs (`ibm`).

### Input

```json
{
  "mode": "leads",
  "keywords": "data engineer",
  "location": "Singapore",
  "maxItems": 50,
  "maxCompanies": 25,
  "datePosted": "r604800"
}
```

### Things worth knowing

**Your location is validated before the run starts.** LinkedIn does not reject
an unknown location — it silently returns **United States** results instead. So
this actor resolves your location against LinkedIn's own geo endpoint first and
**aborts with an explanation** if it does not resolve, rather than handing you
country-wide rows under a city label. The resolved place is reported back as
`locationResolved` / `locationEcho`.

**1000 rows per query is LinkedIn's ceiling, not ours.** The guest result window
ends at `start=1000` (which answers HTTP 400). For more coverage, run several
narrower queries rather than one broad one.

**Company enrichment is the slow part.** LinkedIn's guest budget forces a fresh
session for every company page, so keep `maxCompanies` modest and leave
`minRequestInterval` at its default.

**People profiles are not scraped.** Every LinkedIn people surface
(`/pub/dir/`, `/search/results/people/`, Voyager) sits behind a login wall, and
this actor does not do logins. It scrapes companies and job postings only.

### Output

Rows are pushed to the default dataset with a `recordType` of `lead`, `job` or
`company`. Failures produce a diagnostic row (`_error`: `NOT_FOUND`,
`BLOCKED_AFTER_RETRIES`) rather than a silent gap, so downstream joins never
lose an input. A `RUN_SUMMARY` key-value record carries the resolved location,
pages fetched, ceiling status and transport stats.

# Actor input Schema

## `mode` (type: `string`):

leads = find employers hiring for your keywords, then enrich each with firmographics (one row per company). jobs = job postings only. companies = enrich LinkedIn company URLs you already have.

## `keywords` (type: `string`):

Job keywords that signal the buying intent you care about, e.g. 'data engineer' or 'head of revenue operations'. Required for the leads and jobs modes.

## `location` (type: `string`):

City, region or country as LinkedIn spells it, e.g. 'Berlin, Germany'. Validated against LinkedIn's own geo resolver before the run starts: an unresolvable location aborts the run instead of silently returning United States results.

## `datePosted` (type: `string`):

Restrict to recently posted jobs. Fresher postings are stronger buying signals.

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

How many job postings to page through. LinkedIn's guest result window ends at 1000 per query (start=1000 answers HTTP 400), so values above 1000 are capped.

## `maxCompanies` (type: `integer`):

Cap on company pages fetched. Each company page needs its own fresh session, so this is the slowest part of a run — keep it modest.

## `fetchJobDetail` (type: `boolean`):

Adds one request per posting to pull the full description, seniority level, employment type, job function and industries.

## `companyUrls` (type: `array`):

Only for mode=companies. LinkedIn company URLs (https://www.linkedin.com/company/stripe/) or bare slugs (stripe).

## `minRequestInterval` (type: `integer`):

Politeness pacing. LinkedIn's guest budget is tight (HTTP 999/429); lowering this makes rate-limit retries more likely, not the run faster.

## `proxyConfiguration` (type: `object`):

Apify Proxy settings. LinkedIn's 999 is session-bound rather than IP-bound, so a proxy is helpful but not required.

## Actor input object example

```json
{
  "mode": "leads",
  "keywords": "data engineer",
  "location": "Singapore",
  "datePosted": "",
  "maxItems": 50,
  "maxCompanies": 25,
  "fetchJobDetail": false,
  "companyUrls": [],
  "minRequestInterval": 2,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `items` (type: `string`):

One row per lead, job posting or company. See the dataset's default view for field definitions.

# 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": "data engineer",
    "location": "Singapore"
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapyx/linkedin-b2b-leads-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 = {
    "keywords": "data engineer",
    "location": "Singapore",
}

# Run the Actor and wait for it to finish
run = client.actor("scrapyx/linkedin-b2b-leads-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 '{
  "keywords": "data engineer",
  "location": "Singapore"
}' |
apify call scrapyx/linkedin-b2b-leads-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapyx/linkedin-b2b-leads-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/gQTJrwzZiqNkYXjbg/builds/xsRFynGbsqFsHRyNs/openapi.json
