1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "forumLatest",
12 "forumId": "88",
13 "forumIds": [
14 "48",
15 "853",
16 "311"
17 ],
18 "topicIds": [
19 "1288127"
20 ],
21 "topicUrls": [
22 "https://www.biggerpockets.com/forums/311/topics/1288127-thinking-about-this-property"
23 ],
24 "usernames": [
25 "sparkrental",
26 "abelc2"
27 ],
28 "maxCommentsPerTopic": 50,
29 "maxItems": 50,
30 "maxPagesPerForum": 3
31};
32
33
34const run = await client.actor("parsebird/bigger-pockets-scraper").call(input);
35
36
37console.log('Results from dataset');
38console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
39const { items } = await client.dataset(run.defaultDatasetId).listItems();
40items.forEach((item) => {
41 console.dir(item);
42});
43
44