# Subastas BOE Scraper — Spanish Gov Auctions (`studio-amba/subastas-boe-scraper`) Actor

Extract judicial and government auctions from Spain's official Subastas BOE portal. Search real estate foreclosures, vehicle auctions, and asset sales by province, asset type, and status. Returns property details, court info, bid amounts, and deposit requirements. No cookies, no login.

- **URL**: https://apify.com/studio-amba/subastas-boe-scraper.md
- **Developed by:** [Studio Amba](https://apify.com/studio-amba) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, NaN 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/platform/actors/running/actors-in-store#pay-per-usage

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

## Spanish Auction Scraper -- Subastas BOE Foreclosures

Extract judicial and government auctions from Spain's official Subastas BOE portal. Search real estate foreclosures, vehicle auctions, and asset sales across all Spanish provinces. Returns property details, court information, bid amounts, deposit requirements, and authority contact data. No cookies, no login required.

### How to scrape Subastas BOE data

This actor scrapes the official Spanish government auction portal (subastas.boe.es), operated by the State Official Gazette Agency. It covers judicial auctions (foreclosures), tax authority asset sales, notarial auctions, and administrative auctions across all 52 Spanish provinces.

#### Search by province

Filter auctions by Spanish province code. Popular codes: 28 (Madrid), 08 (Barcelona), 46 (Valencia), 41 (Sevilla), 29 (Malaga), 03 (Alicante), 11 (Cadiz), 07 (Illes Balears). Leave empty to search all provinces.

#### Filter by asset type

Choose between real estate (inmuebles), vehicles (vehiculos), or other movable assets. Real estate includes apartments, houses, commercial premises, garages, land, and industrial buildings. Vehicles include cars, motorcycles, and industrial vehicles.

#### Filter by auction type

- **Judicial** -- Court-ordered foreclosures and asset liquidations. The most common type.
- **AEAT (Tax Authority)** -- Properties seized by Spain's tax agency for unpaid taxes.
- **Notarial** -- Auctions conducted through notarial procedures.
- **Administrative** -- General government administrative auctions.

#### Active vs upcoming auctions

By default, the scraper returns active auctions (currently accepting bids). Switch to "Upcoming" to see auctions that haven't started yet, or "Any status" for the broadest results.

### What data does Subastas BOE Scraper extract?

| Field | Type | Description |
|-------|------|-------------|
| **auctionId** | String | Unique auction ID (e.g., SUB-JA-2026-261340) |
| **auctionType** | String | Type (Judicial, Notarial, AEAT, Administrative) |
| **court** | String | Court or authority managing the auction |
| **caseNumber** | String | Case/expediente number |
| **status** | String | Current status and expected end date |
| **endDate** | String | Auction end date and time |
| **description** | String | Brief asset description from listing |
| **auctionValue** | String | Starting auction value |
| **appraisalValue** | String | Official appraised value |
| **minimumBid** | String | Minimum bid amount |
| **bidIncrement** | String | Minimum increment between bids |
| **depositAmount** | String | Required deposit to participate |
| **claimedAmount** | String | Total debt being recovered |
| **lots** | String | Number of lots in the auction |
| **boeAnnouncement** | String | Official BOE announcement reference |
| **authorityCode** | String | Managing authority code |
| **authorityName** | String | Court or authority name |
| **authorityAddress** | String | Authority address |
| **authorityPhone** | String | Contact phone |
| **authorityEmail** | String | Contact email |
| **assetDescription** | String | Full property description |
| **assetAddress** | String | Property address |
| **assetPostalCode** | String | Postal code |
| **assetCity** | String | City |
| **assetProvince** | String | Province |
| **isPrimaryResidence** | String | Whether it is a primary residence |
| **possessionStatus** | String | Occupancy status |
| **isVisitable** | String | Whether property visits are allowed |
| **detailUrl** | String | Direct link to full auction details |
| **scrapedAt** | String | ISO timestamp of extraction |

### Example output

```json
{
    "auctionId": "SUB-JA-2026-261340",
    "auctionType": "JUDICIAL EN VIA DE APREMIO",
    "court": "Seccion Civil e Instruc TI Getafe. Plz.n 4 - GETAFE",
    "caseNumber": "2379 0000 06 0157 21",
    "status": "Celebrandose - [Conclusion prevista: 11/06/2026 a las 18:00:00]",
    "endDate": "11-06-2026 18:00:00 CET",
    "description": "Urbana,- Piso tercero, Letra b de la casa numero dieciseis, de la calle Alicante en Getafe (Madrid).",
    "auctionValue": "194.400,00 EUR",
    "appraisalValue": "0,00 EUR",
    "minimumBid": "Sin puja minima",
    "bidIncrement": "3.888,00 EUR",
    "depositAmount": "9.720,00 EUR",
    "claimedAmount": "157.241,54 EUR",
    "lots": "Sin lotes",
    "boeAnnouncement": "BOE-B-2026-16058",
    "authorityCode": "2806541004",
    "authorityName": "Seccion Civil e Instruc TI Getafe. Plz.n 4",
    "authorityAddress": "AV JUAN CARLOS I S/N S/N ; 28905 GETAFE",
    "authorityPhone": "919499470",
    "authorityEmail": "sejecucioncivil.getafe@madrid.org",
    "assetDescription": "Urbana,- Piso tercero, Letra b de la casa numero dieciseis, de la calle Alicante en Getafe (Madrid).",
    "assetAddress": "calle Alicante 16, 3B",
    "assetPostalCode": "28903",
    "assetCity": "getafe",
    "assetProvince": "Madrid",
    "isPrimaryResidence": "Si",
    "possessionStatus": "No consta",
    "isVisitable": "No consta",
    "detailUrl": "https://subastas.boe.es/detalleSubasta.php?idSub=SUB-JA-2026-261340",
    "scrapedAt": "2026-05-23T10:00:00.000Z"
}
````

### Use cases

- **Real estate investors** -- Find below-market properties from judicial foreclosures across Spain.
- **Bargain hunters** -- Monitor vehicle and asset auctions for deals.
- **Legal professionals** -- Track judicial auction proceedings and outcomes.
- **Market research** -- Analyze foreclosure trends by province, property type, and value.
- **Property portals** -- Aggregate auction listings alongside regular property listings.

### Tips for best results

- **Start with active auctions**: Default status "Celebrandose" shows only auctions currently accepting bids.
- **Province focus**: Narrow by province to get manageable result sets. Madrid (28) and Barcelona (08) have the most auctions.
- **Real estate focus**: Set asset type to "Inmuebles" for property-only results.
- **Disable details for speed**: Set "Include Full Details" to false for a quick listing scan without per-auction detail fetches.

### How much does it cost?

| Search size | Estimated time | Estimated cost |
|-------------|---------------|----------------|
| 10 auctions (with details) | ~1 minute | ~$0.05 |
| 50 auctions (with details) | ~5 minutes | ~$0.20 |
| 50 auctions (listing only) | ~10 seconds | ~$0.01 |

### Can I use it as an API?

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("studio-amba/subastas-boe-scraper").call(run_input={
    "province": "28",
    "assetType": "I",
    "auctionStatus": "EJ",
    "maxResults": 20,
})

for auction in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{auction['auctionId']} | {auction['auctionValue']} | {auction['assetCity']}")
```

### Limitations

- The Subastas BOE portal does not provide an API, so this actor scrapes HTML pages.
- Detail fetching requires 3 HTTP requests per auction (general + authority + assets tabs). Use "listing only" mode for faster results.
- Multi-lot auctions show the first lot's details. Individual lot data may require manual inspection.
- The portal may be slow during peak hours.

### Other Spanish data scrapers

- **[BOE Official Gazette Scraper](https://apify.com/studio-amba/boe-scraper)** -- Spanish laws, decrees, and public notices
- **[BOAMP Scraper](https://apify.com/studio-amba/boamp-scraper)** -- French public procurement tenders

### Your feedback

Found a bug or want a feature? Open an issue on the [Issues tab](https://console.apify.com/actors/studio-amba~subastas-boe-scraper/issues).

# Actor input Schema

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

Filter by province code. Examples: '28' Madrid, '08' Barcelona, '46' Valencia, '41' Sevilla, '29' Malaga. Leave empty for all provinces.

## `assetType` (type: `string`):

Filter by type of asset being auctioned.

## `auctionType` (type: `string`):

Filter by auction origin.

## `auctionStatus` (type: `string`):

Filter by auction status.

## `maxMinBid` (type: `string`):

Only show auctions with minimum bid below this amount (in cents). Example: '20000000' = 200,000 EUR.

## `includeDetails` (type: `boolean`):

Fetch full details (authority, property, bids) for each auction. Slower but more complete data.

## `maxResults` (type: `integer`):

Maximum number of auctions to return.

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

Select proxies to use for the scraper.

## Actor input object example

```json
{
  "province": "28",
  "assetType": "",
  "auctionType": "",
  "auctionStatus": "EJ",
  "includeDetails": true,
  "maxResults": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}
```

# 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": "28",
    "maxResults": 10,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "ES"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("studio-amba/subastas-boe-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": "28",
    "maxResults": 10,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "ES",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("studio-amba/subastas-boe-scraper").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 '{
  "province": "28",
  "maxResults": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}' |
apify call studio-amba/subastas-boe-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Subastas BOE Scraper — Spanish Gov Auctions",
        "description": "Extract judicial and government auctions from Spain's official Subastas BOE portal. Search real estate foreclosures, vehicle auctions, and asset sales by province, asset type, and status. Returns property details, court info, bid amounts, and deposit requirements. No cookies, no login.",
        "version": "0.0",
        "x-build-id": "7oy0uegQ64fwhgLHr"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/studio-amba~subastas-boe-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-studio-amba-subastas-boe-scraper",
                "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/studio-amba~subastas-boe-scraper/runs": {
            "post": {
                "operationId": "runs-sync-studio-amba-subastas-boe-scraper",
                "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/studio-amba~subastas-boe-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-studio-amba-subastas-boe-scraper",
                "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": {
                    "province": {
                        "title": "Province",
                        "type": "string",
                        "description": "Filter by province code. Examples: '28' Madrid, '08' Barcelona, '46' Valencia, '41' Sevilla, '29' Malaga. Leave empty for all provinces."
                    },
                    "assetType": {
                        "title": "Asset Type",
                        "enum": [
                            "",
                            "I",
                            "V",
                            "M"
                        ],
                        "type": "string",
                        "description": "Filter by type of asset being auctioned.",
                        "default": ""
                    },
                    "auctionType": {
                        "title": "Auction Type",
                        "enum": [
                            "",
                            "J",
                            "N",
                            "A",
                            "R",
                            "G"
                        ],
                        "type": "string",
                        "description": "Filter by auction origin.",
                        "default": ""
                    },
                    "auctionStatus": {
                        "title": "Auction Status",
                        "enum": [
                            "EJ",
                            "",
                            "PU",
                            "SU",
                            "CA",
                            "FS"
                        ],
                        "type": "string",
                        "description": "Filter by auction status.",
                        "default": "EJ"
                    },
                    "maxMinBid": {
                        "title": "Max Minimum Bid",
                        "type": "string",
                        "description": "Only show auctions with minimum bid below this amount (in cents). Example: '20000000' = 200,000 EUR."
                    },
                    "includeDetails": {
                        "title": "Include Full Details",
                        "type": "boolean",
                        "description": "Fetch full details (authority, property, bids) for each auction. Slower but more complete data.",
                        "default": true
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum number of auctions to return.",
                        "default": 50
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Select proxies to use for the scraper.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ],
                            "apifyProxyCountry": "ES"
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
