1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "brandName": "Northstar CRM",
12 "reportPeriod": "May 2026",
13 "visibilityChecks": [
14 {
15 "status": "succeeded",
16 "brandMentioned": false,
17 "brandDomainMentioned": false,
18 "visibilityScore": 5,
19 "query": "best CRM for B2B SaaS teams",
20 "modelId": "openrouter/auto",
21 "competitorsMentioned": [
22 "HubSpot",
23 "Salesforce",
24 "Pipedrive"
25 ],
26 "recommendation": "Publish comparison and alternatives content for B2B SaaS CRM buyers."
27 },
28 {
29 "status": "succeeded",
30 "brandMentioned": true,
31 "brandDomainMentioned": false,
32 "visibilityScore": 55,
33 "query": "HubSpot alternatives for product-led sales teams",
34 "modelId": "openrouter/auto",
35 "competitorsMentioned": [
36 "HubSpot"
37 ],
38 "recommendation": "Strengthen canonical domain citations and publish a direct alternatives page."
39 }
40 ]
41};
42
43
44const run = await client.actor("geneius/ai-visibility-report-generator").call(input);
45
46
47console.log('Results from dataset');
48console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
49const { items } = await client.dataset(run.defaultDatasetId).listItems();
50items.forEach((item) => {
51 console.dir(item);
52});
53
54