1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "sourceDatasetId": "",
12 "agencyRecords": [
13 {
14 "name": "Northstar Studio",
15 "websiteUrl": "https://example.com",
16 "rating": 4.2,
17 "reviews": [
18 "The team delivered excellent design work, but weekly communication was sometimes slow.",
19 "Strong strategy and quality. The final milestone arrived two weeks late."
20 ],
21 "sourceReference": "internal-crm-2026-07"
22 }
23 ],
24 "maxAgencies": 25,
25 "websiteEnrichment": true,
26 "maxWebsitePages": 3,
27 "responseFormat": "concise",
28 "maxConcurrency": 4
29};
30
31
32const run = await client.actor("muhammadafzal/analyze-agency-reviews").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