1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "matches": [
10 {
11 "teams": [
12 ["ana"],
13 ["ben"],
14 ],
15 "winner": 0,
16 "timestamp": "2026-10-01T18:00:00Z",
17 },
18 {
19 "teams": [
20 ["cat"],
21 ["dan"],
22 ],
23 "winner": 1,
24 "timestamp": "2026-10-01T18:30:00Z",
25 },
26 {
27 "teams": [
28 [
29 "ana",
30 "dan",
31 ],
32 [
33 "ben",
34 "cat",
35 ],
36 ],
37 "winner": 0,
38 "timestamp": "2026-10-02T19:00:00Z",
39 },
40 {
41 "teams": [
42 ["ana"],
43 ["dan"],
44 ],
45 "ranks": [
46 0,
47 0,
48 ],
49 "timestamp": "2026-10-03T18:00:00Z",
50 },
51 {
52 "teams": [
53 ["ben"],
54 ["cat"],
55 ],
56 "winner": 0,
57 "weight": 0.5,
58 "timestamp": "2026-10-03T18:45:00Z",
59 },
60 {
61 "teams": [
62 ["ana"],
63 ["cat"],
64 ],
65 "winner": 0,
66 "timestamp": "2026-10-04T18:00:00Z",
67 },
68 ],
69 "algorithm": "openskill",
70 "predict": [
71 [
72 ["ana"],
73 ["cat"],
74 ],
75 [
76 [
77 "ana",
78 "ben",
79 ],
80 [
81 "cat",
82 "dan",
83 ],
84 ],
85 ],
86}
87
88
89run = client.actor("keith-apis/skill-rating").call(run_input=run_input)
90
91
92print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
93for item in client.dataset(run.default_dataset_id).iterate_items():
94 print(item)
95
96