1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "items": [
12 {
13 "title": "Harbor Street Cafe",
14 "text": "Waited 35 minutes for two flat whites and the barista forgot one of them. Cakes were lovely though.",
15 "stars": 2,
16 "publishedAtDate": "2026-10-20T09:12:00Z",
17 "reviewId": "sample-1"
18 },
19 {
20 "title": "Harbor Street Cafe",
21 "text": "Great coffee and very friendly staff, but the bathroom was dirty and out of soap.",
22 "stars": 3,
23 "publishedAtDate": "2026-10-11T14:40:00Z",
24 "reviewId": "sample-2"
25 },
26 {
27 "title": "Harbor Street Cafe",
28 "text": "Best almond croissant in town. Quick service even on a busy Saturday.",
29 "stars": 5,
30 "publishedAtDate": "2026-09-27T10:05:00Z",
31 "reviewId": "sample-3"
32 }
33 ]
34};
35
36
37const run = await client.actor("seasons-ai/reviews-to-fix-list").call(input);
38
39
40console.log('Results from dataset');
41console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
42const { items } = await client.dataset(run.defaultDatasetId).listItems();
43items.forEach((item) => {
44 console.dir(item);
45});
46
47