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 "brandDomain": "notion.com",
13 "brandDomains": [
14 "notion.site"
15 ],
16 "prompts": [
17 "best note taking app for teams",
18 "notion alternatives"
19 ],
20 "competitors": [
21 {
22 "name": "Coda",
23 "domain": "coda.io"
24 },
25 {
26 "name": "Obsidian",
27 "domain": "obsidian.md"
28 }
29 ]
30};
31
32
33const run = await client.actor("qlufiq/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