1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "search",
12 "searchQueries": [
13 "Real Madrid"
14 ],
15 "searchType": "all",
16 "sports": [
17 "football"
18 ],
19 "daysAhead": 0,
20 "tableType": "total",
21 "rankingType": "fifa",
22 "includeStatistics": false,
23 "includeLineups": false,
24 "includeIncidents": false,
25 "includeOdds": false,
26 "includeVotes": false,
27 "includeH2h": false,
28 "includeAdvanced": false,
29 "includeComments": false,
30 "includeSquad": false,
31 "includePlayerStats": false,
32 "includeStandings": false,
33 "includeEvents": false,
34 "maxItems": 3
35};
36
37
38const run = await client.actor("vexaloom-labs/sofascore-live-scores-standings-and-team-search").call(input);
39
40
41console.log('Results from dataset');
42console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
43const { items } = await client.dataset(run.defaultDatasetId).listItems();
44items.forEach((item) => {
45 console.dir(item);
46});
47
48