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 {
13 "name": "Slack",
14 "url": "https://slack.com/pricing",
15 "category": "team_software"
16 },
17 {
18 "name": "Notion",
19 "url": "https://www.notion.com/pricing",
20 "category": "productivity"
21 }
22 ],
23 "keywords": [
24 "free",
25 "starter",
26 "pro",
27 "business",
28 "enterprise",
29 "annual",
30 "monthly",
31 "seat",
32 "user",
33 "trial",
34 "discount",
35 "contact sales"
36 ]
37};
38
39
40const run = await client.actor("signaltools/competitor-pricing-page-change-monitor").call(input);
41
42
43console.log('Results from dataset');
44console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
45const { items } = await client.dataset(run.defaultDatasetId).listItems();
46items.forEach((item) => {
47 console.dir(item);
48});
49
50