1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "schemaVersion": "1.1",
10 "groupingMode": "brand",
11 "rows": [
12 {
13 "signalId": "sig-nike-launch-001",
14 "brandName": "Nike",
15 "eventType": "product_launch",
16 "severity": "high",
17 "analysisStatus": "unreviewed",
18 },
19 {
20 "signalId": "sig-nike-price-002",
21 "brandName": "Nike",
22 "eventType": "price_change",
23 "severity": "medium",
24 "analysisStatus": "reviewed",
25 },
26 {
27 "signalId": "sig-acme-recall-003",
28 "brandName": "Acme Labs",
29 "eventType": "recall",
30 "severity": "critical",
31 "analysisStatus": "reviewed",
32 },
33 {
34 "signalId": "sig-contoso-news-004",
35 "brandName": "Contoso",
36 "eventType": "news_item",
37 "severity": "low",
38 "analysisStatus": "unknown",
39 },
40 ],
41}
42
43
44run = client.actor("zinin/us-brand-signal-batch-splitter").call(run_input=run_input)
45
46
47print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
48for item in client.dataset(run.default_dataset_id).iterate_items():
49 print(item)
50
51