1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "books": [
12 "betrivers_pa",
13 "betrivers_nj"
14 ],
15 "leagues": [
16 "nfl",
17 "nba",
18 "nhl",
19 "mlb"
20 ],
21 "marketFamilies": [
22 "moneyline",
23 "spreads",
24 "totals"
25 ],
26 "periods": [
27 "game"
28 ],
29 "mainLineOnly": true,
30 "eventMarkets": false,
31 "includeRegulationTime": false,
32 "includeLive": false,
33 "maxResults": 20,
34 "requestDelaySecs": 1,
35 "proxyConfiguration": {
36 "useApifyProxy": true,
37 "apifyProxyCountry": "US"
38 }
39};
40
41
42const run = await client.actor("automatic/betrivers-odds-player-props").call(input);
43
44
45console.log('Results from dataset');
46console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
47const { items } = await client.dataset(run.defaultDatasetId).listItems();
48items.forEach((item) => {
49 console.dir(item);
50});
51
52