# Subastas España — inmuebles, vehículos y muebles (BOE) (`daniizarsan/subastas-espana`) Actor

Feed oficial del Portal de Subastas del BOE: subastas judiciales y de la administración en publicación, con valor de subasta, tasación, depósito, lotes, dirección del inmueble, matrícula/marca/bastidor del vehículo y cruce opcional con el Catastro.

- **URL**: https://apify.com/daniizarsan/subastas-espana.md
- **Developed by:** [Daniel de la Zarza Sánchez](https://apify.com/daniizarsan) (community)
- **Categories:** Real estate
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## 🏛️ Subastas España — inmuebles, vehículos y muebles del BOE

Feed oficial del **Portal de Subastas Electrónicas del BOE**: subastas judiciales y de la administración en toda España, con **valores de subasta, tasación, depósito, lotes, dirección del inmueble, matrícula/marca/bastidor del vehículo** y **cruce opcional con el Catastro**.

Datasets hermanos: [`catastro-espana`](https://apify.com/daniizarsan/catastro-espana) (ficha catastral del inmueble) · [`borme-espana`](https://apify.com/daniizarsan/borme-espana) (vida mercantil de empresas) · [`bdns-subsidios`](https://apify.com/daniizarsan/bdns-subsidios) (subvenciones).

### ⚡ Qué obtienes

- **Una subasta = una fila** (lotes anidados) o **una fila por lote** (`salida: "lotes"`), lo que prefieras.
- Campos base: `id` (SUB-XX-AAAA-N…), `url`, `tipoSubasta`, `autoridad`, `expediente`, `estado`, `cantidadReclamada`, `numLotes`, `formaAdjudicacion`, `anuncioBoe` (+ enlace), `documentos` (edicto, certificación de dominio y cargas…).
- Por lote: `valorSubasta`, `valorTasacion`, `importeDeposito`, `pujaMinima`, `tramosEntrePujas` y el **bien**: descripción, dirección, CP, localidad, provincia, vivienda habitual, situación posesoria, cargas, inscripción registral…
- **Vehículos**: `matricula` (normalizada, p. ej. `4254GHY`), `marca`, `modelo`, `numeroBastidor` (VIN), `fechaMatriculacion` (ISO).
- **Cruce Catastro** (`enriquecerCatastro: true`): para cada lote inmueble con dirección utilizable añade `catastro: {referenciaCatastral, tipoBien, uso, superficie, antiguedad, codigoPostal}`. Nunca mete campos de error: si falla, el lote sale en base.

### 🎯 Para quién es

| Perfil | Uso típico |
|---|---|
| Inversores / investors en subastas | Vigilancia diaria de inmuebles nuevos por provincia con valor de subasta y tasación |
| Proptech / subastas de banca | Enriquecimiento con Catastro (superficie, antigüedad) para scoring |
| Concesionarios / trade-in | Subastas de vehículos con matrícula, marca, modelo y bastidor |
| Abogados / gestores | Monitorización de expedientes y edictos con enlace al documento |

### 🚀 Uso rápido

```json
{
  "tipoBien": "inmuebles",
  "estado": "PU",
  "provincia": "A Coruña",
  "salida": "lotes",
  "enriquecerCatastro": true,
  "maxItems": 100
}
```

- `tipoBien` — `todos` / `inmuebles` / `vehiculos` / `muebles`.
- `estado` — `PU` (en publicación), `EJ` (celebrándose), `SU`, `CA`, `PC`, `FS` o `todos`.
- `provincia`/`localidad`/`codigoPostal` — filtros geográficos con nombre humano («Coruna» vale).
- `idSubastas` — modo directo: pásale identificadores `SUB-…` y devuelve solo esos detalles.
- `salida` — `subastas` (1 fila por subasta, lotes anidados) o `lotes` (1 fila por lote).
- `maxItems` — techo de filas. El portal no publica fecha de la subasta en su buscador: el escaneo recorre el resultado completo ordenado y **solo emite las subastas nuevas** respecto a ejecuciones anteriores (checkpoint), así que ejecuciones diarias traen solo lo recién publicado.

### 💶 Precio

Pay-per-event: **$0,0001** por arranque + **$0,003 por fila guardada** (1 fila = 1 subasta o 1 lote según modo). El cómputo del actor lo paga quien lo ejecuta. El cruce con Catastro encarece tiempo, no eventos.

### ✅ Calidad

- Fuente oficial gratuita, HTML verificado el 2026-11-04 (fixtures de test incluidos).
- Validación dura del esquema: si un item sale mal formado, el run aborta sin guardar basura.
- Cruces tolerantes: cualquier fallo de Catastro cuenta y continúa; la fila sale solo en base.
- Checkpoint por subasta: si se cae, la siguiente ejecución reanuda sin duplicar.
- Tests: `python -m pytest tests/test_subastas.py`.

# Actor input Schema

## `idSubastas` (type: `string`):

Separados por comas, p. ej. "SUB-JA-2024-239314, SUB-RC-2026-2873000126006". Si se rellena, se ignora la busqueda y se devuelve solo el detalle de esas subastas.

## `tipoBien` (type: `string`):

"inmuebles" (viviendas, garajes, terrenos...), "vehiculos" (turismos, furgonetas... con matricula, marca y bastador) o "muebles".

## `estado` (type: `string`):

PU = en publicacion, EJ = celebrandose/en ejecucion, SU = suspendida, CA = cancelada, PC = pendiente de convocatoria, FS = finalizada sin postor.

## `provincia` (type: `string`):

Nombre humano: "A Coruña", "Coruna", "Valencia"... Sin acentos da igual.

## `localidad` (type: `string`):

p. ej. "Madrid" o "Oviedo". Sin acentos da igual.

## `codigoPostal` (type: `string`):

5 digitos, p. ej. "33012".

## `salida` (type: `string`):

"subastas": una fila por subasta con sus lotes anidados. "lotes": una fila por lote (mas comodo para hojas de calculo).

## `enriquecerCatastro` (type: `boolean`):

Para cada lote inmueble con direccion utilizable, consulta los servicios oficiales del Catastro y anhade referenciaCatastral, uso, superficie y antiguedad. Anhade peticiones extra (lento).

## `maxEnriquecimientos` (type: `integer`):

Techo de consultas al Catastro por ejecucion (solo si enriquecerCatastro).

## `maxItems` (type: `integer`):

En modo 'subastas' una fila = una subasta; en 'lotes' una fila = un lote. El escaneo recorre el buscador completo del portal y solo emite las subastas nuevas (checkpoint antiduplicados).

## Actor input object example

```json
{
  "tipoBien": "todos",
  "estado": "PU",
  "salida": "subastas",
  "enriquecerCatastro": false,
  "maxEnriquecimientos": 20,
  "maxItems": 100
}
```

# Actor output Schema

## `subastas` (type: `string`):

Dataset de subastas: idSubastas, titulo, tipoBien, provincia, localidad, codigoPostal, estadoSubasta, fechaFinCarga, valorSubasta, valorTasacion, importeDeposito, pujaMinima, lotes (con subastas/bienes), direccion, cargas, inscripcionRegistral, idAnuncioBOE, urlAnuncioBOE y, con cruce, catastro (referencia, uso, superficie).

## `resumen` (type: `string`):

Contadores: subastas nuevas emitidas, escaneadas, duplicadas omitidas, fallos de cruce y checkpoint.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("daniizarsan/subastas-espana").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("daniizarsan/subastas-espana").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 '{}' |
apify call daniizarsan/subastas-espana --silent --output-dataset

```

## MCP server setup

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

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/680goHqybqqB2UTha/builds/rxdZh2kfxy8XAdPXu/openapi.json
