1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "urls": [
12 "https://www.autoscout24.com/offers/mercedes-benz-e-300-e300de-avantg-standhz-leder-ahk-navi-kam-led-18-diesel-grey-349fdb22-d083-4821-afcf-205c9cca2cb1?ipc=recommendation&ipl=homepage-engine-itemBased&source_otp=t50&ap_tier=t50&boosting_product=mia&relevance_adjustment=boost&applied_boost_level=t50&boost_level=t50&source=homepage_most-searched&position=2"
13 ],
14 "max_retries_per_url": 2,
15 "proxy": {
16 "useApifyProxy": false
17 }
18};
19
20
21const run = await client.actor("ecomscrape/autoscout24-automotive-details-scraper").call(input);
22
23
24console.log('Results from dataset');
25console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
26const { items } = await client.dataset(run.defaultDatasetId).listItems();
27items.forEach((item) => {
28 console.dir(item);
29});
30
31