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": "cykel",
13 "category": "",
14 "subCategory": "",
15 "productCategory": "",
16 "sortBy": "RELEVANCE",
17 "location": "",
18 "subLocation": "",
19 "condition": "",
20 "tradeType": "",
21 "dealerSegment": "",
22 "shippingType": "",
23 "boundingBox": "",
24 "publishedToday": false,
25 "brandQuery": "",
26 "itemIds": [],
27 "shopSlug": "",
28 "vehicleType": "car",
29 "carVariant": "",
30 "fuelType": "",
31 "transmissionType": "",
32 "bodyType": "",
33 "wheelDrive": "",
34 "carDealerSegment": "",
35 "registrationClass": "",
36 "exteriorColour": "",
37 "carEquipment": "",
38 "warrantyInsurance": "",
39 "carCondition": "",
40 "wheelSets": "",
41 "maxItems": 50
42};
43
44
45const run = await client.actor("crawlerbros/dba-dk-scraper").call(input);
46
47
48console.log('Results from dataset');
49console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
50const { items } = await client.dataset(run.defaultDatasetId).listItems();
51items.forEach((item) => {
52 console.dir(item);
53});
54
55