You can install using npm.
npm install indeed-scraper
Include the package
const indeed = require('indeed-scraper');
Query Indeed:
const queryOptions = {
host: 'www.indeed.com',
query: 'Software',
city: 'Seattle, WA',
radius: '25',
level: 'entry_level',
jobType: 'fulltime',
maxAge: '7',
sort: 'date',
limit: 100
};
indeed.query(queryOptions).then(res => {
console.log(res); // An array of Job objects
});
query() accepts a queryOptions object and returns a Promise of an array of Job objects.
-
queryOptions object:
- host - string - The host to query. (country overview) - Default: 'www.indeed.com'
- query - string - The text to search. (i.e. Software Developer) - Default: Empty String
- city - string - The name of the city. Should be in the format 'Seattle, WA'. - Default: Empty String
- radius - string - The search radius in miles - Default: '25'
- level - string entry_level, mid_level, or senior_level - Default: Empty String
- jobType - string - fulltime, contract, parttime, temporary, internship, commission - Default: Empty String
- maxAge - string - The maximum age of jobs that are returned - Default: Empty String (No max age)
- sort - string - relevance, date - Default: 'relevance'
- limit - number - The maximum number of jobs to return - Default: 0 (No limit)
- excludeSponsored - boolean - Exclude sponsored job postings from the results - Default: false
-
Job object:
- title - string - Title of the job
- company - string - Company Name
- location - string - Location of the job
- summary - string - Beginning of the job description
- url - string - Url of the job page
- postDate - string - A string describing how long ago the job was posted
- salary - string - A string with salary information (can be empty)
If you have an idea on how to improve this package, feel free to contribute!
- Clone or fork the repository
- Make changes
- Submit a pull request