1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "searchUrls": [
12 "https://www.autoscout24.com/lst/ford?atype=C&cy=D%2CA%2CB%2CE%2CF%2CI%2CL%2CNL&damaged_listing=exclude&desc=0&fregfrom=2019&ocs_listing=include&powertype=kw&search_id=1kpg4o4vq63&sort=standard&source=detailsearch&ustate=N%2CU"
13 ],
14 "proxy": {
15 "useApifyProxy": true,
16 "apifyProxyGroups": [
17 "RESIDENTIAL"
18 ],
19 "apifyProxyCountry": "US"
20 },
21 "maxPage": 1,
22 "maxConcurrency": 5,
23 "maxRequestsPerMinute": 20
24};
25
26
27const run = await client.actor("inquisitive_sarangi/autoscout24-com-scraper").call(input);
28
29
30console.log('Results from dataset');
31console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
32const { items } = await client.dataset(run.defaultDatasetId).listItems();
33items.forEach((item) => {
34 console.dir(item);
35});
36
37