1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "jobKeywords": [
12 "software engineer"
13 ],
14 "jobTitle": "Software Engineer",
15 "jobCompany": "",
16 "jobSkills": [],
17 "jobLocation": "New York, NY",
18 "radiusMiles": 25,
19 "jobExperienceLevels": [
20 "internship",
21 "entry",
22 "associate",
23 "mid_senior",
24 "director",
25 "executive"
26 ],
27 "jobTypes": [
28 "full_time",
29 "part_time",
30 "contract",
31 "temporary",
32 "internship"
33 ],
34 "jobRemote": [
35 "onsite",
36 "remote",
37 "hybrid"
38 ],
39 "jobDatePosted": "any",
40 "jobsPerQuery": 25,
41 "industryFilter": "",
42 "educationLevels": [],
43 "easyApply": false,
44 "externalApplyOnly": false,
45 "excludeListingKeys": [],
46 "enableCompanyJobs": false,
47 "companyNames": [],
48 "jobsPerCompany": 25,
49 "enableScrapeByUrl": false,
50 "scrapeUrls": [],
51 "fetchJobDetails": true,
52 "includeRaw": false,
53 "webhookUrl": "",
54 "webhookFormat": "json",
55 "country": "us",
56 "maxItems": 10000
57};
58
59
60const run = await client.actor("b2b_leads/ziprecruiter-job-real-time-data").call(input);
61
62
63console.log('Results from dataset');
64console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
65const { items } = await client.dataset(run.defaultDatasetId).listItems();
66items.forEach((item) => {
67 console.dir(item);
68});
69
70