1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "search",
12 "searchQuery": "",
13 "make": "",
14 "city": "",
15 "registeredIn": "",
16 "province": "",
17 "bodyType": "",
18 "fuelType": "",
19 "transmission": "",
20 "color": "",
21 "assembly": "",
22 "origin": "",
23 "category": "",
24 "doors": "",
25 "seats": "",
26 "sellerType": "",
27 "sunroof": false,
28 "inspectedOnly": false,
29 "auctionSheetVerified": false,
30 "managedByPakwheels": false,
31 "carMelaRegistered": false,
32 "featuredOnly": false,
33 "auctionedOnly": false,
34 "withPhotoOnly": false,
35 "withVideoOnly": false,
36 "fourWheelDriveOnly": false,
37 "sortOrder": "",
38 "maxItems": 3,
39 "includeDetails": false,
40 "listingUrls": [],
41 "searchUrls": [],
42 "proxyConfiguration": {
43 "useApifyProxy": false
44 }
45};
46
47
48const run = await client.actor("dataspryva/pakwheels-used-car-search-by-make-city-and-price").call(input);
49
50
51console.log('Results from dataset');
52console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
53const { items } = await client.dataset(run.defaultDatasetId).listItems();
54items.forEach((item) => {
55 console.dir(item);
56});
57
58