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 "estados": [
13 "EJ"
14 ],
15 "tipoBien": "I",
16 "sortField": "SUBASTA.FECHA_FIN",
17 "sortOrder": "asc",
18 "startUrls": [
19 "https://subastas.boe.es/detalleSubasta.php?idSub=SUB-JA-2025-251191",
20 "https://subastas.boe.es/detalleSubasta.php?idSub=SUB-AT-2026-26R4686001266"
21 ],
22 "fetchDetails": true,
23 "maxItems": 20,
24 "maxPages": 0,
25 "proxyConfiguration": {
26 "useApifyProxy": true,
27 "apifyProxyGroups": [
28 "RESIDENTIAL"
29 ]
30 },
31 "incrementalMode": false,
32 "emitUnchanged": false,
33 "emitExpired": false,
34 "maxNotifyListings": 50
35};
36
37
38const run = await client.actor("abotapi/boe-es-auction-scraper").call(input);
39
40
41console.log('Results from dataset');
42console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
43const { items } = await client.dataset(run.defaultDatasetId).listItems();
44items.forEach((item) => {
45 console.dir(item);
46});
47
48