1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "brand": "HubSpot",
12 "brandAliases": [
13 "HubSpot CRM"
14 ],
15 "brandDomain": "hubspot.com",
16 "questions": [
17 "best crm for small business",
18 "best free crm software"
19 ],
20 "competitors": [
21 "Salesforce",
22 "Zoho",
23 "Pipedrive",
24 "Freshsales",
25 "Monday"
26 ],
27 "proxy": {
28 "useApifyProxy": true,
29 "apifyProxyGroups": [
30 "RESIDENTIAL"
31 ]
32 }
33};
34
35
36const run = await client.actor("integrative_cafe_8pc/ai-visibility-monitor").call(input);
37
38
39console.log('Results from dataset');
40console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46