1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "brand": {
12 "name": "Notion",
13 "aliases": [
14 "Notion AI"
15 ],
16 "domains": [
17 "notion.so"
18 ]
19 },
20 "competitors": [
21 {
22 "name": "Coda",
23 "aliases": [],
24 "domains": [
25 "coda.io"
26 ]
27 }
28 ],
29 "prompts": [
30 "best note taking apps for teams"
31 ],
32 "engines": [
33 "google_ai_overviews",
34 "gemini"
35 ],
36 "country": "US",
37 "repeats": 1,
38 "maxSourceCostUsd": 0.05
39};
40
41
42const run = await client.actor("suslabs/ai-visibility-monitor").call(input);
43
44
45console.log('Results from dataset');
46console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
47const { items } = await client.dataset(run.defaultDatasetId).listItems();
48items.forEach((item) => {
49 console.dir(item);
50});
51
52