1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "deliveryMode": "compact",
12 "mode": "inline",
13 "plannerInput": {
14 "synthetic": true,
15 "namespace": "example-support-docs",
16 "checkedAt": "2026-10-13T12:00:00Z",
17 "scope": {
18 "id": "example-support-section",
19 "definition": "Exactly the two example documents below; no whole-site inventory claim."
20 },
21 "chunkBytes": 1200,
22 "source": {
23 "format": "documents",
24 "completed": true,
25 "immutable": true,
26 "inventoryComplete": false,
27 "reference": "SYNTHETIC example; replace with your dated export",
28 "items": [
29 {
30 "id": "returns",
31 "url": "https://example.test/help/returns",
32 "title": "Example returns policy",
33 "text": "SYNTHETIC: This example policy describes where customers can review return instructions. Replace this text with your actual export.",
34 "complete": true,
35 "extractionProfile": "example-v1",
36 "fetchedAt": "2026-10-13T12:00:00Z"
37 },
38 {
39 "id": "shipping",
40 "url": "https://example.test/help/shipping",
41 "title": "Example shipping policy",
42 "text": "SYNTHETIC: This example document describes shipping information. Replace this text with your actual export.",
43 "complete": true,
44 "extractionProfile": "example-v1",
45 "fetchedAt": "2026-10-13T12:00:00Z"
46 }
47 ]
48 }
49 }
50};
51
52
53const run = await client.actor("jj_toolworks/jj-knowledge-update-evidence-feed").call(input);
54
55
56console.log('Results from dataset');
57console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
58const { items } = await client.dataset(run.defaultDatasetId).listItems();
59items.forEach((item) => {
60 console.dir(item);
61});
62
63