1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "snapshots": [
12 {
13 "query": "best appointment software",
14 "surface": "synthetic_demo",
15 "country": "IN",
16 "language": "en",
17 "device": "desktop",
18 "observedAt": "2026-11-02T10:00:00Z",
19 "text": "Acme and Rival offer appointment tools. Acme provides online scheduling.",
20 "sources": [
21 {
22 "url": "https://acme.example/scheduling",
23 "title": "Acme scheduling"
24 }
25 ]
26 }
27 ],
28 "brands": [
29 {
30 "name": "Acme",
31 "aliases": [
32 "Acme"
33 ],
34 "domains": [
35 "acme.example"
36 ]
37 },
38 {
39 "name": "Rival",
40 "aliases": [
41 "Rival"
42 ],
43 "domains": [
44 "rival.example"
45 ]
46 }
47 ],
48 "maxSnapshots": 5,
49 "baselineSnapshots": [
50 {
51 "query": "best appointment software",
52 "surface": "synthetic_demo",
53 "country": "IN",
54 "language": "en",
55 "device": "desktop",
56 "observedAt": "2026-11-01T10:00:00Z",
57 "text": "Rival offers appointment tools for clinics.",
58 "sources": [
59 {
60 "url": "https://rival.example/product",
61 "title": "Rival"
62 }
63 ]
64 }
65 ]
66};
67
68
69const run = await client.actor("variable_mitts/aeo-citation-change-tracker").call(input);
70
71
72console.log('Results from dataset');
73console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
74const { items } = await client.dataset(run.defaultDatasetId).listItems();
75items.forEach((item) => {
76 console.dir(item);
77});
78
79