# BOE Subastas Scraper: Spain Property Auctions (`kareninatech/boe-subastas-scraper`) Actor

Scrape Spain's official BOE Subastas portal (subastas.boe.es) without a browser. Search by province or town. Extract auctions with tasación, discount vs appraisal, deposit %, days until close, risk flags, cadastral links, expanded lots, an AUCTION_REPORT, and monitor mode.

- **URL**: https://apify.com/kareninatech/boe-subastas-scraper.md
- **Developed by:** [Karen Gisela Gallegos Aguilar](https://apify.com/kareninatech) (community)
- **Categories:** Real estate, Lead generation, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## BOE Subastas Scraper: Spain official property auctions

Use this BOE Subastas API alternative to scrape official Spanish property auctions (subastas judiciales e inmobiliarias) from subastas.boe.es.

**Fast and cheap: no browser.** This Actor reads BOE pages directly over HTTP and runs on only 512 MB of memory, so a run of 40 auctions takes about 20 seconds and platform costs stay very low. Browser-based scrapers use several GB of memory and are slower.

Scrape [Spain's official public auction portal](https://subastas.boe.es) (Portal de Subastas of the Boletín Oficial del Estado). Type a province such as Madrid, or a town name, and get structured auction data with investor analytics that other BOE scrapers do not bundle together: **discount versus appraisal**, **deposit as a percentage**, **days until close** with an **ending-soon flag**, **risk flags** (cargas, occupied, rented, habitual dwelling), **cadastral links**, **every lot expanded**, an **AUCTION_REPORT** by province and asset type, and **monitor mode** for new, changed and removed auctions.

Works with property (inmuebles), vehicles and other movable assets. Judicial, notarial, AEAT and other tax-office auctions are all covered. No login is used — only public pages.

### What you get

Each dataset row is one auction (or one lot, if you turn on `one_row_per_lot`) and includes:

- Identifiers and links: auction id, expediente, BOE announcement, edict and other public documents
- Dates: start, scheduled close, hours/days until close, `ending_soon` (default window: 48 hours)
- Money: claimed amount, valor de subasta, tasación, minimum bid, bid increment, deposit, **deposit %**, **discount vs tasación**, and the usual 50% / 70% judicial references
- Bids: whether there is a bid, whether bids are secret, and the amount when BOE publishes it (often after the auction closes)
- Asset details: type and subtype, address, postal code, municipality, province, cadastral reference **and a Catastro link**, IDUFIR, surface in m² when the description states it, and €/m²
- Vehicles: plate, make, model, VIN, registry reference, deposit location
- Lots: `lot_count`, award mode, and a `lots` array with the same financials and risk flags per lot
- Authority (juzgado or tax office): name, address, phone and published email
- Risk flags: `cargas`, `occupied`, `rented`, `habitual_dwelling`
- Monitor fields when monitor mode is on

A JSON **AUCTION_REPORT** is saved in the default key-value store with counts, median values and discounts by province and asset type.

### How to use it

The default input (open property auctions in Madrid, 40 results) is enough for a first run.

1. Choose a **province** (Madrid, Barcelona, Valencia...) and optionally a **municipality**.
2. Choose the **asset type** (property, vehicles, other movable assets) and **status** (open, upcoming, concluded...).
3. Optionally set a min/max auction value or an end-date range.
4. Run. Or paste a search URL / an auction id from subastas.boe.es.

#### Example: open housing auctions in Madrid that close soon

```json
{
    "province": "Madrid",
    "asset_type": "inmuebles",
    "property_subtype": "vivienda",
    "status": "abierta",
    "max_items": 100,
    "ending_soon_hours": 48
}
```

#### Example: vehicles anywhere in Spain

```json
{
    "province": "Spain",
    "asset_type": "vehiculos",
    "status": "abierta",
    "max_items": 50
}
```

#### Example: monitor a search every day

```json
{
    "province": "Madrid",
    "asset_type": "inmuebles",
    "status": "abierta",
    "monitor_mode": true,
    "monitor_key": "madrid-open-property",
    "emit_removed": true,
    "max_items": 500
}
```

The first monitor run emits every auction as `new`. Later runs only emit auctions that are new, whose status, close date, bid or auction value changed, or (if `emit_removed` is on and the search finished completely) that disappeared.

### Input

| Field | What it does |
|---|---|
| `province`, `municipality`, `location` | Simple place filters. `location` can be "Madrid" or "Madrid, Alcalá de Henares". Type `Spain` or `all` for the whole country. |
| `asset_type` | `inmuebles`, `vehiculos`, `muebles` or `all`. |
| `property_subtype` | Optional, for example `vivienda` or `turismos`. |
| `status` | `abierta` (celebrándose), `proxima`, `concluida`, `finalizada`, `suspendida`, `cancelada`, or `all`. |
| `auction_type` | `judicial`, `notarial`, `aeat`, `other_tax`, `administrative`, `social_security`, or `all`. |
| `min_value` / `max_value` | Filter by valor de subasta, in euros. |
| `end_date_from` / `end_date_to` | Close-date range (`YYYY-MM-DD`). Concluded searches default to the last 30 days. |
| `search_url`, `start_urls`, `auction_ids` | Paste BOE URLs or official auction ids. URLs override the form filters. |
| `max_items` | Row cap (default 40). |
| `include_lots` | Fetch every lot (default on). |
| `one_row_per_lot` | Emit one dataset row per lot (default off). |
| `ending_soon_hours` | Window for the ending-soon flag (default 48). |
| `monitor_mode`, `monitor_key`, `emit_removed` | Incremental new / changed / removed detection. |
| `proxyConfiguration` | Optional. Not needed in normal use. |

### Speed and cost

No browser is used. The Actor reads public HTML over plain HTTP on 512 MB of memory. A default run (40 Madrid auctions) finishes in about 20 seconds. You pay per result, plus a tiny fee per run start.

### Limitations

- Only **public** pages are read. Complementary documents and some live bid *amounts* need a BOE login; those are not fetched. The Actor still records whether a bid exists, whether bids are secret, and the amount when BOE publishes it (common on concluded auctions).
- **Cadastral data** is the reference printed on the auction, plus an official Catastro link. The Actor does not call the Catastro API, so year built, official surface and GPS are not added.
- **Surface and €/m²** are filled only when the description (or address) states an area, including Spanish wording such as "ochenta y dos metros cuadrados" or "trece áreas, ochenta centiáreas".
- A tasación of **0,00 €** is stored as 0; discount versus appraisal is left empty in that case, because there is no real appraisal to compare.
- Upcoming AEAT auctions sometimes have no start or close date yet.
- A search that is too broad (for example every concluded auction in Spain with no date) is rejected by BOE. The Actor then retries once per province, and concluded searches without dates are limited to the last 30 days.
- `robots.txt` on subastas.boe.es disallows crawlers, but the BOE reuse licence (Ley 37/2007 and the Agencia's 27 June 2024 resolution) allows commercial reuse of these public documents. The Actor is polite (a few requests at a time) and only reads public HTML.
- This is not legal advice and not a substitute for reading the edict, the certificate of charges, and the official auction conditions.

### Input and output details

**Output Example:**

```json
{
  "auction_id": "SUB-JA-2026-000000",
  "status": "Celebrándose",
  "province": "Madrid",
  "municipality": "Madrid",
  "asset_subtype": "Vivienda",
  "valor_subasta": 180000,
  "tasacion": 200000,
  "discount_vs_tasacion_pct": 10,
  "end_date": "2026-11-11T18:00:00+01:00",
  "ending_soon": true,
  "risk_flags": [
    "cargas"
  ],
  "url": "https://subastas.boe.es/detalleSubasta.php?idSub=SUB-JA-2026-000000",
  "scraped_at": "2026-11-10T08:00:00.000Z"
}
```

### Input reference

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `province` | string | No | `Madrid` | A Spanish province as you would type it: Madrid, Barcelona, Valencia, Málaga, Sevilla, A Coruña... Type Spain or all for the whole country. |
| `municipality` | string | No | — | A town or city name, for example Alcalá de Henares or Torrevieja. Combined with the province when both are set. |
| `location` | string | No | — | Type a province, a town, or 'Madrid, Alcalá de Henares'. When you fill this, it is used together with (or instead of) the fields above. |
| `locations` | array | No | — | Extra places to search in the same run. max_items is shared between all searches. |
| `asset_type` | string | No | `inmuebles` | What to search for, for example housing, vehicles or other assets. |
| `property_subtype` | string | No | — | Narrower type when you selected property or vehicles. Leave empty for every subtype. |
| `status` | string | No | `abierta` | Auction status. 'Open' is Celebrándose. Concluded and finalised searches default to the last 30 days so BOE does not reject the query as too broad. |
| `auction_type` | string | No | `all` | Who is running the auction. Other tax offices are regional haciendas (Recaudación Tributaria). There may be no open Social Security auctions on a given day. |
| `min_value` | integer | No | — | Keep only auctions whose valor de subasta is at least this amount. Applied after the detail pages are read. |
| `max_value` | integer | No | — | Keep only auctions whose valor de subasta is at most this amount. |
| `end_date_from` | string | No | — | Only auctions scheduled to close on or after this date. |
| `end_date_to` | string | No | — | Only auctions scheduled to close on or before this date. |
| `search_url` | string | No | — | Paste a search page from subastas.boe.es with your filters already set. When you use URLs, the filters above are ignored. |
| `start_urls` | array | No | — | Extra subastas.boe.es search pages or detalleSubasta.php links. |
| `auction_ids` | array | No | — | Official identifiers such as SUB-JA-2026-260951. The Actor opens those auctions directly. |
| `max_items` | integer | No | `40` | Maximum number of dataset rows to return. With one_row_per_lot this is a row limit, not an auction limit. |
| `max_pages` | integer | No | — | Safety cap on BOE result pages (each page has up to 200 auctions). Default 50. |
| `include_lots` | boolean | No | `True` | When an auction has several lots, open each lot and include its value, deposit, cadastral reference and risk flags. Turn off to only read lot 1 (faster). |
| `one_row_per_lot` | boolean | No | `False` | By default there is one row per auction and the lots array is filled in. Turn this on to emit a separate row for every lot. |
| `ending_soon_hours` | integer | No | `48` | Auctions that close within this many hours are flagged ending_soon. Default 48. |
| `monitor_mode` | boolean | No | `False` | Remember auctions between runs and only emit new or changed ones (status, close date, bid or auction value). Unchanged auctions are skipped. |
| `monitor_key` | string | No | — | Optional name for the memory store (default: 'default'). Use a different key for each saved search so they do not overwrite each other. |
| `emit_removed` | boolean | No | `False` | In monitor mode, also emit a row for auctions that were in the last run but are no longer in a complete search. Only happens when every result page was reached. |
| `proxyConfiguration` | object | No | — | Optional. The official site usually works from a datacenter IP without a proxy. |

### Output fields

| Field | Description |
|-------|-------------|
| `auction_id` | Official BOE auction identifier. |
| `status` | Auction status, for example Celebrándose or Próxima apertura. |
| `province` | Province of the main asset. |
| `municipality` | Town or city of the main asset. |
| `asset_subtype` | Finer type of the main asset, for example Vivienda or Turismo. |
| `valor_subasta` | Auction value (valor de subasta), in euros. For multi-lot auctions this is the sum of the lots when the page has no single figure. |
| `tasacion` | Appraisal (tasación), in euros. 0 means the page published zero, not a missing field. |
| `discount_vs_tasacion_pct` | How much cheaper the auction value is than the appraisal. Null when tasación is missing or 0. Negative when the auction value is above the appraisal. |
| `end_date` | Scheduled close, as an ISO-8601 timestamp when published. Can move if the auction is extended. |
| `ending_soon` | True when the auction closes within the ending_soon_hours window. |
| `risk_flags` | Risk labels for the main asset: cargas, occupied, rented, habitual_dwelling. |
| `url` | Public auction page on subastas.boe.es. |
| `monitor_status` | In monitor mode: new, changed or removed. Unchanged auctions are skipped. |
| `scraped_at` | When this row was scraped, as an ISO-8601 timestamp. |

The dataset also includes 64 further fields. Open the Output tab in the Actor for the full list.

### Legal

Data comes from the official Portal de Subastas (Agencia Estatal Boletín Oficial del Estado). Reuse is allowed under the BOE terms at <https://www.boe.es/informacion/aviso_legal/index.php>. Do not present the portal design, logos or trademarks as your own.

### FAQ

**What does this Actor scrape?** Public auctions from Spain's official BOE Subastas portal (subastas.boe.es): housing, plots, vehicles and other assets, plus appraisal (tasación), discount vs appraisal, deposit, dates, risk flags and cadastral links.

**Do I need to code?** No. Type a province or town (for example Madrid), set a few filters, and run. You can also paste a search URL. Export results as JSON, CSV or Excel, or call the Actor via the Apify API.

**Is this an official BOE tool?** No. It is an unofficial data extractor. Auction data comes from the official public portal. Follow the BOE legal notice and do not reuse BOE logos or design as your own.

**What is monitor mode?** Turn it on and schedule the Actor (for example daily). Later runs can highlight new auctions and ones that are ending soon, so you do not re-read the full list by hand.

### Related Actors

More data extractors by [kareninatech](https://apify.com/kareninatech):

- [Fotocasa Scraper — Spain property listings](https://apify.com/kareninatech/fotocasa-scraper)
- [Habitaclia Scraper — Spain property listings](https://apify.com/kareninatech/habitaclia-scraper)
- [Argenprop Scraper — Argentina and Uruguay listings](https://apify.com/kareninatech/argenprop-scraper)
- [Fincaraiz Scraper — Colombia property listings](https://apify.com/kareninatech/fincaraiz-scraper)

### Changelog

- **0.1** — First release: simple province / town / type / status input, full public detail tabs, lots expanded, analytics, AUCTION_REPORT and monitor mode.

# Actor input Schema

## `province` (type: `string`):

A Spanish province as you would type it: Madrid, Barcelona, Valencia, Málaga, Sevilla, A Coruña... Type Spain or all for the whole country.

## `municipality` (type: `string`):

A town or city name, for example Alcalá de Henares or Torrevieja. Combined with the province when both are set.

## `location` (type: `string`):

Type a province, a town, or 'Madrid, Alcalá de Henares'. When you fill this, it is used together with (or instead of) the fields above.

## `locations` (type: `array`):

Extra places to search in the same run. max_items is shared between all searches.

## `asset_type` (type: `string`):

What to search for, for example housing, vehicles or other assets.

## `property_subtype` (type: `string`):

Narrower type when you selected property or vehicles. Leave empty for every subtype.

## `status` (type: `string`):

Auction status. 'Open' is Celebrándose. Concluded and finalised searches default to the last 30 days so BOE does not reject the query as too broad.

## `auction_type` (type: `string`):

Who is running the auction. Other tax offices are regional haciendas (Recaudación Tributaria). There may be no open Social Security auctions on a given day.

## `min_value` (type: `integer`):

Keep only auctions whose valor de subasta is at least this amount. Applied after the detail pages are read.

## `max_value` (type: `integer`):

Keep only auctions whose valor de subasta is at most this amount.

## `end_date_from` (type: `string`):

Only auctions scheduled to close on or after this date.

## `end_date_to` (type: `string`):

Only auctions scheduled to close on or before this date.

## `search_url` (type: `string`):

Paste a search page from subastas.boe.es with your filters already set. When you use URLs, the filters above are ignored.

## `start_urls` (type: `array`):

Extra subastas.boe.es search pages or detalleSubasta.php links.

## `auction_ids` (type: `array`):

Official identifiers such as SUB-JA-2026-260951. The Actor opens those auctions directly.

## `max_items` (type: `integer`):

Maximum number of dataset rows to return. With one_row_per_lot this is a row limit, not an auction limit.

## `max_pages` (type: `integer`):

Safety cap on BOE result pages (each page has up to 200 auctions). Default 50.

## `include_lots` (type: `boolean`):

When an auction has several lots, open each lot and include its value, deposit, cadastral reference and risk flags. Turn off to only read lot 1 (faster).

## `one_row_per_lot` (type: `boolean`):

By default there is one row per auction and the lots array is filled in. Turn this on to emit a separate row for every lot.

## `ending_soon_hours` (type: `integer`):

Auctions that close within this many hours are flagged ending_soon. Default 48.

## `monitor_mode` (type: `boolean`):

Remember auctions between runs and only emit new or changed ones (status, close date, bid or auction value). Unchanged auctions are skipped.

## `monitor_key` (type: `string`):

Optional name for the memory store (default: 'default'). Use a different key for each saved search so they do not overwrite each other.

## `emit_removed` (type: `boolean`):

In monitor mode, also emit a row for auctions that were in the last run but are no longer in a complete search. Only happens when every result page was reached.

## `proxyConfiguration` (type: `object`):

Optional. The official site usually works from a datacenter IP without a proxy.

## Actor input object example

```json
{
  "province": "Madrid",
  "asset_type": "inmuebles",
  "status": "abierta",
  "auction_type": "all",
  "max_items": 40,
  "include_lots": true,
  "one_row_per_lot": false,
  "ending_soon_hours": 48,
  "monitor_mode": false,
  "emit_removed": false
}
```

# Actor output Schema

## `overview` (type: `string`):

Table view of scraped results using the dataset 'overview' view.

## `investor` (type: `string`):

Discount, deposit, bids and cadastral link.

## `monitor` (type: `string`):

New, changed and removed auctions.

## `results` (type: `string`):

All scraped results from the default dataset without view transformation.

## `auctionReport` (type: `string`):

Summary by province and asset type in the key-value store.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "province": "Madrid",
    "asset_type": "inmuebles",
    "status": "abierta",
    "auction_type": "all",
    "max_items": 40
};

// Run the Actor and wait for it to finish
const run = await client.actor("kareninatech/boe-subastas-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "province": "Madrid",
    "asset_type": "inmuebles",
    "status": "abierta",
    "auction_type": "all",
    "max_items": 40,
}

# Run the Actor and wait for it to finish
run = client.actor("kareninatech/boe-subastas-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "province": "Madrid",
  "asset_type": "inmuebles",
  "status": "abierta",
  "auction_type": "all",
  "max_items": 40
}' |
apify call kareninatech/boe-subastas-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kareninatech/boe-subastas-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ve5fznbP2XZrH8ngy/builds/MmIgLZIC1jwub6b3B/openapi.json
