1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "feedUrls": [
12 "https://feeds.bbci.co.uk/news/rss.xml",
13 "https://news.ycombinator.com/rss",
14 "https://github.com/apify/crawlee/releases.atom",
15 "https://www.theverge.com/rss/index.xml"
16 ],
17 "opmlUrl": "",
18 "opml": "",
19 "mode": "snapshot",
20 "firstRunBehavior": "emit-all",
21 "keywords": [],
22 "excludeKeywords": [],
23 "authors": [],
24 "categories": [],
25 "maxItemsPerFeed": 25,
26 "includeContent": true,
27 "dedupe": true,
28 "webhookUrl": "",
29 "stateStoreName": "rss-feed-monitor-state",
30 "maxConcurrency": 5,
31 "maxRunSecs": 240,
32 "proxyConfiguration": {
33 "useApifyProxy": true
34 }
35};
36
37
38const run = await client.actor("insight.solutions/rss-feed-monitor").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