Integrations · Programming languages
Load job postings data into Node.js
Stream job posts in Node.js with built-in fetch and an async generator - no dependencies.
Steps
You need: Node.js 18+, API key in the JOBDATA_API_KEY environment variable and a jobdata API key.
- Save the script as
jobs.mjs(top-level await needs an ES module). - Pass any filters to
fetchJobs(); pagination is handled for you. - Replace the
console.logwith your own storage or indexing step.
const API_KEY = process.env.JOBDATA_API_KEY;
async function* fetchJobs(params) {
let url = 'https://jobdataapi.com/api/jobs/?' +
new URLSearchParams({ page_size: 1000, ...params });
while (url) {
const res = await fetch(url, { headers: { Authorization: `Api-Key ${API_KEY}` } });
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
yield* data.results;
url = data.next;
}
}
for await (const job of fetchJobs({ max_age: 1, has_remote: 'true' })) {
console.log(job.id, job.title, job.company.name, job.application_url);
}
Notes
- Keep requests sequential, as in the generator above; see the optimization guide for throughput tips.
- Run it daily with
max_age=1to pick up new job posts; on access lite, dropmax_age- the feed covers the past 90 days and upserting byidkeeps it free of duplicates.
Related docs and tutorials
Optimizing API Requests: A Guide to Efficient jobdata API Usage
A guide on how to make efficient requests using sessions and handle large data sets with pagination.
Jobs API Ingestion Guide: Reliable Historical Backfills and Incremental Syncs
A practical guide to high-volume historical backfills and incremental syncs using bounded windows, multi-pass pagination, ID deduplication, and reconciliation.
Date, ID, and Age Slicing Parameters Documentation
Slice smarter, sync faster: precise dataset windows for the /api/jobs/ endpoint
Ready to load real data?
All endpoints are public for limited testing - run the script without a key to see the structure, then add your key. Flat monthly plans with unlimited usage.
More integrations
Explore jobdata API with AI tools
Ask an AI assistant how to search and build with live job data.