# Spain Public Auctions (BOE) — Judicial & Tax Auction Feed (`jdepablos/spain-boe-auctions`) Actor

Live Spanish public auctions from the official portal (subastas.boe.es): judicial and tax auctions with auction value, appraisal, minimum bid, deposit, ISO dates and full asset details — address, cadastral reference, charges, possession status. Built for real-estate investors and AI agents.

- **URL**: https://apify.com/jdepablos/spain-boe-auctions.md
- **Developed by:** [Juan de Pablos](https://apify.com/jdepablos) (community)
- **Categories:** Real estate, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 auctions

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Spain Public Auctions (BOE) — Judicial & Tax Auctions as Clean JSON

**Every public auction in Spain, structured.** Live feed from the official Spanish auction portal (subastas.boe.es): judicial foreclosures, tax-agency and administrative auctions — with the numbers and the asset data investors actually need, one JSON record per auction.

The official portal is a search form with no API. This Actor turns it into data: **"give me every open auction in Madrid with its auction value, minimum bid, deposit, address, cadastral reference and charges."**

### What you get per auction

```json
{
  "id": "SUB-JA-2025-246146",
  "type": "JUDICIAL EN VÍA DE APREMIO",
  "startsAt": "2025-04-18T18:00:00+02:00",
  "endsAt": "2026-07-05T12:27:24+02:00",
  "claimedAmountEur": 6953.30,
  "auctionValueEur": 325095.43,
  "appraisalValueEur": 325095.43,
  "minBidEur": null,
  "bidIncrementEur": 6501.90,
  "depositEur": 16254.77,
  "boeAnnouncement": "BOE-B-2025-13955",
  "url": "https://subastas.boe.es/detalleSubasta.php?idSub=SUB-JA-2025-246146",
  "assets": [
    {
      "description": "VIVIENDA SITA EN C/DEL BARCO Nº27 4ºB MADRID 28004 57 M",
      "cadastralRef": "28108000205725",
      "address": "C/BARCO Nº27 4ºB",
      "postalCode": "28004",
      "city": "MADRID",
      "province": "Madrid",
      "possessionStatus": "No consta",
      "visitable": "No",
      "charges": "SIN CARGAS",
      "registryInfo": "FINCA 2213 REGISTRO DE LA PROPIEDAD Nº27 MADRID"
    }
  ]
}
````

### Market comparison built in (v0.2)

Real-estate auctions are enriched with **live market stats for the asset's own city** (source: fotocasa listings):

```json
"marketComparison": {
  "source": "fotocasa",
  "zoneSlug": "getafe",
  "sampleSize": 31,
  "medianAskingEur": 299000,
  "medianPerM2Eur": 3333,
  "assetSurfaceM2": 75,
  "estMarketValueEur": 249975,
  "estDiscountPct": 34.2
}
```

`estDiscountPct` is the number every auction investor computes by hand: auction value vs what the zone actually asks per m². Note: zone stats come from a first-page sample of asking prices — treat them as a screening signal, then verify. Disable with `compareMarket: false`.

### Why investors use it

- **The spread is visible**: auction value vs appraisal vs minimum bid — the discount math is one subtraction away.
- **Cadastral reference included**: join against Catastro data, comparables or your own models.
- **Charges and possession status**: the two fields that turn a "bargain" into a money pit — surfaced, not buried in a PDF.
- **ISO dates**: bidding deadlines you can sort, filter and alert on.
- **Official source**: the State's own auction portal, every record with its BOE announcement id.

### Use cases

- **Real-estate investors**: daily sweep of open auctions in your provinces, filtered by value band.
- **Proptech / data teams**: structured feed to enrich with Catastro, idealista comps or your AVM.
- **Lawyers / insolvency pros**: track auctions tied to specific proceedings.
- **AI agents**: "find me flats at auction in Madrid under 200k ending this month" — one tool call.

### Input

| Field | Description |
|---|---|
| `status` | `EJ` in progress (default) · `PU` upcoming · `CO` concluded |
| `provinces` | Names or INE codes: `["Madrid", "08"]` — empty for all of Spain |
| `maxAuctions` | Cap per run (default 50) |
| `includeAssets` | Fetch per-auction asset details (default true) |
| `minAuctionValue` / `maxAuctionValue` | Value band filter (EUR) |

### Use with AI agents (MCP)

This Actor is exposed as a tool on the [Apify MCP Server](https://mcp.apify.com):

```json
{
  "mcpServers": {
    "spain-boe-auctions": {
      "url": "https://mcp.apify.com?tools=jdepablos/spain-boe-auctions",
      "headers": { "Authorization": "Bearer <APIFY_TOKEN>" }
    }
  }
}
```

Pairs well with [Spanish Company Feed (BORME)](https://apify.com/jdepablos/borme-company-feed) — same official-source discipline, company events instead of auctions.

### Pricing

Pay per event: **one flat fee per auction returned**, asset details included. Failed fetches are never charged.

### FAQ

**How fresh is the data?** It is scraped live from the official portal at run time — auctions open and close daily; run it on a schedule for monitoring.

**Vehicles and other assets too?** Yes — the portal covers real estate, vehicles and other seized assets. Asset fields adapt (plate/brand/model for vehicles).

**Why is `minBidEur` sometimes null?** "Sin puja mínima" — the auction has no minimum bid, which is exactly the kind you may care about.

### More data tools by this developer

- [eBay Sold Price Appraiser — real market value from confirmed sales](https://apify.com/jdepablos/ebay-sold-price-appraiser)
- [Second-hand Deal Scanner ES — Vinted/Wallapop/Milanuncios deals vs eBay sold](https://apify.com/jdepablos/second-hand-deal-scanner-es)
- [Spanish Company Feed (BORME) — daily registry acts as JSON](https://apify.com/jdepablos/borme-company-feed)
- [Trademark Watch (TMview) — new filings & opposition deadlines](https://apify.com/jdepablos/trademark-watch-tmview)

# Actor input Schema

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

EJ = in progress (bidding open), PU = upcoming, CO = concluded.

## `provinces` (type: `array`):

Spanish province names or two-digit INE codes, e.g. \["Madrid", "Barcelona"] or \["28", "08"]. Empty = all of Spain.

## `maxAuctions` (type: `integer`):

Stop after this many auctions.

## `includeAssets` (type: `boolean`):

Fetch the assets tab per auction: description, address, cadastral reference, charges, possession status (one extra request per auction).

## `minAuctionValue` (type: `integer`):

Skip auctions below this value.

## `maxAuctionValue` (type: `integer`):

Skip auctions above this value.

## `compareMarket` (type: `boolean`):

Enrich real-estate auctions with zone market stats from fotocasa (median asking price, EUR/m2) and estimated discount vs market. One extra request per distinct city.

## Actor input object example

```json
{
  "status": "EJ",
  "provinces": [
    "Madrid"
  ],
  "maxAuctions": 50,
  "includeAssets": true,
  "compareMarket": true
}
```

# 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 = {
    "provinces": [
        "Madrid"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("jdepablos/spain-boe-auctions").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 = { "provinces": ["Madrid"] }

# Run the Actor and wait for it to finish
run = client.actor("jdepablos/spain-boe-auctions").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "provinces": [
    "Madrid"
  ]
}' |
apify call jdepablos/spain-boe-auctions --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=jdepablos/spain-boe-auctions",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Spain Public Auctions (BOE) — Judicial & Tax Auction Feed",
        "description": "Live Spanish public auctions from the official portal (subastas.boe.es): judicial and tax auctions with auction value, appraisal, minimum bid, deposit, ISO dates and full asset details — address, cadastral reference, charges, possession status. Built for real-estate investors and AI agents.",
        "version": "0.2",
        "x-build-id": "IaOYfawVIfxD5z58x"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/jdepablos~spain-boe-auctions/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-jdepablos-spain-boe-auctions",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/jdepablos~spain-boe-auctions/runs": {
            "post": {
                "operationId": "runs-sync-jdepablos-spain-boe-auctions",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/jdepablos~spain-boe-auctions/run-sync": {
            "post": {
                "operationId": "run-sync-jdepablos-spain-boe-auctions",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "status": {
                        "title": "Auction status",
                        "enum": [
                            "EJ",
                            "PU",
                            "CO"
                        ],
                        "type": "string",
                        "description": "EJ = in progress (bidding open), PU = upcoming, CO = concluded.",
                        "default": "EJ"
                    },
                    "provinces": {
                        "title": "Provinces",
                        "type": "array",
                        "description": "Spanish province names or two-digit INE codes, e.g. [\"Madrid\", \"Barcelona\"] or [\"28\", \"08\"]. Empty = all of Spain."
                    },
                    "maxAuctions": {
                        "title": "Max auctions",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Stop after this many auctions.",
                        "default": 50
                    },
                    "includeAssets": {
                        "title": "Include asset details",
                        "type": "boolean",
                        "description": "Fetch the assets tab per auction: description, address, cadastral reference, charges, possession status (one extra request per auction).",
                        "default": true
                    },
                    "minAuctionValue": {
                        "title": "Min auction value (EUR)",
                        "type": "integer",
                        "description": "Skip auctions below this value."
                    },
                    "maxAuctionValue": {
                        "title": "Max auction value (EUR)",
                        "type": "integer",
                        "description": "Skip auctions above this value."
                    },
                    "compareMarket": {
                        "title": "Compare with market prices",
                        "type": "boolean",
                        "description": "Enrich real-estate auctions with zone market stats from fotocasa (median asking price, EUR/m2) and estimated discount vs market. One extra request per distinct city.",
                        "default": true
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
