Skip to main content

Overview

The JobPost interface represents a single job posting scraped from a job board. It contains all available information about the job, including the title, company, location, compensation, and description.

Interface Definition

export interface JobPost {
  // Core fields
  id?: string;
  title: string;
  company_name?: string;
  job_url: string;
  job_url_direct?: string;
  location?: Location;
  description?: string;
  company_url?: string;
  company_url_direct?: string;
  job_type?: JobType[];
  compensation?: Compensation;
  date_posted?: string;
  emails?: string[];
  is_remote?: boolean;
  listing_type?: string;

  // LinkedIn specific
  job_level?: string;
  job_function?: string;

  // LinkedIn and Indeed specific
  company_industry?: string;

  // Indeed specific
  company_addresses?: string;
  company_num_employees?: string;
  company_revenue?: string;
  company_description?: string;
  company_logo?: string;
  banner_photo_url?: string;

  // Naukri specific
  skills?: string[];
  experience_range?: string;
  company_rating?: number;
  company_reviews_count?: number;
  vacancy_count?: number;
  work_from_home_type?: string;
}

Fields

Core Fields

These fields are common across all job boards:
id
string
Unique identifier for the job posting (may be site-specific)
title
string
required
Job title (e.g., “Senior Software Engineer”)
company_name
string
Name of the hiring company
job_url
string
required
URL to the job posting on the job board
job_url_direct
string
Direct application URL (bypasses job board, goes to company site)
location
Location
Geographic location of the job. See Location interface.
description
string
Full job description text. Format depends on description_format parameter.
company_url
string
URL to the company’s profile page on the job board
company_url_direct
string
Direct URL to the company’s website
job_type
JobType[]
Array of job types (e.g., [JobType.FULL_TIME, JobType.REMOTE]). See JobType enum.
compensation
Compensation
Salary/wage information. See Compensation interface.
date_posted
string
Date the job was posted (ISO 8601 format or relative date string)
emails
string[]
Contact email addresses extracted from the job posting
is_remote
boolean
Whether the job is remote/work-from-home
listing_type
string
Type of listing (e.g., “organic”, “sponsored”)

LinkedIn-Specific Fields

job_level
string
Seniority level (e.g., “Mid-Senior level”, “Entry level”)
job_function
string
Job function/department (e.g., “Engineering”, “Sales”)

Indeed-Specific Fields

company_addresses
string
Physical addresses of the company
company_num_employees
string
Number of employees at the company (e.g., “1,000-5,000”)
company_revenue
string
Company revenue information
company_description
string
Description of the company
URL to the company’s logo image
banner_photo_url
string
URL to the company’s banner/header image

Naukri-Specific Fields

skills
string[]
Required skills for the job
experience_range
string
Years of experience required (e.g., “2-5 years”)
company_rating
number
Company rating on Naukri (0-5 scale)
company_reviews_count
number
Number of company reviews on Naukri
vacancy_count
number
Number of open positions for this job
work_from_home_type
string
Work from home policy (e.g., “Full Time”, “Hybrid”)

Shared Fields

company_industry
string
Industry/sector of the company (available on LinkedIn and Indeed)

Example

import { scrapeJobs, JobPost } from 'jobspy-js';

const response = await scrapeJobs({
  site_name: ['linkedin', 'indeed'],
  search_term: 'software engineer',
  location: 'San Francisco, CA',
  results_wanted: 10,
  description_format: 'markdown'
});

// Access job posts
response.jobs.forEach((job: JobPost) => {
  console.log(`${job.title} at ${job.company_name}`);
  console.log(`Location: ${job.location?.city}, ${job.location?.state}`);
  
  if (job.compensation) {
    console.log(
      `Salary: $${job.compensation.min_amount}-$${job.compensation.max_amount} ${job.compensation.interval}`
    );
  }
  
  console.log(`Apply: ${job.job_url}`);
  console.log('---');
});

Notes

  • Only title and job_url are guaranteed to be present. All other fields are optional and depend on what data is available from the job board.
  • Site-specific fields (LinkedIn, Indeed, Naukri) are only populated when scraping from those respective sites.
  • Use the description_format parameter in scrapeJobs() to control whether descriptions are returned as HTML, Markdown, or plain text.
  • The job_url_direct field often provides a better application experience but may not always be available.

Build docs developers (and LLMs) love