1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "travellers": [
12 {
13 "ref": "t1",
14 "trips": [
15 {
16 "country": "FR",
17 "from": "2026-03-01",
18 "to": "2026-03-30"
19 },
20 {
21 "country": "GB",
22 "from": "2026-04-10",
23 "to": "2026-04-20"
24 },
25 {
26 "country": "ES",
27 "from": "2026-06-01",
28 "to": "2026-07-10"
29 },
30 {
31 "country": "IT",
32 "from": "2026-09-20",
33 "to": "2026-10-05"
34 }
35 ]
36 }
37 ],
38 "rules": [
39 "schengen-90-180"
40 ],
41 "plan": {
42 "entry": "2026-11-01",
43 "days": 30,
44 "country": "FR"
45 }
46};
47
48
49const run = await client.actor("fetchgrove/stay-limit-calculator").call(input);
50
51
52console.log('Results from dataset');
53console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
54const { items } = await client.dataset(run.defaultDatasetId).listItems();
55items.forEach((item) => {
56 console.dir(item);
57});
58
59