1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "sources": [
12 {
13 "type": "serp",
14 "title": "best crm software",
15 "content": "Competitor ranks #3, we rank #9 on this keyword."
16 },
17 {
18 "type": "icerik",
19 "title": "Pricing page",
20 "content": "Competitor shows transparent pricing but has no demo video."
21 },
22 {
23 "type": "sosyal",
24 "content": "Instagram 40K followers, weekly engagement is declining."
25 }
26 ]
27};
28
29
30const run = await client.actor("enezli/ai-competitor-intelligence").call(input);
31
32
33console.log('Results from dataset');
34console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
35const { items } = await client.dataset(run.defaultDatasetId).listItems();
36items.forEach((item) => {
37 console.dir(item);
38});
39
40