1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "comparisonId": "sample-jobs",
12 "baseline": [
13 {
14 "sourceId": "J-1",
15 "title": "Data Analyst",
16 "company": "Northwind",
17 "location": "Berlin",
18 "url": "https://jobs.example/J-1",
19 "description": "SQL and dashboards"
20 }
21 ],
22 "current": [
23 {
24 "sourceId": "J-1",
25 "title": "Senior Data Analyst",
26 "company": "Northwind",
27 "location": "Berlin",
28 "url": "https://jobs.example/J-1",
29 "description": "SQL, dashboards, and Python"
30 },
31 {
32 "sourceId": "J-2",
33 "title": "Data Engineer",
34 "company": "Northwind",
35 "location": "Remote",
36 "url": "https://jobs.example/J-2",
37 "description": "Build data pipelines"
38 }
39 ]
40};
41
42
43const run = await client.actor("ceddl/job-feed-change-detector").call(input);
44
45
46console.log('Results from dataset');
47console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
48const { items } = await client.dataset(run.defaultDatasetId).listItems();
49items.forEach((item) => {
50 console.dir(item);
51});
52
53