1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "currentItems": [
12 {
13 "placeId": "qm-a",
14 "name": "Northstar Dental",
15 "address": "Austin TX",
16 "rating": 4.6,
17 "reviews": 184,
18 "website": "https://northstar.example",
19 "phone": "+1 555 0101",
20 "email": "hello@northstar.example",
21 "category": "dentist",
22 "rank": 2
23 },
24 {
25 "placeId": "qm-b",
26 "name": "Lakeview Dental",
27 "address": "Austin TX",
28 "rating": 3.8,
29 "reviews": 57,
30 "website": "",
31 "phone": "+1 555 0102",
32 "category": "dentist",
33 "rank": 5
34 }
35 ],
36 "previousItems": [
37 {
38 "placeId": "qm-a",
39 "name": "Northstar Dental",
40 "address": "Austin TX",
41 "rating": 4.4,
42 "reviews": 150,
43 "website": "https://northstar.example",
44 "phone": "+1 555 0101",
45 "category": "dentist",
46 "rank": 4
47 }
48 ]
49};
50
51
52const run = await client.actor("quanmatrix/google-maps-lead-enrichment-icp-intelligence").call(input);
53
54
55console.log('Results from dataset');
56console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
57const { items } = await client.dataset(run.defaultDatasetId).listItems();
58items.forEach((item) => {
59 console.dir(item);
60});
61
62