1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "items": [
12 {
13 "title": "Lime Tree Hotel",
14 "categoryName": "Hotel",
15 "website": "https://www.limetreehotel.co.uk/",
16 "phone": "+44 20 7730 8191",
17 "emails": [
18 "info@limetreehotel.co.uk"
19 ],
20 "address": "135-137 Ebury Street, London, SW1W 9QU",
21 "city": "London",
22 "countryCode": "GB"
23 },
24 {
25 "title": "The Warwick by Nestor",
26 "categoryName": "Hotel",
27 "website": "https://nestorstay.com/properties/the-warwick-by-nestor/",
28 "phone": "+44 20 3868 6192",
29 "emails": [
30 "guest@nestorstay.com"
31 ],
32 "address": "94 Warwick Way, London, SW1V 1SB",
33 "city": "London",
34 "countryCode": "GB"
35 },
36 {
37 "title": "The Warwick by Nestor",
38 "categoryName": "Hotel",
39 "website": "https://nestorstay.com/properties/the-warwick-by-nestor/",
40 "phone": "+44 20 3868 6192",
41 "emails": [
42 "guest@nestorstay.com"
43 ],
44 "address": "94 Warwick Way, London, SW1V 1SB",
45 "city": "London",
46 "countryCode": "GB"
47 },
48 {
49 "title": "The Trafalgar St. James London, Curio Collection by Hilton",
50 "categoryName": "Hotel",
51 "website": "https://www.hilton.com/en/hotels/lontsqq-the-trafalgar-st-james-london/",
52 "phone": "+44 20 7870 2900",
53 "emails": [
54 "reservations@thetrafalgar.com"
55 ],
56 "address": "2 Spring Gardens, London, SW1A 2TS",
57 "city": "London",
58 "countryCode": "GB"
59 },
60 {
61 "title": "Hilton",
62 "categoryName": "Hotel",
63 "website": "https://www.hilton.com/en/hotels/nyctshh-hilton-times-square/",
64 "phone": "+1 212-913-9488",
65 "emails": [
66 "NYCTS_HOTEL @hilton.com"
67 ],
68 "address": "234 West 42nd Street, New York, 10036",
69 "city": "New York",
70 "countryCode": "US"
71 },
72 {
73 "title": "Pod 39",
74 "categoryName": "Hotel",
75 "website": "https://www.thepodhotel.com/pod-39/",
76 "phone": "+1-844-763-7666;+1-212-865-5700",
77 "emails": [
78 "info@podhotel39.com"
79 ],
80 "address": "145 East 39th Street, New York, 10016",
81 "city": "New York",
82 "countryCode": "US"
83 },
84 {
85 "title": "Somerset Hotel",
86 "categoryName": "Hotel",
87 "website": "https://somersethotellondon.com",
88 "phone": "+44 20 7723 0741",
89 "emails": [
90 "reservations@somersethotel.net"
91 ],
92 "address": "6 Dorset Square, London, NW1 6QA",
93 "city": "London",
94 "countryCode": "GB"
95 },
96 {
97 "title": "Mandarin Oriental",
98 "categoryName": "Hotel",
99 "website": "https://www.mandarinoriental.com/en/new-york/manhattan",
100 "phone": "+1-212-805-8800",
101 "emails": [
102 "MONYC-RESERVATIONS@MOHG.COM"
103 ],
104 "address": "80 Columbus Circle, New York, 10023",
105 "city": "New York",
106 "countryCode": "US"
107 }
108 ],
109 "defaultCountry": "GB"
110};
111
112
113const run = await client.actor("chris_elder/dataset-dedupe-enrich").call(input);
114
115
116console.log('Results from dataset');
117console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
118const { items } = await client.dataset(run.defaultDatasetId).listItems();
119items.forEach((item) => {
120 console.dir(item);
121});
122
123