1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "sector": "bakery",
12 "location": "Austin",
13 "resultLimit": 5,
14 "dataRightsConfirmed": true,
15 "businesses": [
16 {
17 "businessName": "Demo Bakery Alpha",
18 "sector": "bakery",
19 "location": "Austin TX",
20 "ratingSource": "Fictional demonstration data",
21 "sourceUrl": "https://example.org/ratings/alpha",
22 "rating": 2.1,
23 "reviewCount": 58,
24 "ratingDate": "2026-09-12",
25 "websiteUrl": "https://example.org"
26 },
27 {
28 "businessName": "Demo Bakery Bravo",
29 "sector": "bakery",
30 "location": "Austin TX",
31 "ratingSource": "Fictional demonstration data",
32 "sourceUrl": "https://example.org/ratings/bravo",
33 "rating": 2.5,
34 "reviewCount": 30,
35 "ratingDate": "2026-09-14",
36 "websiteUrl": "https://example.org"
37 },
38 {
39 "businessName": "Demo Bakery Charlie",
40 "sector": "bakery",
41 "location": "Austin TX",
42 "ratingSource": "Fictional demonstration data",
43 "sourceUrl": "https://example.org/ratings/charlie",
44 "rating": 2.8,
45 "reviewCount": 48,
46 "ratingDate": "2026-09-30",
47 "websiteUrl": "https://example.org"
48 },
49 {
50 "businessName": "Demo Bakery Delta",
51 "sector": "bakery",
52 "location": "Austin TX",
53 "ratingSource": "Fictional demonstration data",
54 "sourceUrl": "https://example.org/ratings/delta",
55 "rating": 2.6,
56 "reviewCount": 100,
57 "ratingDate": "2026-10-01",
58 "websiteUrl": "https://example.org"
59 },
60 {
61 "businessName": "Demo Bakery Echo",
62 "sector": "bakery",
63 "location": "Austin TX",
64 "ratingSource": "Fictional demonstration data",
65 "sourceUrl": "https://example.org/ratings/echo",
66 "rating": 2.9,
67 "reviewCount": 12,
68 "ratingDate": null,
69 "websiteUrl": "https://example.org"
70 }
71 ],
72 "inspectContacts": false
73};
74
75
76const run = await client.actor("afkdigital/b2b-reputation-opportunity-analyzer").call(input);
77
78
79console.log('Results from dataset');
80console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
81const { items } = await client.dataset(run.defaultDatasetId).listItems();
82items.forEach((item) => {
83 console.dir(item);
84});
85
86