1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "brand": "Notion",
12 "brandAliases": [
13 "notion.so",
14 "Notion AI"
15 ],
16 "competitors": [
17 "Obsidian",
18 "Coda",
19 "Evernote"
20 ],
21 "prompts": [
22 "best note taking app for students",
23 "Notion vs Obsidian which should I use",
24 "what is the best tool to organize my life"
25 ],
26 "engines": [
27 "perplexity",
28 "chatgpt"
29 ],
30 "samplesPerPrompt": 1
31};
32
33
34const run = await client.actor("chazee/ai-visibility-monitor").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