1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "leftItems": [
12 {
13 "id": "job-1",
14 "title": "Data Engineer"
15 },
16 {
17 "id": "job-2",
18 "title": "Product Analyst"
19 }
20 ],
21 "rightItems": [
22 {
23 "id": "job-1",
24 "company": "Acme",
25 "status": "open"
26 },
27 {
28 "id": "job-3",
29 "company": "Beta",
30 "status": "open"
31 }
32 ]
33};
34
35
36const run = await client.actor("eager_vitamin/apify-dataset-join-enrichment").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46