1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "maxItems": 10,
12 "mode": "search",
13 "category": "carros",
14 "makes": [
15 "BMW"
16 ],
17 "condition": "any",
18 "priceEvaluation": "any",
19 "priceDropsOnly": false,
20 "sellerType": "any",
21 "brandProgram": "any",
22 "origin": "any",
23 "maxOwners": "any",
24 "includeDetails": true,
25 "onlyNewListings": false,
26 "sort": "relevance_web"
27};
28
29
30const run = await client.actor("normdata/standvirtual-scraper").call(input);
31
32
33console.log('Results from dataset');
34console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
35const { items } = await client.dataset(run.defaultDatasetId).listItems();
36items.forEach((item) => {
37 console.dir(item);
38});
39
40