1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "companies": [
12 {
13 "name": "Slack",
14 "pricing_url": "https://slack.com/pricing",
15 "category": "collaboration",
16 "competitors": [
17 "Microsoft Teams",
18 "Discord"
19 ]
20 },
21 {
22 "name": "Notion",
23 "pricing_url": "https://www.notion.so/pricing",
24 "category": "productivity",
25 "competitors": [
26 "Airtable",
27 "Monday.com"
28 ]
29 },
30 {
31 "name": "Stripe",
32 "pricing_url": "https://stripe.com/pricing",
33 "category": "payments",
34 "competitors": [
35 "PayPal",
36 "Square"
37 ]
38 }
39 ]
40};
41
42
43const run = await client.actor("mea/saaspricingintelligence").call(input);
44
45
46console.log('Results from dataset');
47console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
48const { items } = await client.dataset(run.defaultDatasetId).listItems();
49items.forEach((item) => {
50 console.dir(item);
51});
52
53