# Best Linkedin Jobs Scrapy (`lads.yc/easy-linkedin-jobs-scrapy`) Actor

Easy way to get jobs and details

- **URL**: https://apify.com/lads.yc/easy-linkedin-jobs-scrapy.md
- **Developed by:** [YC W](https://apify.com/lads.yc) (community)
- **Categories:** Jobs, Automation, Developer tools
- **Stats:** 56 total users, 0 monthly users, 100.0% runs succeeded, 4 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 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.

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 Job Scraper

A powerful scraper for LinkedIn job listings with multiple search modes.

### Features

- **Multiple Search Modes**:
  - Search by keyword and location
  - Search by company name
  - Scrape specific job URLs directly

- **Comprehensive Data**: Extracts detailed job information including titles, descriptions, company details, and more

- **Authentication Support**: Optional LinkedIn session cookies for accessing more job details

- **Configurable Limits**: Control the number of pages and jobs to scrape

### Usage Options

#### 1. Search by Keyword and Location

Search for jobs using a keyword and location:

```bash
python src/run_linkedin_scraper.py --search_mode keyword_location --keyword "python developer" --location "San Francisco" --max_pages 3 --max_jobs 50
```

#### 2. Search by Company

Search for jobs at a specific company:

```bash
python src/run_linkedin_scraper.py --search_mode company --company "Microsoft" --max_pages 3 --max_jobs 50
```

#### 3. Scrape Specific Job URLs

Scrape specific LinkedIn job listings:

```bash
python src/run_linkedin_scraper.py --search_mode specific_urls --urls "https://www.linkedin.com/jobs/view/12345" "https://www.linkedin.com/jobs/view/67890"
```

#### Common Options

- `--max_pages`: Maximum number of search result pages to scrape (default: 1)
- `--max_jobs`: Maximum number of job listings to scrape (default: 10, 0 for unlimited)
- `--linkedin_session_id`: LinkedIn session ID cookie for authenticated access
- `--linkedin_jsessionid`: LinkedIn JSESSIONID cookie for authenticated access
- `--debug`: Enable debug mode for detailed output

### Using with Apify

This scraper can be run as an Apify Actor. Configure the input parameters in the Apify console:

1. Select a search mode (keyword_location, company, or specific_urls)
2. Provide the required parameters for your selected search mode
3. Set limits and authentication options as needed

### Output

The scraper produces JSON output with detailed job information:

```json
[
  {
    "id": "12345",
    "title": "Python Developer",
    "companyName": "Example Corp",
    "location": "San Francisco, CA",
    "link": "https://www.linkedin.com/jobs/view/12345",
    "descriptionText": "We are looking for a Python developer...",
    "employment_type": "Full-time",
    "seniority_level": "Mid-Senior level",
    "postedAt": "2023-04-15T10:30:00",
    "scraped_at": "2023-04-16T14:25:30",
    "companyLinkedinUrl": "https://www.linkedin.com/company/example-corp/"
  },
  ...
]
```

### Authentication

For best results, provide LinkedIn session cookies:

1. Log in to LinkedIn in your browser
2. Open browser developer tools (F12)
3. Go to Application/Storage > Cookies > www.linkedin.com
4. Find the `li_at` cookie (this is your session ID)
5. Optionally, find the `JSESSIONID` cookie
6. Provide these values using the `--linkedin_session_id` and `--linkedin_jsessionid` options

# Actor input Schema

## `queue_operation` (type: `string`):

Choose whether to run a search or process URLs from the queue.

## `search_mode` (type: `string`):

Choose how you want to search for jobs.

## `keyword` (type: `string`):

Job title, keyword, or company you're looking for (e.g., 'software developer', 'marketing', 'Google').

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

Location where you want to search for jobs (e.g., 'New York', 'United States', 'Remote').

## `company` (type: `string`):

Name of the company whose jobs you want to scrape (e.g., 'Google', 'Microsoft', 'Amazon').

## `max_pages` (type: `integer`):

Maximum number of search result pages to scrape (each page contains ~25 jobs).

## `max_jobs` (type: `integer`):

Maximum number of jobs to scrape (0 = no limit).

## `linkedin_session_id` (type: `string`):

LinkedIn session cookie (li_at) for authenticated access. Required for accessing all job details.

## `linkedin_jsessionid` (type: `string`):

LinkedIn JSESSIONID cookie for authenticated access. Optional but recommended.

## `start_urls` (type: `array`):

List of specific LinkedIn job URLs to scrape.

## `collect_urls_only` (type: `boolean`):

If enabled, the actor will only collect job URLs and add them to the request queue without parsing job details.

## `process_url` (type: `string`):

Process a single job URL (typically from the request queue).

## `debug` (type: `boolean`):

Enable debug mode for more detailed logging.

## Actor input object example

```json
{
  "queue_operation": "run",
  "search_mode": "keyword_location",
  "keyword": "software developer",
  "location": "United States",
  "max_pages": 1,
  "max_jobs": 10,
  "start_urls": [],
  "collect_urls_only": false,
  "debug": 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("lads.yc/easy-linkedin-jobs-scrapy").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("lads.yc/easy-linkedin-jobs-scrapy").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 '{}' |
apify call lads.yc/easy-linkedin-jobs-scrapy --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lads.yc/easy-linkedin-jobs-scrapy"
        }
    }
}
```

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/thr6f4w0qzWj7Rc88/builds/ebs6fBRg0kR6siuKk/openapi.json
