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 "competitors": [
13 "Coda",
14 "Obsidian"
15 ],
16 "prompts": [
17 "What are the best alternatives to {brand}?",
18 "Is {brand} worth it in 2026?",
19 "What are the top tools like {brand}?"
20 ],
21 "engines": [
22 "openai",
23 "anthropic",
24 "gemini",
25 "perplexity"
26 ],
27 "samplesPerPrompt": 1,
28 "models": {},
29 "demoMode": false
30};
31
32
33const run = await client.actor("apricot_blackberry/ai-answer-visibility-tracker").call(input);
34
35
36console.log('Results from dataset');
37console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
38const { items } = await client.dataset(run.defaultDatasetId).listItems();
39items.forEach((item) => {
40 console.dir(item);
41});
42
43