1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "queries": [
12 "best crm for small business",
13 "hubspot vs salesforce",
14 "email marketing software"
15 ],
16 "brandDomains": [
17 "hubspot.com"
18 ],
19 "brandNames": [
20 "HubSpot"
21 ],
22 "competitorDomains": [
23 "salesforce.com",
24 "zoho.com",
25 "pipedrive.com"
26 ],
27 "competitorNames": [
28 "Salesforce",
29 "Zoho",
30 "Pipedrive"
31 ]
32};
33
34
35const run = await client.actor("leohryndev/google-ai-overview-brand-monitor").call(input);
36
37
38console.log('Results from dataset');
39console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
40const { items } = await client.dataset(run.defaultDatasetId).listItems();
41items.forEach((item) => {
42 console.dir(item);
43});
44
45