1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "pages": [
12 "https://buttondown.com/pricing",
13 "https://ghost.org/changelog"
14 ],
15 "pageTypes": [
16 "pricing",
17 "changelog"
18 ],
19 "mode": "changes",
20 "onlyChanged": false,
21 "changeTypes": [
22 "plan_added",
23 "plan_removed",
24 "price_changed",
25 "features_changed",
26 "changelog_added",
27 "changelog_removed",
28 "feature_added",
29 "feature_removed",
30 "extraction_failed"
31 ],
32 "monitorName": "default",
33 "maxChangelogEntries": 25,
34 "respectRobotsTxt": true,
35 "requestsPerSecond": 1,
36 "proxyConfiguration": {
37 "useApifyProxy": false
38 }
39};
40
41
42const run = await client.actor("mmdincer/saas-pricing-changelog-monitor").call(input);
43
44
45console.log('Results from dataset');
46console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
47const { items } = await client.dataset(run.defaultDatasetId).listItems();
48items.forEach((item) => {
49 console.dir(item);
50});
51
52