1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "icp": "Dental practices that offer cosmetic dentistry such as teeth whitening, veneers or smile makeovers.",
12 "places": [
13 {
14 "title": "Kimberly Smiles Cosmetic & General Dentistry",
15 "categoryName": "Dentist",
16 "categories": [
17 "Dentist",
18 "Cosmetic dentist",
19 "Emergency dental service",
20 "Oral surgeon",
21 "Teeth whitening service"
22 ],
23 "website": "https://dentistwickerparkchicago.com/",
24 "phone": "(773) 276-1047",
25 "city": "Chicago",
26 "totalScore": 4.7,
27 "reviewsCount": 484
28 },
29 {
30 "title": "Kids Tooth Team",
31 "categoryName": "Pediatric dentist",
32 "categories": [
33 "Pediatric dentist",
34 "Dental clinic",
35 "Dental hygienist",
36 "Dentist",
37 "Emergency dental service"
38 ],
39 "website": "https://kidstoothteam.com/locations/our-south-austin-office/",
40 "phone": "(512) 641-4914",
41 "city": "Austin",
42 "totalScore": 4.9,
43 "reviewsCount": 740,
44 "additionalInfo": {
45 "Service options": [
46 {
47 "English": true
48 }
49 ],
50 "Offerings": [
51 {
52 "Emergency services": true
53 },
54 {
55 "Pediatric care": true
56 },
57 {
58 "Sedation dentistry": true
59 }
60 ]
61 }
62 }
63 ]
64};
65
66
67const run = await client.actor("leoworks/google-maps-lead-qualifier").call(input);
68
69
70console.log('Results from dataset');
71console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
72const { items } = await client.dataset(run.defaultDatasetId).listItems();
73items.forEach((item) => {
74 console.dir(item);
75});
76
77