1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "schemaVersion": "1.1",
10 "rows": [
11 {
12 "signalId": "nike-launch-001",
13 "brandName": "Nike",
14 "eventType": "product_launch",
15 "severity": "high",
16 "status": "active",
17 "observedAt": "2024-02-29T12:00:00Z",
18 "sourceUrl": "https://example.com/nike-launch",
19 },
20 {
21 "signalId": "nike-price-001",
22 "brandName": "Nike",
23 "eventType": "price_change",
24 "severity": "medium",
25 "status": "resolved",
26 "observedAt": "2024-03-01T12:00:00Z",
27 "sourceUrl": "https://example.com/retail/nike-price",
28 },
29 {
30 "signalId": "apple-risk-001",
31 "brandName": "Apple",
32 "eventType": "risk",
33 "severity": "critical",
34 "status": "active",
35 "observedAt": "2024-03-02T12:00:00Z",
36 "sourceUrl": "https://example.org/apple-risk",
37 },
38 {
39 "signalId": "apple-review-001",
40 "brandName": "Apple",
41 "eventType": "review",
42 "severity": "low",
43 "status": "active",
44 "observedAt": "2024-03-03T12:00:00Z",
45 "sourceUrl": "https://example.org/apple-review",
46 },
47 ],
48}
49
50
51run = client.actor("zinin/us-brand-signal-brand-summary").call(run_input=run_input)
52
53
54print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
55for item in client.dataset(run.default_dataset_id).iterate_items():
56 print(item)
57
58