1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "prompts": [
12 "best CRM software for small business",
13 "HubSpot vs Salesforce for mid-market teams"
14 ],
15 "brandName": "HubSpot",
16 "brandDomains": [
17 "hubspot.com"
18 ],
19 "brandAliases": [
20 "HubSpot CRM"
21 ],
22 "competitors": [
23 {
24 "name": "Salesforce",
25 "domains": [
26 "salesforce.com"
27 ],
28 "aliases": [
29 "SFDC",
30 "Sales Cloud"
31 ]
32 },
33 {
34 "name": "Pipedrive",
35 "domains": [
36 "pipedrive.com"
37 ],
38 "aliases": []
39 },
40 {
41 "name": "Zoho CRM",
42 "domains": [
43 "zoho.com"
44 ],
45 "aliases": [
46 "Zoho"
47 ]
48 }
49 ],
50 "engines": [
51 "google_ai_overview",
52 "perplexity",
53 "openai_web_search",
54 "duckduckgo_search"
55 ]
56};
57
58
59const run = await client.actor("vesper_studio/ai-search-geo-visibility-monitor").call(input);
60
61
62console.log('Results from dataset');
63console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
64const { items } = await client.dataset(run.defaultDatasetId).listItems();
65items.forEach((item) => {
66 console.dir(item);
67});
68
69