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