1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "sources": [
12 "greenhouse",
13 "lever",
14 "remoteok",
15 "weworkremotely",
16 "yc",
17 "otta",
18 "ashby"
19 ],
20 "keywords": [
21 "Python",
22 "PyTorch",
23 "LLM",
24 "machine learning"
25 ],
26 "companies": [
27 "OpenAI",
28 "Anthropic",
29 "Google",
30 "Meta"
31 ],
32 "experienceLevels": [
33 "intern",
34 "entry",
35 "mid",
36 "senior",
37 "staff",
38 "lead",
39 "executive"
40 ]
41};
42
43
44const run = await client.actor("lissome_dancer/ai-ml-jobs-scraper").call(input);
45
46
47console.log('Results from dataset');
48console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
49const { items } = await client.dataset(run.defaultDatasetId).listItems();
50items.forEach((item) => {
51 console.dir(item);
52});
53
54