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    "cookie": "",
55    "proxy": {
56        "useApifyProxy": true,
57        "apifyProxyGroups": [
58            "RESIDENTIAL"
59        ]
60    }
61};
62
63
64const run = await client.actor("canadesk/tripadvisor-reviews-bulk").call(input);
65
66
67console.log('Results from dataset');
68console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
69const { items } = await client.dataset(run.defaultDatasetId).listItems();
70items.forEach((item) => {
71    console.dir(item);
72});
73
74