1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "scrapeGithub": true,
12 "scrapeHuggingFace": true,
13 "scrapeNews": true,
14 "scrapeArxiv": false,
15 "sourceMaxItems": 200,
16 "englishOnly": true,
17 "aiOnly": false,
18 "includeKeywords": [],
19 "excludeKeywords": [],
20 "topics": [],
21 "maxAgeHours": 0,
22 "minScore": 0,
23 "clusterDuplicates": false,
24 "maxItems": 0,
25 "sortBy": "score",
26 "trackHistory": false,
27 "historyStoreName": "ai-hype-tracker-history",
28 "historyKey": "TREND-HISTORY",
29 "historyRetentionDays": 30,
30 "historyMaxItems": 5000,
31 "outputFormat": "all",
32 "generateDigest": false,
33 "digestMaxItems": 25,
34 "requestTimeoutSecs": 20,
35 "maxRetries": 2
36};
37
38
39const run = await client.actor("wheat_tourist/ai-hype-tracker").call(input);
40
41
42console.log('Results from dataset');
43console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
44const { items } = await client.dataset(run.defaultDatasetId).listItems();
45items.forEach((item) => {
46 console.dir(item);
47});
48
49