Skip to main content
This guide will take you from installation to your first successful job scrape.

Install the Package

npm install jobspy-js
If you plan to use Google Jobs scraping, you’ll also need to install Playwright’s Chromium browser:
npx playwright install chromium

Your First Job Scrape

Create a new file and add this code:
index.ts
import { scrapeJobs } from "jobspy-js";

const result = await scrapeJobs({
  site_name: ["indeed", "linkedin"],
  search_term: "software engineer",
  location: "San Francisco, CA",
  results_wanted: 20,
});

console.log(`Found ${result.jobs.length} jobs`);
for (const job of result.jobs) {
  console.log(`${job.title} at ${job.company_name}${job.job_url}`);
}
Run it:
node index.ts
You’ll see output like:
Found 38 jobs
Software Engineer at Stripe — https://www.linkedin.com/jobs/view/123...
Senior Software Engineer at Airbnb — https://www.indeed.com/viewjob?jk=...
Staff Software Engineer at Google — https://www.linkedin.com/jobs/view/456...

Understanding the Response

The scrapeJobs() function returns a JobResponse object with a jobs array. Each job has these key fields:
interface JobPost {
  title: string;              // Job title
  company_name?: string;      // Company name
  job_url: string;            // Link to the job posting
  location?: Location;        // { city, state, country }
  description?: string;       // Job description (format: markdown/html/plain)
  compensation?: Compensation; // Salary info
  job_type?: JobType[];       // fulltime, parttime, contract, etc.
  date_posted?: string;       // When the job was posted
  is_remote?: boolean;        // Remote work availability
  // ...and more
}

Common Use Cases

Scrape Multiple Sites

Scrape all 9 supported job boards at once:
const result = await scrapeJobs({
  site_name: ["linkedin", "indeed", "glassdoor", "zip_recruiter", "google"],
  search_term: "frontend developer",
  location: "New York, NY",
  results_wanted: 50,
});

Filter by Job Type

import { scrapeJobs, JobType } from "jobspy-js";

const result = await scrapeJobs({
  site_name: ["linkedin", "indeed"],
  search_term: "data scientist",
  location: "Austin, TX",
  job_type: "fulltime", // or JobType.FULL_TIME
  results_wanted: 30,
});

Remote Jobs Only

const result = await scrapeJobs({
  site_name: ["linkedin", "indeed"],
  search_term: "react developer",
  is_remote: true,
  results_wanted: 25,
});

Filter by Posting Date

Get jobs posted in the last 24 hours:
const result = await scrapeJobs({
  site_name: ["indeed", "linkedin"],
  search_term: "python engineer",
  location: "Seattle, WA",
  hours_old: 24,
  results_wanted: 20,
});

Extract Salary Data

const result = await scrapeJobs({
  site_name: ["indeed", "glassdoor"],
  search_term: "software engineer",
  location: "San Francisco, CA",
  enforce_annual_salary: true, // Convert all salaries to annual
  results_wanted: 30,
});

// Filter jobs with salary information
const jobsWithSalary = result.jobs.filter(job => job.compensation);

for (const job of jobsWithSalary) {
  console.log(`${job.title}: ${job.compensation.min_amount}-${job.compensation.max_amount} ${job.compensation.currency} ${job.compensation.interval}`);
}

Fetch Full Job Details

Get complete information for a specific job:
import { fetchLinkedInJob, fetchJobDetails } from "jobspy-js";

// LinkedIn job by ID
const linkedInJob = await fetchLinkedInJob("4127292817");
console.log(linkedInJob.description);

// Or use fetchJobDetails for any site
const indeedJob = await fetchJobDetails("indeed", "fdde406379455a1e");
console.log(indeedJob.description);

Use Different Description Formats

import { DescriptionFormat } from "jobspy-js";

const result = await scrapeJobs({
  site_name: ["linkedin"],
  search_term: "product manager",
  location: "Boston, MA",
  description_format: "html", // or DescriptionFormat.HTML
  results_wanted: 15,
});

Search with Distance Radius

const result = await scrapeJobs({
  site_name: ["indeed"],
  search_term: "mechanical engineer",
  location: "Detroit, MI",
  distance: 25, // Search within 25 miles
  results_wanted: 20,
});

Using the CLI

JobSpy JS also provides a command-line interface:
# Basic search
jobspy -s linkedin indeed -q "react developer" -l "New York, NY" -n 20

# Remote jobs only
jobspy -s linkedin -q "typescript" -r

# CSV output
jobspy -s indeed -q "python" -o jobs.csv

# JSON output
jobspy -s linkedin glassdoor -q "data analyst" -o jobs.json
See the CLI documentation for all available options.

Using Proxies

If you need to use proxies for scraping:
const result = await scrapeJobs({
  site_name: ["linkedin", "indeed"],
  search_term: "devops engineer",
  location: "Portland, OR",
  proxies: "user:[email protected]:8080",
  results_wanted: 20,
});

// Or use multiple proxies for rotation
const result = await scrapeJobs({
  site_name: ["linkedin", "indeed"],
  search_term: "devops engineer",
  proxies: [
    "user:[email protected]:8080",
    "user:[email protected]:8080",
  ],
  results_wanted: 20,
});

Next Steps

SDK Guide

Learn about all available parameters and advanced features

CLI Reference

Explore all CLI commands and options

Authentication

Set up credentials for sites that require authentication

Job Boards

Learn about site-specific features and limitations

Build docs developers (and LLMs) love