1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "records": [
12 {
13 "title": "Harbor Coffee",
14 "placeId": "demo-101",
15 "address": "10 Harbor Street, Izmir",
16 "location": {
17 "lat": 38.42,
18 "lng": 27.13
19 },
20 "website": "https://example.com",
21 "phone": "+90000000000"
22 },
23 {
24 "title": "Harbor Coffee",
25 "placeId": "demo-101",
26 "address": "10 Harbor Street, Izmir",
27 "location": {
28 "lat": 38.42,
29 "lng": 27.13
30 }
31 },
32 {
33 "title": "Garden Cafe",
34 "placeId": "demo-102",
35 "address": "20 Garden Avenue, Izmir",
36 "location": {
37 "lat": 38.425,
38 "lng": 27.14
39 },
40 "website": "https://example.org"
41 }
42 ]
43};
44
45
46const run = await client.actor("pbt-guard/maps-quality-guard").call(input);
47
48
49console.log('Results from dataset');
50console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
51const { items } = await client.dataset(run.defaultDatasetId).listItems();
52items.forEach((item) => {
53 console.dir(item);
54});
55
56