1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "businesses": [
12 {
13 "title": "Reimagine Roofing",
14 "phone": "+1480-900-7663",
15 "address": "1100 E Washington St #200, Phoenix, AZ 85034, United States",
16 "categoryName": "Roofing contractor"
17 },
18 {
19 "title": "Lyons Roofing",
20 "phone": "+1602-276-5515",
21 "address": "878 W Illini St, Phoenix, AZ 85041, United States",
22 "categoryName": "Roofing contractor"
23 },
24 {
25 "title": "Trademark Roofing",
26 "phone": "+1602-361-7618",
27 "address": "2942 N 24th St Unit 114, Phoenix, AZ 85016, United States",
28 "categoryName": "Roofing contractor"
29 },
30 {
31 "title": "San Diego County Roofing & Solar",
32 "phone": "+1855-732-6868",
33 "address": "1761 Hotel Cir S Ste 110, San Diego, CA 92108, United States",
34 "categoryName": "Roofing contractor"
35 },
36 {
37 "title": "Pioneer Roofing Company",
38 "phone": "+1619-432-7663",
39 "address": "3111 Camino Del Rio N #400, San Diego, CA 92108, United States",
40 "categoryName": "Roofing contractor"
41 },
42 {
43 "title": "RSI Roofing",
44 "phone": "+1858-278-7200",
45 "address": "8285 Buckhorn St, San Diego, CA 92111, United States",
46 "categoryName": "Roofing contractor"
47 }
48 ]
49};
50
51
52const run = await client.actor("wellbuilt_zythem/google-maps-contractor-license-check").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