# Jobs Scraper 🔥 (`webscrap18/job-scraper`)

A comprehensive job 💼 scraping actor for Apify that collects job listings from multiple platforms including LinkedIn, Glassdoor, Google Jobs, Bayt, and Naukri.

- **URL**: https://beta-securitybyobscurity.apify.com/webscrap18/job-scraper.md
- **Developed by:** [WebScrap](https://beta-securitybyobscurity.apify.com/webscrap18) (community)
- **Categories:** Lead generation, Automation, Jobs
- **Stats:** 44 total users, 21 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$18.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.
You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#rental-actors

# README

## Job Scraper

A comprehensive job scraping actor for Apify that collects job listings from multiple platforms including LinkedIn, Glassdoor, Google Jobs, Bayt, and Naukri.

### Description

This Apify actor allows you to search and collect job listings from multiple job sites in a single run. It provides detailed job information with intelligent data processing, making it ideal for job market research, recruitment efforts, and career exploration.

The actor implements robust error handling and retry mechanisms to ensure reliable results even when dealing with anti-scraping measures. Data is automatically processed, enriched, and categorized to provide actionable insights into the job market.

### Features

- Scrape job listings from multiple platforms in one run
- Customize search parameters (location, job type, remote, etc.)
- Retrieve detailed job information including salary data when available
- Convert salaries to annual format for easier comparison
- Proxy support for avoiding rate limits
- Resilient scraping with automatic retries
- Site-by-site approach to ensure some results even if one site fails
- Detailed error reporting and suggestions
- Automatic job categorization and data enrichment
- Clean data output by removing null/empty fields
- Job statistics and summary included in results

### Input Parameters

| Parameter | Type | Description | Default |
|-----------|------|-------------|---------|
| `site_names` | Array | List of job sites to scrape from (supports "linkedin", "glassdoor", "google", "bayt", "naukri") | `["linkedin", "glassdoor", "google"]` |
| `search_term` | String | Job search keywords (e.g., "software engineer", "data scientist") | Required |
| `location` | String | Job location (e.g., "San Francisco, CA", "New York, NY") | Required |
| `results_wanted` | Integer | Number of job listings to retrieve per site | `20` |
| `hours_old` | Integer | Only show jobs posted within this many hours | `72` |
| `country` | String | Country for Glassdoor searches (e.g., "USA", "UK", "Canada") | `"USA"` |
| `distance` | Integer | Maximum distance from the location in miles | `50` |
| `job_type` | String | Type of job to search for ("fulltime", "parttime", "internship", "contract") | `null` |
| `is_remote` | Boolean | Only show remote jobs | `false` |
| `offset` | Integer | Number of results to skip (useful for pagination) | `0` |
| `proxies` | Array | List of proxies to use for scraping (format: "user:pass@host:port" or "host:port") | `[]` |

### Output

The actor outputs a dataset of job listings with the following information:

- Job title
- Company name
- Location (city, state, country)
- Remote status
- Job type (full-time, part-time, etc.)
- Salary information (when available)
- Job URL
- Job description
- Date posted
- Job category (automatically derived from title)
- Date scraped
- Search query used
- And more depending on the job board

#### Output Format Example

```json
{
  "jobs": [
    {
      "company": "Cartesia",
      "company_url": "https://www.linkedin.com/company/cartesia-ai",
      "title": "Software Engineer, India",
      "date_posted": "2025-07-27",
      "job_url": "https://www.linkedin.com/jobs/view/4227402416",
      "skills": ["Python", "React", "AWS", "Docker", "PostgreSQL"],
      "job_type": "Full-time",
      "experience_range": "2-4 years",
      "location": "Bengaluru, Karnataka, India",
      "id": "li-4227402416",
      "site": "linkedin",
      "interval": "yearly",
      "min_amount": 1200000,
      "max_amount": 1800000,
      "currency": "INR",
      "is_remote": false,
      "job_level": "Mid-level",
      "job_function": "Engineering",
      "company_industry": "Artificial Intelligence",
      "company_rating": 4.4,
      "work_from_home_type": "Hybrid",
      "category": "Software Engineering"
  }

  ],
}
```

### Advanced Features

#### Data Enrichment

The actor provides additional data enrichment:

- Automatic job categorization based on title keywords
- Derivation of job type from title if not explicitly provided
- Detection of remote jobs based on title and description
- Default values for missing fields

#### Clean Output

The `clean_output` parameter allows you to control how the data is returned:

#### Site-by-Site Scraping

The actor scrapes each site individually, which means:

- If one site fails, the others will still be scraped
- More detailed error reporting for each site
- Random delays between sites to avoid detection

#### Retry Mechanism

The actor includes an automatic retry system:

- Configurable number of retries per site
- Increasing delays between retries
- Proxy rotation between retries (if multiple proxies provided)

#### Error Handling

Improved error handling with:

- Detailed error messages for each site
- Specific suggestions for different error types
- Comprehensive logging for troubleshooting

### Usage Tips

1. **Handling Site Blocking**
   - Many job sites implement anti-scraping measures
   - Using proxies is highly recommended to avoid IP blocking
   - Spread requests over time by reducing the number of sites you scrape at once

2. **Google Jobs Scraping**
   - For Google Jobs, the search query format is important
   - The actor will automatically generate a Google-specific search term if not provided

3. **Improving Results**
   - Use specific search terms and locations for better results
   - Setting `linkedin_fetch_description` to `true` provides more detailed job descriptions but is slower
   - For Glassdoor, setting the correct `country` parameter is important

### Example Usage

```json
{
  "easy_apply": false,
  "enforce_annual_salary": true,
  "is_remote": true,
  "location": "India",
  "results_wanted": 50,
  "search_term": "software engineer",
  "site_names": [
    "linkedin",
    "glassdoor",
    "google",
    "bayt",
    "naukri"
  ],
  "hours_old": 72,
  "country": "USA",
  "distance": 50,
  "description_format": "markdown",
  "offset": 0
}
```

### Troubleshooting

If you encounter a 429 error (rate limiting) or 403 error (forbidden), try:

1. Using proxies
2. Reducing the number of `results_wanted`
3. Waiting some time between runs
4. Targeting fewer job sites at once
5. Increasing the `max_retries` value

### Limitations

- LinkedIn has limitations on which parameters can be used together
- Google Jobs requires a specific search term format
- Rate limiting may occur when scraping a large number of jobs without proxies
- Some job sites may block scraping attempts even with proxies
- Search results may vary compared to manual searches due to personalization

# Actor input Schema

## `site_names` (type: `array`):

List of job sites to scrape from.

## `search_term` (type: `string`):

Job search keywords (e.g., 'software engineer', 'data scientist')

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

Job location (e.g., 'San Francisco, CA', 'New York, NY')

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

Country for Indeed and Glassdoor searches (e.g., 'USA', 'UK', 'Canada').

## `results_wanted` (type: `integer`):

Number of job listings to retrieve per site.

## `hours_old` (type: `integer`):

Only show jobs posted within this many hours.

## `distance` (type: `integer`):

Maximum distance from the location in miles.

## `job_type` (type: `string`):

Type of job to search for.

## `is_remote` (type: `boolean`):

Only show remote jobs.

## `offset` (type: `integer`):

Number of results to skip (useful for pagination).

## `proxies` (type: `array`):

List of proxies to use for scraping (format: 'user:pass@host:port' or 'host:port').

## Actor input object example

```json
{
  "site_names": [
    "linkedin",
    "glassdoor",
    "google",
    "bayt",
    "naukri"
  ],
  "search_term": "software engineer",
  "location": "San Francisco, CA",
  "country": "USA",
  "results_wanted": 20,
  "hours_old": 72,
  "distance": 50,
  "is_remote": false,
  "offset": 0
}
```

# 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 = {
    "site_names": [
        "linkedin",
        "glassdoor",
        "google",
        "bayt",
        "naukri"
    ],
    "search_term": "software engineer",
    "location": "San Francisco, CA"
};

// Run the Actor and wait for it to finish
const run = await client.actor("webscrap18/job-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 = {
    "site_names": [
        "linkedin",
        "glassdoor",
        "google",
        "bayt",
        "naukri",
    ],
    "search_term": "software engineer",
    "location": "San Francisco, CA",
}

# Run the Actor and wait for it to finish
run = client.actor("webscrap18/job-scraper").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 '{
  "site_names": [
    "linkedin",
    "glassdoor",
    "google",
    "bayt",
    "naukri"
  ],
  "search_term": "software engineer",
  "location": "San Francisco, CA"
}' |
apify call webscrap18/job-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Jobs Scraper 🔥",
        "description": "A comprehensive job 💼 scraping actor for Apify that collects job listings from multiple platforms including LinkedIn, Glassdoor, Google Jobs, Bayt, and Naukri.",
        "version": "0.1",
        "x-build-id": "ahk6SqtmGQV4rFkaN"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/webscrap18~job-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-webscrap18-job-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/webscrap18~job-scraper/runs": {
            "post": {
                "operationId": "runs-sync-webscrap18-job-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/webscrap18~job-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-webscrap18-job-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "search_term",
                    "location"
                ],
                "properties": {
                    "site_names": {
                        "title": "Job Sites",
                        "type": "array",
                        "description": "List of job sites to scrape from.",
                        "default": [
                            "linkedin",
                            "glassdoor",
                            "google",
                            "bayt",
                            "naukri"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "search_term": {
                        "title": "Search Term",
                        "type": "string",
                        "description": "Job search keywords (e.g., 'software engineer', 'data scientist')"
                    },
                    "location": {
                        "title": "Location",
                        "type": "string",
                        "description": "Job location (e.g., 'San Francisco, CA', 'New York, NY')"
                    },
                    "country": {
                        "title": "Country",
                        "type": "string",
                        "description": "Country for Indeed and Glassdoor searches (e.g., 'USA', 'UK', 'Canada').",
                        "default": "USA"
                    },
                    "results_wanted": {
                        "title": "Results Per Site",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Number of job listings to retrieve per site.",
                        "default": 20
                    },
                    "hours_old": {
                        "title": "Maximum Job Age (hours)",
                        "minimum": 1,
                        "maximum": 720,
                        "type": "integer",
                        "description": "Only show jobs posted within this many hours.",
                        "default": 72
                    },
                    "distance": {
                        "title": "Distance (miles)",
                        "minimum": 5,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Maximum distance from the location in miles.",
                        "default": 50
                    },
                    "job_type": {
                        "title": "Job Type",
                        "enum": [
                            "fulltime",
                            "parttime",
                            "internship",
                            "contract"
                        ],
                        "type": "string",
                        "description": "Type of job to search for."
                    },
                    "is_remote": {
                        "title": "Remote Only",
                        "type": "boolean",
                        "description": "Only show remote jobs.",
                        "default": false
                    },
                    "offset": {
                        "title": "Result Offset",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Number of results to skip (useful for pagination).",
                        "default": 0
                    },
                    "proxies": {
                        "title": "Proxies (Optional)",
                        "type": "array",
                        "description": "List of proxies to use for scraping (format: 'user:pass@host:port' or 'host:port').",
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
