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