1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "requirements": [
12 {
13 "key": "source_access",
14 "required": true,
15 "allowed_values": [],
16 "match_mode": "present",
17 "weight": 1
18 }
19 ],
20 "attributes": {
21 "source_access": {
22 "values": [
23 "available"
24 ]
25 }
26 },
27 "required_evidence_classes": [
28 "official_notice"
29 ],
30 "required_source_ids": [
31 "port-authority"
32 ],
33 "evidence": [
34 {
35 "id": "notice",
36 "evidence_class": "official_notice",
37 "source": {
38 "id": "port-authority",
39 "url": "https://example.org/notice"
40 },
41 "evidence_kind": "TRANSMITTED",
42 "observed_at": "2026-09-06T10:00:00Z",
43 "max_age_seconds": 86400
44 }
45 ]
46};
47
48
49const run = await client.actor("suezcanal.xyz/task-feasibility").call(input);
50
51
52console.log('Results from dataset');
53console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
54const { items } = await client.dataset(run.defaultDatasetId).listItems();
55items.forEach((item) => {
56 console.dir(item);
57});
58
59