1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "jsonData": [
12 {
13 "searchString": "plumber",
14 "rank": 1,
15 "title": "Example Plumbing Co",
16 "categoryName": "Plumber",
17 "city": "Austin",
18 "countryCode": "US",
19 "website": "https://example.com/",
20 "phone": "(512) 555-0100",
21 "claimThisBusiness": false,
22 "totalScore": 4.8,
23 "reviewsCount": 240,
24 "imagesCount": 85,
25 "placeId": "example-1",
26 "reviews": [
27 {
28 "stars": 5,
29 "text": "Fast and friendly, fixed the leak the same day.",
30 "publishedAtDate": "2026-11-01T10:00:00.000Z",
31 "responseFromOwnerText": "Thank you!",
32 "responseFromOwnerDate": "2026-11-02T10:00:00.000Z"
33 }
34 ]
35 },
36 {
37 "searchString": "plumber",
38 "rank": 2,
39 "title": "Sample Pipe Repair",
40 "categoryName": "Plumber",
41 "city": "Austin",
42 "countryCode": "US",
43 "website": null,
44 "phone": "(512) 555-0199",
45 "claimThisBusiness": true,
46 "totalScore": 3.9,
47 "reviewsCount": 14,
48 "imagesCount": 3,
49 "placeId": "example-2",
50 "reviews": [
51 {
52 "stars": 1,
53 "text": "Never called back and the sink is still leaking.",
54 "publishedAtDate": "2026-10-20T10:00:00.000Z",
55 "responseFromOwnerText": null
56 }
57 ]
58 }
59 ]
60};
61
62
63const run = await client.actor("weav3rx/google-maps-business-audit").call(input);
64
65
66console.log('Results from dataset');
67console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
68const { items } = await client.dataset(run.defaultDatasetId).listItems();
69items.forEach((item) => {
70 console.dir(item);
71});
72
73