Skip to main content

A tool for scraping job listings from Naukri.com

Project description

🚀 Naukri.com Job Scraper

Python Version PyPI Version License Downloads

A powerful Python package for scraping job listings from Naukri.com, allowing you to search for jobs by title and collect detailed information in a CSV format. Available as both a command-line tool and a Python library.

📋 Table of Contents

✨ Features

  • 🔍 Search for jobs by title on Naukri.com
  • 📄 Export job listings to CSV files for easy analysis
  • 📊 Extract comprehensive job details including:
    • Job title
    • Company name
    • Job description
    • Company logo URL
    • Experience requirements
    • Job location
    • Posted date
    • Salary information
    • Skills required
    • Job ID and URL
  • 📱 User-friendly command-line interface
  • 📃 Page navigation functionality

📦 Requirements

  • Python 3.6+
  • requests library
  • Internet connection

💾 Installation

Using pip (recommended)

pip install naukri-scraper

From source

git clone https://github.com/pawankumar941394/naukri-scraper.git
cd naukri-scraper
pip install -e .

🚀 Usage

Method 1: Command Line Interface

# Interactive mode (will prompt for job title and page number)
naukri-scraper

# With command line arguments
naukri-scraper --title "Python Developer" --page 1

Method 2: Python Code - Interactive Mode

from naukri_scraper import scraper

# This will prompt for job title and page number
scraper.main()

Method 3: Python Code - Direct API

from naukri_scraper.scraper import scrape_jobs

# Define job search parameters
job_title = "Data Scientist"
page_number = 1

# Call the function to scrape jobs
result = scrape_jobs(job_title, page_number)

if result:
    job_count, csv_filename = result
    print(f"Found {job_count} jobs matching '{job_title}'")
    print(f"Results saved to: {csv_filename}")

Method 4: Advanced Usage with Data Analysis

import csv
import os
from naukri_scraper.scraper import scrape_jobs

# Get job data
job_title = "Machine Learning"
result = scrape_jobs(job_title, 1)

if result:
    job_count, csv_filename = result
    
    # Example: Analyze the data
    with open(csv_filename, 'r', encoding='utf-8') as f:
        reader = csv.DictReader(f)
        jobs = list(reader)
    
    # Get unique locations
    locations = set()
    for job in jobs:
        if 'Location' in job and job['Location'] != 'N/A':
            locations.add(job['Location'])
    
    print(f"Found jobs in {len(locations)} different locations")

📁 Package Structure

naukri_scraper/
├── __init__.py     # Package initialization
├── scraper.py      # Main scraping functionality
├── headers.py      # Contains headers configuration for HTTP requests
└── cookies.py      # Contains cookies configuration for HTTP requests

🔧 How It Works

  1. The package sends an HTTP request to Naukri.com's API with your search query
  2. It uses custom headers and cookies to simulate a browser session
  3. The API response is parsed to extract job details
  4. Job information is displayed in the terminal and saved to a CSV file
  5. The CSV file can be further analyzed using Python's data analysis tools
  6. You can search for multiple job titles by running the tool again

📊 Sample Output

The script generates a CSV file with the following columns:

  • Title
  • Company
  • Job Description
  • Logo URL
  • Experience
  • Location
  • Posted Date
  • Salary
  • Job ID
  • Job URL
  • Skills

📈 Example Code

See EXAMPLES.md for more detailed examples of how to use this package in your projects.

💻 Complete Usage Guide

For a comprehensive guide on installation, usage, and advanced features, see USAGE_GUIDE.md.

👥 Contributing

Contributions are welcome! Feel free to submit pull requests or open issues to improve this project.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

🔗 Connect With Me

YouTube LinkedIn Instagram Agency

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.


Developed with ❤️ by Pawan Kumar

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

naukri_scraper-0.1.1.tar.gz (9.7 kB view details)

Uploaded Source

File details

Details for the file naukri_scraper-0.1.1.tar.gz.

File metadata

  • Download URL: naukri_scraper-0.1.1.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for naukri_scraper-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e29f77d129574b0438de2b8f08bc3e3b4cd39dd24261f62407fac4074bbcc244
MD5 a133c03022e759d559b0bcf3e89f689e
BLAKE2b-256 b144364fc6f5b3a9cc448498ffabe7e339f6f6479f05e2a469e73007644dc997

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page