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 | notion.com",
12 "competitors": [
13 "Coda | coda.io",
14 "Obsidian | obsidian.md",
15 "Evernote | evernote.com",
16 "Confluence | atlassian.com"
17 ],
18 "prompts": [
19 "What is the best note-taking app for teams?",
20 "Best alternative to Confluence for a startup wiki"
21 ],
22 "models": [
23 "openai/gpt-6.1-sol",
24 "anthropic/claude-sonnet-5.5",
25 "google/gemini-3.8-flash",
26 "perplexity/sonar"
27 ]
28};
29
30
31const run = await client.actor("saliga/ai-visibility-tracker").call(input);
32
33
34console.log('Results from dataset');
35console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
36const { items } = await client.dataset(run.defaultDatasetId).listItems();
37items.forEach((item) => {
38 console.dir(item);
39});
40
41