1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "tickers",
12 "tickers": [
13 "AAPL"
14 ],
15 "searchQuery": "Apple",
16 "maxSearchResults": 10,
17 "screenerId": "day_gainers",
18 "screenerSort": "intradaymarketcap",
19 "region": "US",
20 "language": "en-US",
21 "range": "5d",
22 "interval": "1d",
23 "includePrePost": false,
24 "includeHistory": false,
25 "includeDividends": false,
26 "includeSplits": false,
27 "includeNews": false,
28 "maxNews": 10,
29 "includeFinancials": false,
30 "includeQuarterlyFinancials": false,
31 "includeHolders": false,
32 "includeInsiders": false,
33 "includeOptions": false,
34 "optionExpirations": 1,
35 "maxOptionContracts": 50,
36 "optionContractType": "both",
37 "includeRecommendations": false,
38 "includeUpgradesDowngrades": false,
39 "includeAnalystPriceTargets": false,
40 "includeEarningsHistory": false,
41 "includeEarningsEstimates": false,
42 "includeEarningsCalendar": false,
43 "includeFundData": false,
44 "includeSecFilings": false,
45 "includeInsights": false,
46 "includeRelatedSymbols": false,
47 "maxResults": 1,
48 "concurrency": 1
49};
50
51
52const run = await client.actor("nimbryxo-studio/yahoo-finance-market-data-and-fundamentals-scraper").call(input);
53
54
55console.log('Results from dataset');
56console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
57const { items } = await client.dataset(run.defaultDatasetId).listItems();
58items.forEach((item) => {
59 console.dir(item);
60});
61
62