1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "brandName": "Notion",
12 "brandAliases": [
13 "Notion Labs"
14 ],
15 "brandDomain": "notion.com",
16 "competitors": [
17 "Evernote",
18 "Obsidian",
19 "Coda | Coda.io | coda.io",
20 "ClickUp",
21 "Confluence"
22 ],
23 "prompts": [
24 "What is the best note-taking and knowledge management app for a small team?",
25 "Which tools should a startup use to organize documents and project wikis?"
26 ],
27 "engines": [
28 "openai",
29 "perplexity",
30 "gemini"
31 ],
32 "runsPerPrompt": 1
33};
34
35
36const run = await client.actor("tan_carrel_h1q/ai-search-brand-visibility-monitor").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46