1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "market": "america",
12 "filters": [
13 {
14 "left": "market_cap_basic",
15 "operation": "greater",
16 "right": 1000000000
17 },
18 {
19 "left": "type",
20 "operation": "equal",
21 "right": "stock"
22 }
23 ],
24 "columns": [
25 "name",
26 "description",
27 "close",
28 "change",
29 "volume",
30 "market_cap_basic",
31 "sector",
32 "RSI",
33 "exchange",
34 "type"
35 ],
36 "sortBy": "market_cap_basic",
37 "sortOrder": "desc",
38 "maxItems": 20,
39 "proxyConfiguration": {
40 "useApifyProxy": false
41 }
42};
43
44
45const run = await client.actor("axiomworks/tradingview-screener-scraper").call(input);
46
47
48console.log('Results from dataset');
49console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
50const { items } = await client.dataset(run.defaultDatasetId).listItems();
51items.forEach((item) => {
52 console.dir(item);
53});
54
55