1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "brand": "Apify",
12 "brandDomains": [
13 "apify.com"
14 ],
15 "competitors": [
16 "Bright Data | brightdata.com",
17 "Zyte | zyte.com",
18 "ScrapingBee | scrapingbee.com",
19 "Oxylabs | oxylabs.io"
20 ],
21 "prompts": [
22 "What are the best web scraping platforms?",
23 "Which tool can I use to scrape a website without writing code?",
24 "What is a good alternative to Bright Data for web scraping?"
25 ],
26 "samplesPerPrompt": 1,
27 "openaiModel": "gpt-6-luna",
28 "anthropicModel": "claude-haiku-5-5",
29 "anthropicEffort": "low",
30 "perplexityModel": "sonar",
31 "webSearch": true,
32 "maxSearchesPerAnswer": 2,
33 "maxOutputTokens": 1200,
34 "timeoutSecs": 120,
35 "maxRetries": 3,
36 "concurrency": 3
37};
38
39
40const run = await client.actor("devdarfy/ai-brand-visibility-tracker").call(input);
41
42
43console.log('Results from dataset');
44console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
45const { items } = await client.dataset(run.defaultDatasetId).listItems();
46items.forEach((item) => {
47 console.dir(item);
48});
49
50