1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "prompts": [
12 "What are the best CRM tools for a small business?",
13 "Which email marketing platform should an ecommerce store use?",
14 "Is HubSpot worth the price for a 20 person sales team?"
15 ],
16 "brandName": "HubSpot",
17 "brandDomains": [
18 "hubspot.com"
19 ],
20 "competitorNames": [
21 "Salesforce",
22 "Zoho",
23 "Pipedrive"
24 ],
25 "competitorDomains": [
26 "salesforce.com",
27 "zoho.com"
28 ]
29};
30
31
32const run = await client.actor("santhej/chatgpt-brand-tracker").call(input);
33
34
35console.log('Results from dataset');
36console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
37const { items } = await client.dataset(run.defaultDatasetId).listItems();
38items.forEach((item) => {
39 console.dir(item);
40});
41
42