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 "brandAliases": [],
13 "brandDomains": [
14 "notion.com",
15 "notion.so"
16 ],
17 "competitors": [
18 "ClickUp | | clickup.com",
19 "Asana | | asana.com",
20 "Trello | | trello.com"
21 ],
22 "prompts": [
23 "best project management software for small teams"
24 ],
25 "engines": [
26 "google-ai-overview"
27 ],
28 "proxyConfiguration": {
29 "useApifyProxy": true,
30 "apifyProxyGroups": [
31 "GOOGLE_SERP"
32 ]
33 }
34};
35
36
37const run = await client.actor("tgelu/ai-visibility-tracker").call(input);
38
39
40console.log('Results from dataset');
41console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
42const { items } = await client.dataset(run.defaultDatasetId).listItems();
43items.forEach((item) => {
44 console.dir(item);
45});
46
47