1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "brandName": "Coolblue",
12 "brandAliases": [
13 "Cool Blue"
14 ],
15 "brandDomains": [
16 "coolblue.nl",
17 "coolblue.be"
18 ],
19 "competitors": [
20 "Bol, bol.com",
21 "MediaMarkt, Media Markt, mediamarkt.nl",
22 "BCC, bcc.nl"
23 ],
24 "language": "nl",
25 "country": "NL",
26 "prompts": [],
27 "category": "webwinkels voor elektronica",
28 "keywords": [
29 "een nieuwe wasmachine",
30 "een gaming laptop"
31 ],
32 "engines": [
33 "chatgpt",
34 "perplexity",
35 "gemini"
36 ]
37};
38
39
40const run = await client.actor("prevailing_glow/ai-search-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