# Spanish Cadastre Property Scraper (`parseforge/catastro-spain-property-scraper`) Actor

Scrapes official Spanish Catastro property records by 20-character cadastral reference. Returns location, area, use, construction details, and cadastral value as a flat row.

- **URL**: https://apify.com/parseforge/catastro-spain-property-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Automation, Integrations, Real estate
- **Stats:** 2 total users, 0 monthly users, 90.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $7.50 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### Spanish Cadastre Property Scraper

**Scrape official Spanish property data by cadastral reference, up to a million records per run.** Each property returns its location, area, use, and construction details straight from the Catastro. No API key. Export to CSV, JSON, Excel, or XML.

The Spanish Catastro holds the definitive public record for every property in Spain, but its online portal is built for single lookups, not bulk research. This Actor reads the public data service directly, given a 20-character cadastral reference, and returns the full official record in one flat row. It is built for property professionals who need the source data, not a third-party summary.

| Who uses it | What they scrape Spanish Cadastre for |
|---|---|
| Property investors | Verify the official built area and year of construction before a purchase. |
| Real estate agents | Pull the legal description and land classification for a listing. |
| Tax consultants | Confirm the cadastral value and use code for a client's tax return. |
| Data analysts | Build a dataset of property characteristics across a municipality. |

### What it does

This Actor collects the official Catastro record for a Spanish property by its cadastral reference and returns the full data as a structured row.

- 🏛️ **Official source data:** reads the public Catastro service directly, returning the same fields the Sede Electrónica shows.
- 📋 **Fixed schema:** every property comes back with the same structure: location, area, use, construction, and cadastral value.
- ⚡ **Bulk ready:** set a high maximum and feed a list of references to collect thousands of records in one run.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with Spanish Cadastre data

**🏠 Verify a property before purchase.**

An investor enters the cadastral reference from a nota simple and checks the official built area, year, and use code against what the seller claims.

**📊 Build a local market dataset.**

A data analyst feeds a list of references for one postal code and collects the cadastral value, floor area, and construction year of every property to map price per square metre.

**🧾 Support tax filings.**

A tax consultant pulls the cadastral value and use classification for a client's portfolio to prepare the IBI and income tax declarations.

**🏗️ Assess development potential.**

A developer checks the land classification and maximum buildable area on a plot before making an offer.

### Why choose this scraper

| | What you get |
|---|---|
| **Official record** | Data comes straight from the Dirección General del Catastro, not a reseller. |
| **Structured output** | Every property returns the same fields so you can stack runs into one dataset. |
| **No API registration** | Uses the public consultation service; no developer account or API key needed. |

### How it compares

This Actor focuses on direct Catastro lookups by cadastral reference, while the competitors below scrape BOE auction listings and enrich them with Catastro data.

| Feature | ParseForge | Spain Property Auction MCP (Subastas BOE & Catastro) | Spanish Judicial Auctions, Enriched (BOE + Catastro) | Spain BOE Auctions Scraper |
|---|---|---|---|---|
| Direct Catastro lookup by referencia catastral | Yes | Not listed | Not listed | Not listed |
| Bulk Catastro data collection | Yes, up to 1M records | Not listed | Not listed | Not listed |
| BOE auction scraping | Not listed | Yes | Yes | Yes |
| Enriched with cadastral surface and year | Yes, from source | Yes | Yes | Not listed |
| No API key or registration required | Yes | Not listed | Not listed | Not listed |

### Configure the run

Drive the Actor with one or more 20-character cadastral references and set a maximum number of properties to cap the run. The Input tab lists every parameter.

A first run with the defaults:

```json
{
 "referencia": "9872023VH5797S0001WX",
 "maxItems": 10
}
```

A larger pull:

```json
{
 "referencia": "9872023VH5797S0001WX",
 "maxItems": 200
}
```

### Pricing

Pay-per-result: **$0.0085 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $0.85 |
| 1,000 results | $8.50 |
| 10,000 results | $85.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [Spanish Cadastre Property Scraper](https://apify.com/parseforge/catastro-spain-property-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to Spanish Cadastre through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=parseforge/catastro-spain-property-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Check that the cadastral reference is exactly 20 characters with no spaces or hyphens. A single wrong digit will return no match. Try the reference on the Sede Electrónica del Catastro to confirm it is valid.

**The run stops early before reaching my maximum.**

The Actor stops when it has processed all the references you provided. If you gave fewer references than the maximum, it finishes early. Feed a longer list to reach a higher count.

**Some fields are empty in the output.**

The Catastro does not always populate every field. For example, a rural plot may not have a built area. Empty fields mean the data is not held by the Catastro for that property.

**I get an error about the reference format.**

The referencia catastral must be exactly 20 alphanumeric characters. Remove any spaces, slashes, or dashes. The Actor validates the format before making the request.

### FAQ

| Question | Answer |
|---|---|
| What is a cadastral reference? | It is the 20-character official identifier for every property in Spain, found on your IBI receipt, escritura, or the Catastro website. The Actor needs this exact string to look up the record. |
| Can I scrape properties by address instead of reference? | No. The public Catastro service this Actor uses requires the 20-character cadastral reference. You can find the reference from an address on the Sede Electrónica del Catastro first, then feed it here. |
| What data does each property row include? | The full official record: location, surface area, use code, construction details, year built, and cadastral value. The exact fields are shown in the sample output on the Actor's page. |
| Does this work for any property in Spain? | Yes. The Catastro covers all urban and rural properties nationwide. As long as you have the correct 20-character referencia catastral, the Actor can retrieve it. |
| Is there a limit on how many properties I can scrape? | You set the maximum per run, up to one million. The practical limit is the number of valid references you provide and the run time you allocate. |
| Do I need an API key or certificate? | No. The Actor uses the same public consultation channel as the Catastro website, so no registration or digital certificate is required. |
| How fresh is the data? | It is live from the Catastro database at the moment of the request. The Actor does not cache results. |
| Can I get the ownership details? | No. The public Catastro service does not expose titularidad (ownership). That requires a separate notarial or registral consultation. |
| What export formats are supported? | You can export your dataset in CSV, JSON, Excel, or XML from the Apify platform. |
| How do I find the cadastral reference for a property? | Search the Sede Electrónica del Catastro by address or map. The reference appears in the property details and on the IBI receipt. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Dirección General del Catastro. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

## `referencia` (type: `string`):

20-character Spanish cadastral reference (referencia catastral).

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

How many properties to collect per run.

## Actor input object example

```json
{
  "referencia": "9872023VH5797S0001WX",
  "maxItems": 10
}
```

# Actor output Schema

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

No description

# 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 = {
    "referencia": "9872023VH5797S0001WX",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/catastro-spain-property-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 = {
    "referencia": "9872023VH5797S0001WX",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/catastro-spain-property-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 '{
  "referencia": "9872023VH5797S0001WX",
  "maxItems": 10
}' |
apify call parseforge/catastro-spain-property-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/catastro-spain-property-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/hwMQc4agshtPgfVrW/builds/2ct6ujQWNGDBGmwJs/openapi.json
