1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "sports": ["football"],
10 "maxItems": 50,
11 "matchSections": [
12 "details",
13 "statistics",
14 "lineups",
15 "incidents",
16 "shotmap",
17 "odds",
18 "headToHead",
19 "votes",
20 "pregameForm",
21 "managers",
22 "bestPlayers",
23 "momentum",
24 "teamStreaks",
25 "highlights",
26 "averagePositions",
27 "postMatchInsights",
28 "pointByPoint",
29 "tennisPower",
30 "innings",
31 "esportsGames",
32 "series",
33 ],
34 "teamSections": [
35 "squad",
36 "transfers",
37 "achievements",
38 "rankings",
39 "performance",
40 "nearEvents",
41 "competitions",
42 "standings",
43 "seasonStatistics",
44 "featuredPlayers",
45 "lastMatches",
46 "nextMatches",
47 "grandSlamResults",
48 ],
49 "playerSections": [
50 "attributes",
51 "characteristics",
52 "transfers",
53 "nationalTeam",
54 "competitions",
55 "careerStatistics",
56 "seasonStatistics",
57 "seasonRatings",
58 "lastYearSummary",
59 "penaltyHistory",
60 "lastMatches",
61 ],
62 "tournamentSections": [
63 "seasons",
64 "seasonInfo",
65 "standings",
66 "rounds",
67 "cupTrees",
68 "groups",
69 "topPlayers",
70 "topTeams",
71 "topMatchPerformances",
72 "teamOfTheWeek",
73 "awards",
74 "topFollowedPlayers",
75 "winners",
76 "venues",
77 "teams",
78 "featuredMatches",
79 "media",
80 "lastMatches",
81 "nextMatches",
82 ],
83}
84
85
86run = client.actor("zen-studio/sofascore-scraper").call(run_input=run_input)
87
88
89print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
90for item in client.dataset(run.default_dataset_id).iterate_items():
91 print(item)
92
93