1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "currentItems": [
10 {
11 "id": "topic1",
12 "title": "billing complaints",
13 "mentions": 4800,
14 "negativePct": 72,
15 "velocityPct": 95,
16 "engagement": 34000,
17 "sourceCount": 420,
18 },
19 {
20 "id": "topic2",
21 "title": "new feature discussion",
22 "mentions": 1500,
23 "negativePct": 18,
24 "velocityPct": 22,
25 "engagement": 9800,
26 "sourceCount": 160,
27 },
28 ],
29 "previousItems": [{
30 "id": "topic1",
31 "title": "billing complaints",
32 "mentions": 2200,
33 "negativePct": 54,
34 "velocityPct": 41,
35 "engagement": 12000,
36 "sourceCount": 210,
37 }],
38}
39
40
41run = client.actor("quanmatrix/x-brand-narrative-crisis-intelligence").call(run_input=run_input)
42
43
44print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
45for item in client.dataset(run.default_dataset_id).iterate_items():
46 print(item)
47
48