1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "currentItems": [
10 {
11 "id": "c1",
12 "issuer": "Acme Corp",
13 "agency": "Agency A",
14 "rating": "BBB-",
15 "action": "downgrade",
16 "ratingScore": 6,
17 },
18 {
19 "id": "c2",
20 "issuer": "Acme Corp",
21 "agency": "Agency B",
22 "rating": "BBB",
23 "outlook": "negative",
24 "ratingScore": 7,
25 },
26 {
27 "id": "c3",
28 "issuer": "Beta Corp",
29 "agency": "Agency A",
30 "rating": "A",
31 "ratingScore": 9,
32 },
33 ],
34 "previousItems": [
35 {
36 "id": "c1",
37 "issuer": "Acme Corp",
38 "agency": "Agency A",
39 "rating": "BBB",
40 "action": "affirm",
41 "ratingScore": 7,
42 },
43 {
44 "id": "c2",
45 "issuer": "Acme Corp",
46 "agency": "Agency B",
47 "rating": "BBB",
48 "outlook": "stable",
49 "ratingScore": 7,
50 },
51 {
52 "id": "c3",
53 "issuer": "Beta Corp",
54 "agency": "Agency A",
55 "rating": "A",
56 "ratingScore": 9,
57 },
58 ],
59}
60
61
62run = client.actor("quanmatrix/credit-rating-action-drift-intelligence").call(run_input=run_input)
63
64
65print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
66for item in client.dataset(run.default_dataset_id).iterate_items():
67 print(item)
68
69