1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "competitorName": "Intercom",
12 "competitorAliases": [
13 "Intercom",
14 "intercom.com",
15 "Intercom support"
16 ],
17 "productCategory": "customer support software",
18 "yourProductDescription": "A simpler customer support platform for growing SaaS teams.",
19 "targetUrls": [],
20 "publicUrlSnippets": [],
21 "allowedDomains": [
22 "reddit.com",
23 "news.ycombinator.com",
24 "hn.algolia.com"
25 ],
26 "redditUserAgent": "nodejs:SwitchSignal:v1.0.0 (by /u/your_reddit_username)",
27 "redditSeedUrls": [
28 "https://www.reddit.com/r/SaaS/comments/example/intercom_alternative_discussion/"
29 ],
30 "redditSeedTexts": [
31 "Intercom has become too expensive and support is slow. Looking for alternatives."
32 ],
33 "redditSearchIndexQueries": [
34 "site:reddit.com/r/ \"Intercom alternative\"",
35 "site:reddit.com/r/ \"Intercom too expensive\""
36 ],
37 "redditSearchIndexResultUrls": [
38 "https://www.reddit.com/r/SaaS/comments/example/intercom_alternative_discussion/"
39 ],
40 "redditSearchIndexResultTitles": [
41 "Intercom alternatives before renewal"
42 ],
43 "redditSearchIndexResultSnippets": [
44 "Intercom has become too expensive and support has been painful. We are looking for alternatives before renewal."
45 ]
46};
47
48
49const run = await client.actor("neoscala/switchsignal").call(input);
50
51
52console.log('Results from dataset');
53console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
54const { items } = await client.dataset(run.defaultDatasetId).listItems();
55items.forEach((item) => {
56 console.dir(item);
57});
58
59