1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "query": [
12 {
13 "origin": "cdg",
14 "destination": "lyon",
15 "datefrom": "251004",
16 "dateto": "251007",
17 "adults": 2,
18 "children": [],
19 "classtype": "economy",
20 "direct": false
21 },
22 {
23 "origin": "las",
24 "destination": "everywhere",
25 "datefrom": "250618",
26 "dateto": "250620",
27 "adults": 1,
28 "children": [],
29 "classtype": "economy",
30 "direct": true
31 }
32 ],
33 "proxy": {
34 "useApifyProxy": true,
35 "apifyProxyGroups": [
36 "RESIDENTIAL"
37 ]
38 }
39};
40
41
42const run = await client.actor("canadesk/skyscanner-flights-api-bulk").call(input);
43
44
45console.log('Results from dataset');
46console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
47const { items } = await client.dataset(run.defaultDatasetId).listItems();
48items.forEach((item) => {
49 console.dir(item);
50});
51
52