1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "productUrls": [
12 "https://www.autoscout24.com/offers/bmw-316-316d-touring-aut-diesel-white-cat_ma13mo1639-08391ca9-d1c4-42b7-ac00-27ba63d2fc78",
13 "https://www.autoscout24.com/offers/bmw-320-320i-high-executive-hud-sport-stoelen-leer-nette-a-gasoline-brown-cat_ma13mo1641-8d8d44f1-2556-43de-978b-be5c2eedf1b7",
14 "https://www.autoscout24.com/offers/bmw-318-3-serie-touring-318i-m-performance-eye-catcher-gasoline-blue-cat_ma13mo1640-0bb85b14-ee5e-4c25-8528-651c47b0bba3"
15 ],
16 "categoryUrls": [
17 "https://www.autoscout24.com/lst/bmw/3-series"
18 ]
19};
20
21
22const run = await client.actor("123webdata/autoscout24-com-scraper").call(input);
23
24
25console.log('Results from dataset');
26console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
27const { items } = await client.dataset(run.defaultDatasetId).listItems();
28items.forEach((item) => {
29 console.dir(item);
30});
31
32