1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "startUrls": [
12 {
13 "url": "https://www.linkedin.com/jobs/search/?f_TPR=r604800&geoId=100025096&keywords=data+scientist"
14 }
15 ],
16 "keyword": [
17 "Software Engineer"
18 ],
19 "locations": [
20 "Montreal, Canada"
21 ],
22 "publishedAt": "r86400",
23 "aiQuestions": [
24 {
25 "id": "workModel",
26 "question": "Is this job remote, hybrid or on site?",
27 "choices": [
28 "remote | Work fully from home",
29 "hybrid | Mix of office and home",
30 "on-site | Work fully at the employer's location",
31 "unknown | The description does not say"
32 ],
33 "expected": [
34 "remote",
35 "hybrid"
36 ]
37 },
38 {
39 "id": "visaSponsorship",
40 "question": "Does the employer offer visa sponsorship?",
41 "choices": [
42 "yes | The description says visa sponsorship or work permit support is offered",
43 "no | The description says sponsorship is not offered or work authorization is required",
44 "unknown | The description does not mention it"
45 ],
46 "expected": [
47 "yes"
48 ]
49 },
50 {
51 "id": "language",
52 "question": "Which languages must the candidate speak?",
53 "choices": [
54 "english only",
55 "french only",
56 "english and french | Fluency in both languages is required",
57 "other | Any other language requirement",
58 "unknown | The description does not say"
59 ]
60 }
61 ],
62 "resumeKeywords": [
63 {
64 "keyword": "TypeScript",
65 "aliases": [
66 "TS",
67 "JS",
68 "JavaScript"
69 ]
70 },
71 {
72 "keyword": "Node.js",
73 "aliases": [
74 "Node",
75 "NodeJS"
76 ]
77 },
78 {
79 "keyword": "React",
80 "aliases": [
81 "RN",
82 "React Native",
83 "Expo",
84 "ReactJS"
85 ]
86 },
87 {
88 "keyword": "SQL",
89 "aliases": [
90 "PostgreSQL"
91 ]
92 },
93 {
94 "keyword": "Tools",
95 "aliases": [
96 "Git",
97 "Docker",
98 "Jira",
99 "Postman",
100 "GitHub",
101 "GitLab",
102 "GitHub Copilot",
103 "Webpack"
104 ]
105 }
106 ]
107};
108
109
110const run = await client.actor("cheap_scraper/linkedin-job-scraper").call(input);
111
112
113console.log('Results from dataset');
114console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
115const { items } = await client.dataset(run.defaultDatasetId).listItems();
116items.forEach((item) => {
117 console.dir(item);
118});
119
120