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": "los angeles",
14 "dropoff": "san francisco",
15 "datefrom": "250901",
16 "timefrom": "10:00",
17 "dateto": "250902",
18 "timeto": "10:30",
19 "age": "30",
20 "seating": "5",
21 "transmission": "any"
22 },
23 {
24 "origin": "paris",
25 "dropoff": "",
26 "datefrom": "250801",
27 "timefrom": "14:00",
28 "dateto": "250815",
29 "timeto": "10:30",
30 "age": "19",
31 "seating": "any",
32 "transmission": "manual"
33 }
34 ],
35 "blocklist": [
36 "Rentingcarz"
37 ],
38 "proxy": {
39 "useApifyProxy": true,
40 "apifyProxyGroups": [
41 "BUYPROXIES94952"
42 ]
43 }
44};
45
46
47const run = await client.actor("canadesk/car-hire-rental-bulk").call(input);
48
49
50console.log('Results from dataset');
51console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
52const { items } = await client.dataset(run.defaultDatasetId).listItems();
53items.forEach((item) => {
54 console.dir(item);
55});
56
57