# Naukri Jobs Scraper — AI Agent Ready (`fervent_bus/naukri-job-scraper-mcp`) Actor

Extract job listings from Naukri.com. Returns titles, companies, locations, experience, salaries, skills. Recruitment automation for AI agents. Works with Claude, ChatGPT via Apify MCP.

- **URL**: https://apify.com/fervent\_bus/naukri-job-scraper-mcp.md
- **Developed by:** [Archit Khurana](https://apify.com/fervent_bus) (community)
- **Categories:** Jobs, Lead generation, AI
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.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.
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

## 🚀 Naukri.com Job Scraper for Apify

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-00D4AA?style=flat\&logo=apify)](https://apify.com)
[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

> **Professional job scraper for Naukri.com** - Extract comprehensive job listings with advanced browser automation and residential proxies. Perfect for AI agents, ChatGPT plugins, Claude integrations, and MCP-powered automation workflows! 🤖

### 🎯 Features

✨ **Comprehensive Data Extraction**

- Job ID, title, company name
- Salary ranges and compensation
- Experience requirements (min/max years)
- Location and workplace details
- Skills and technologies required
- Full job descriptions
- Direct job URLs

🔒 **Anti-Bot Protection**

- Camoufox browser automation with realistic fingerprinting
- Residential proxy support via Apify
- Human-like behavior simulation
- GeoIP matching for proxy authenticity

🛡️ **Production-Ready**

- Robust error handling with retries
- Graceful degradation (null for missing fields)
- Real-time data pushing to Apify dataset
- Comprehensive logging and monitoring

🤖 **AI-Friendly**

- Built for Claude, ChatGPT, and MCP agents
- Clean, structured JSON output
- Timestamp tracking for data freshness
- Easy integration with AI workflows

### 📊 Output Schema

Each job listing includes the following fields:

| Field | Type | Description | Example |
|-------|------|-------------|---------|
| `jobId` | string | Unique job identifier | `"290524001234"` |
| `title` | string | Job title | `"Senior Software Engineer"` |
| `companyName` | string | Company name | `"Tech Corp India"` |
| `salary` | string|null | Salary information | `"15-25 Lacs P.A."` |
| `experienceMin` | integer|null | Minimum experience (years) | `3` |
| `experienceMax` | integer|null | Maximum experience (years) | `5` |
| `location` | string|null | Job location | `"Bangalore, Pune"` |
| `skills` | array|null | Required skills | `["Python", "AWS", "Docker"]` |
| `jobDescription` | string|null | Job description | `"We are looking for..."` |
| `jobUrl` | string|null | Direct link to job posting | `"https://www.naukri.com/..."` |
| `scrapedAt` | string | Scraping timestamp (ISO 8601) | `"2024-08-21T10:30:00.000Z"` |

### 🚀 Quick Start

#### Running on Apify Platform

1. **Create a new Actor** from this repository

2. **Configure input parameters:**
   - `searchQuery`: Job title or keywords (e.g., "software engineer")
   - `location`: City name (e.g., "bangalore") or leave empty for all locations
   - `maxResults`: Number of jobs to scrape (1-500)

3. **Run the Actor** and access results from the dataset

#### Input Example

```json
{
  "searchQuery": "data scientist",
  "location": "bangalore",
  "maxResults": 100
}
```

#### Using Prefills

We provide convenient prefills for common searches:

- 🔧 **Software Engineer - Bangalore**
- 📊 **Data Scientist - All India**
- 📱 **Product Manager - Mumbai**
- ⚙️ **DevOps Engineer - Pune**
- 💻 **Full Stack Developer - Hyderabad**

### 🤖 AI Integration Examples

#### Claude Desktop (MCP)

Use this actor directly from Claude Desktop via the Apify MCP server:

```json
{
  "apify": {
    "actorId": "your-actor-id",
    "input": {
      "searchQuery": "machine learning engineer",
      "location": "bangalore",
      "maxResults": 50
    }
  }
}
```

#### ChatGPT Actions

Integrate with ChatGPT using Apify's API:

```yaml
openapi: 3.0.0
paths:
  /v2/acts/{actorId}/runs:
    post:
      summary: Scrape Naukri.com jobs
      parameters:
        - name: actorId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                searchQuery:
                  type: string
                location:
                  type: string
                maxResults:
                  type: integer
```

#### Python Integration

```python
from apify_client import ApifyClient

client = ApifyClient('your-apify-token')

## Start the actor
run = client.actor('your-actor-id').call(run_input={
    'searchQuery': 'python developer',
    'location': 'mumbai',
    'maxResults': 100
})

## Fetch results
dataset_items = client.dataset(run['defaultDatasetId']).list_items().items

for job in dataset_items:
    print(f"{job['title']} at {job['companyName']}")
    print(f"Location: {job['location']}")
    print(f"Salary: {job['salary']}")
    print(f"Skills: {', '.join(job['skills'] or [])}")
    print(f"URL: {job['jobUrl']}\n")
```

#### Node.js Integration

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'your-apify-token' });

// Start the actor
const run = await client.actor('your-actor-id').call({
    searchQuery: 'react developer',
    location: 'bangalore',
    maxResults: 50
});

// Fetch results
const { items } = await client.dataset(run.defaultDatasetId).listItems();

items.forEach(job => {
    console.log(`${job.title} at ${job.companyName}`);
    console.log(`Location: ${job.location}`);
    console.log(`Skills: ${job.skills?.join(', ')}`);
});
```

### 🔧 Local Development

#### Prerequisites

- Python 3.11+
- Docker (for containerized testing)

#### Setup

```bash
## Clone the repository
git clone <your-repo-url>
cd naukri-job-scraper-mcp

## Install dependencies
pip install -r requirements.txt

## Set environment variables
export APIFY_TOKEN=your_apify_token

## Run locally
python -m src
```

#### Testing with Apify CLI

```bash
## Install Apify CLI
npm install -g apify-cli

## Login to Apify
apify login

## Run the actor locally
apify run
```

### 📋 Technical Details

#### Technology Stack

- **Language**: Python 3.11
- **Browser Automation**: Camoufox (Firefox-based stealth browser)
- **HTML Parsing**: BeautifulSoup4 + lxml
- **Platform**: Apify Actor Framework
- **Proxy**: Apify Residential Proxies

#### Architecture

```
┌─────────────────┐
│  Apify Platform │
└────────┬────────┘
         │
    ┌────▼─────┐
    │   Actor  │
    └────┬─────┘
         │
    ┌────▼────────┐
    │  Camoufox   │ ◄──── Residential Proxy
    │  Browser    │
    └────┬────────┘
         │
    ┌────▼──────────┐
    │  Naukri.com   │
    │  (Next.js SPA)│
    └────┬──────────┘
         │
    ┌────▼─────────┐
    │  BeautifulSoup│
    │  Parser       │
    └────┬─────────┘
         │
    ┌────▼─────────┐
    │ Apify Dataset│
    └──────────────┘
```

#### Error Handling

- **Retry Logic**: 3 attempts with exponential backoff
- **Graceful Failures**: Returns `null` for missing fields instead of crashing
- **Proxy Fallback**: Continues without proxy if residential proxy fails
- **Logging**: Comprehensive error logging for debugging

### 🌟 Use Cases

- 🎯 **Job Market Research**: Analyze salary trends and skill demands
- 🤖 **AI-Powered Job Matching**: Feed data to LLMs for personalized recommendations
- 📈 **Recruitment Analytics**: Track hiring trends and company activity
- 🔔 **Job Alerts**: Build automated notification systems
- 💼 **Career Planning**: Understand experience requirements across industries

### 🛠️ Customization

#### Modify Search Parameters

Edit `src/main.py` to add custom filters:

```python
## Add custom filters
experience_filter = actor_input.get('experienceRange', '')
salary_filter = actor_input.get('salaryMin', '')
```

#### Extend Data Extraction

Edit `src/parser.py` to extract additional fields:

```python
## Add new field extraction
posted_date = _clean_text(job_card.select_one('.posted-date').get_text())
job_data['postedDate'] = posted_date
```

### 📝 License

MIT License - feel free to use this actor for commercial or personal projects.

### 🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

### 💬 Support

- 📧 **Issues**: Open an issue on GitHub
- 💡 **Feature Requests**: Submit via GitHub Issues
- 📚 **Documentation**: [Apify Documentation](https://docs.apify.com)

### 🎉 Built With AI

This actor was built with assistance from Claude AI and is optimized for AI agent workflows, MCP integrations, and ChatGPT automation. Perfect for building intelligent job search assistants! 🚀

***

**Made with ❤️ for the AI automation community**

# Actor input Schema

## `searchQuery` (type: `string`):

Job title or keywords to search for (e.g., 'software engineer', 'data scientist', 'product manager')

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

City or location to filter jobs (e.g., 'bangalore', 'mumbai', 'delhi'). Leave empty for all locations.

## `maxResults` (type: `integer`):

Maximum number of job listings to scrape

## Actor input object example

```json
{
  "searchQuery": "software engineer",
  "location": "bangalore",
  "maxResults": 10
}
```

# Actor output Schema

## `jobId` (type: `string`):

Unique identifier for the job listing

## `title` (type: `string`):

Job title

## `companyName` (type: `string`):

Company name

## `salary` (type: `string`):

Salary range or information

## `experienceMin` (type: `string`):

Minimum years of experience required

## `experienceMax` (type: `string`):

Maximum years of experience

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

Job location

## `skills` (type: `string`):

Required skills for the job

## `jobDescription` (type: `string`):

Job description or summary

## `jobUrl` (type: `string`):

Direct URL to the job posting

## `scrapedAt` (type: `string`):

ISO 8601 timestamp when the job was scraped

# 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 = {
    "searchQuery": "software engineer",
    "location": "bangalore",
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("fervent_bus/naukri-job-scraper-mcp").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 = {
    "searchQuery": "software engineer",
    "location": "bangalore",
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("fervent_bus/naukri-job-scraper-mcp").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 '{
  "searchQuery": "software engineer",
  "location": "bangalore",
  "maxResults": 10
}' |
apify call fervent_bus/naukri-job-scraper-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fervent_bus/naukri-job-scraper-mcp"
        }
    }
}

```

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/c9FhFpKrTf1KEfiA0/builds/bhiFoIiFXnbAnYkR0/openapi.json
