1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "keyword": [
12 "https://www.tripadvisor.com/Airline_Review-d8729069-Reviews-Emirates",
13 "https://www.tripadvisor.com/Hotel_Review-g186338-d193104-Reviews-The_Clermont_London_Charing_Cross-London_England.html"
14 ],
15 "text": "",
16 "lang": [
17 "en"
18 ],
19 "rating": [
20 "1",
21 "2",
22 "3",
23 "4",
24 "5"
25 ],
26 "cabin": [
27 "BUSINESS",
28 "ECONOMY",
29 "FIRST",
30 "PREMIUM_ECONOMY"
31 ],
32 "segment": [
33 "Business",
34 "Couples",
35 "Family",
36 "Friends",
37 "Solo"
38 ],
39 "bestmonths": [
40 "1",
41 "10",
42 "11",
43 "12",
44 "2",
45 "3",
46 "4",
47 "5",
48 "6",
49 "7",
50 "8",
51 "9"
52 ],
53 "fromdate": "",
54 "proxy": {
55 "useApifyProxy": true,
56 "apifyProxyGroups": [
57 "RESIDENTIAL"
58 ]
59 }
60};
61
62
63const run = await client.actor("canadesk/tripadvisor-reviews-bulk").call(input);
64
65
66console.log('Results from dataset');
67console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
68const { items } = await client.dataset(run.defaultDatasetId).listItems();
69items.forEach((item) => {
70 console.dir(item);
71});
72
73