# Fotocasa Scraper (`parsebird/fotocasa-scraper`) Actor

Extract property listings from Fotocasa.es, Spain's largest real estate portal. Scrape prices, rooms, area, GPS coordinates, agency contacts, and images. Filter by location, operation, property type, price range, size, and publication date. Export as JSON, CSV, or Excel. API access included.

- **URL**: https://apify.com/parsebird/fotocasa-scraper.md
- **Developed by:** [ParseBird](https://apify.com/parsebird) (community)
- **Categories:** Real estate, Lead generation, Automation
- **Stats:** 13 total users, 7 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.00 / 1,000 listing scrapeds

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

### Fotocasa Scraper

Extract property listings from [Fotocasa.es](https://www.fotocasa.es/), Spain's leading real estate portal with millions of listings for sale, rent, shared housing, and commercial transfers across every Spanish city and region.

<table><tr>
<td style="border-left:4px solid #E63946;padding:12px 16px;font-weight:600">
Search any Spanish city, filter by price, size, operation type, and publication date — get structured property data with GPS coordinates, agency contacts, and images ready for analysis at scale.
</td>
</tr></table>

<br>

<table>
<tr>
<td colspan="3" style="padding:10px 14px;background:#E63946;border:none;border-radius:4px 4px 0 0">
<span style="color:#FFFFFF;font-size:14px;font-weight:700;letter-spacing:0.5px">ParseBird Real Estate</span>
<span style="color:#FECDD3;font-size:13px">&nbsp;&nbsp;&bull;&nbsp;&nbsp;European property data at scale</span>
</td>
</tr>
<tr>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-radius:0 0 0 4px;border-right:none;border-top:none;vertical-align:top;width:33%;background:#FFF1F2">
🏠 &nbsp;<a href="https://apify.com/parsebird/fotocasa-scraper" style="color:#E63946;text-decoration:none;font-weight:700;font-size:13px">Fotocasa Scraper</a><br>
<span style="color:#E63946;font-size:11px;font-weight:600">&#10148; You are here</span>
</td>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-right:none;border-top:none;vertical-align:top;width:33%">
🏡 &nbsp;<a href="https://apify.com/parsebird/funda-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">Funda.nl Scraper</a><br>
<span style="color:#78716C;font-size:11px">Dutch residential listings</span>
</td>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-radius:0 0 4px 0;border-top:none;vertical-align:top;width:33%">
🏢 &nbsp;<a href="https://apify.com/parsebird/immoweb-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">Immoweb.be Scraper</a><br>
<span style="color:#78716C;font-size:11px">Belgian property data, 70+ fields</span>
</td>
</tr>
</table>

##### Copy to your AI assistant

Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.

````

parsebird/fotocasa-scraper on Apify. Call: ApifyClient("TOKEN").actor("parsebird/fotocasa-scraper").call(run\_input={...}), then client.dataset(run\["defaultDatasetId"]).list\_items().items for results. Key inputs: location (string, e.g. "Madrid", "Barcelona", "Valencia"), operation (string: "buy"/"rent"/"share"/"rentBuyOption"/"transfer", default "buy"), propertyType (string: "home"/"newHome"/"premises"/"garages"/"office"/"boxRoom"/"land"/"building", default "home"), maxItems (integer, default 10), minPrice/maxPrice (integer, 0=no limit), minSize/maxSize (integer, m², 0=no limit), sortBy (string: "rating"/"latest"/"cheapest"/"mostExpensive"/"biggest"/"smallest"/"cheapestPerM2"), publicationDate (string: ""/"last48h"/"lastWeek"/"lastMonth"). Full actor spec: fetch via GET https://api.apify.com/v2/acts/parsebird~fotocasa-scraper (Bearer TOKEN). Get token: https://console.apify.com/account/integrations

````

### What is Fotocasa Scraper?

**Fotocasa Scraper** extracts structured property listing data from [Fotocasa.es](https://www.fotocasa.es/), Spain's largest real estate portal. It collects prices, rooms, surface area, GPS coordinates, agency contact details, images, and full descriptions — all from search result pages without visiting individual listings.

Use it as a **Fotocasa API alternative** to get Spanish real estate data in JSON, CSV, or Excel. No coding required — configure your search, click Start, and download results. Or integrate via the [Apify API](https://docs.apify.com/api/v2) to automate property data collection at scale.

### What can Fotocasa Scraper do?

- 🔍 **Search any Spanish location** — cities, regions, neighborhoods, and coastal areas
- 🏘️ **Five operation types** — buy, rent, shared housing, rent-to-buy, and business transfers
- 🏗️ **Eight property categories** — homes, new construction, commercial premises, garages, offices, storage rooms, land, and entire buildings
- 💰 **Filter by price and size** — set minimum/maximum price (€) and area (m²)
- 📅 **Publication date filter** — last 48 hours, last week, last month, or all time
- 📊 **Seven sort options** — relevance, latest, cheapest, most expensive, biggest, smallest, cheapest per m²
- 🔄 **Schedule recurring runs** — monitor new listings, track price changes, and build historical datasets with [Apify scheduling](https://docs.apify.com/platform/schedules)
- 🔗 **API access and integrations** — connect to Google Sheets, Zapier, Make, webhooks, or any workflow via the Apify API

### What data can you extract from Fotocasa?

| Field | Description |
|-------|-------------|
| `propertyId` | Unique Fotocasa listing identifier |
| `transaction.type` | SALE, RENT, SHARE, TRANSFER |
| `transaction.price` | Listing price in euros |
| `surface` | Property area in m² |
| `rooms` | Number of rooms |
| `baths` | Number of bathrooms |
| `street`, `number`, `floor` | Street address details |
| `address` | Country, district, municipality, province |
| `location` | GPS latitude and longitude |
| `agency.name`, `agency.phone` | Real estate agency contact |
| `multimedia` | Image URLs with type and classification |
| `description` | Full listing description (Spanish) |
| `buildingType`, `buildingSubtype` | Property classification |
| `publicationDate` | When the listing was published |
| `detailUrl` | Relative URL to the full listing page |

### How to scrape Fotocasa

1. Go to the [Fotocasa Scraper](https://apify.com/parsebird/fotocasa-scraper) page on Apify Store
2. Click **Try for free** to open the Actor console
3. Enter a **location** (e.g. Madrid, Barcelona, Valencia, Málaga)
4. Select an **operation** type — buy, rent, share, rent-to-buy, or transfer
5. Choose a **property type** — home, new construction, premises, garages, office, storage, land, or building
6. Set optional **filters** — min/max price, min/max size, publication date, sort order
7. Set **Max Items** to control how many listings to collect
8. Click **Start** and wait for the run to finish
9. Download your data in **JSON, CSV, Excel**, or connect via the **Apify API**

#### Python API example

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("parsebird/fotocasa-scraper").call(run_input={
    "location": "Barcelona",
    "operation": "rent",
    "propertyType": "home",
    "maxItems": 50,
    "maxPrice": 1500,
    "sortBy": "cheapest",
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{item['transaction']['price']}€ — {item['surface']}m² — {item.get('street', 'N/A')}")
````

#### JavaScript API example

```javascript
import { ApifyClient } from "apify-client";

const client = new ApifyClient({ token: "YOUR_API_TOKEN" });

const run = await client.actor("parsebird/fotocasa-scraper").call({
    location: "Barcelona",
    operation: "rent",
    propertyType: "home",
    maxItems: 50,
    maxPrice: 1500,
    sortBy: "cheapest",
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.log(`${item.transaction.price}€ — ${item.surface}m² — ${item.street ?? "N/A"}`);
});
```

### Input parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `maxItems` | integer | No | `10` | Maximum number of property listings to scrape |
| `location` | string | No | `"Madrid"` | City or region to search (e.g., Madrid, Barcelona, Valencia) |
| `operation` | string | No | `"buy"` | Operation type: `buy`, `rent`, `share`, `rentBuyOption`, `transfer` |
| `rentalTypes` | array | No | `[]` | Rental duration (only for rent): `longTerm`, `temporary` |
| `propertyType` | string | No | `"home"` | Property category: `home`, `newHome`, `premises`, `garages`, `office`, `boxRoom`, `land`, `building` |
| `minPrice` | integer | No | `0` | Minimum price in euros (0 = no minimum) |
| `maxPrice` | integer | No | `0` | Maximum price in euros (0 = no maximum) |
| `minSize` | integer | No | `0` | Minimum area in m² (0 = no minimum) |
| `maxSize` | integer | No | `0` | Maximum area in m² (0 = no maximum) |
| `publicationDate` | string | No | `""` | Publication filter: `""` (any), `last48h`, `lastWeek`, `lastMonth` |
| `sortBy` | string | No | `"rating"` | Sort order: `rating`, `latest`, `cheapest`, `mostExpensive`, `biggest`, `smallest`, `cheapestPerM2` |
| `proxyConfiguration` | object | No | Apify Proxy | Proxy settings (residential proxies recommended) |

### Output example

```json
{
    "propertyId": "187123129",
    "transaction": {
        "type": "SALE",
        "price": 120000
    },
    "surface": 57,
    "rooms": 3,
    "baths": 1,
    "street": "Calle de Benimamet",
    "number": "51",
    "floor": "10",
    "address": {
        "country": "España",
        "district": "Centro",
        "municipality": "Madrid",
        "province": "Madrid"
    },
    "publicationDate": "2025-07-21T19:15:08.237Z",
    "location": {
        "latitude": "40.3443439",
        "longitude": "-3.6871201"
    },
    "agency": {
        "name": "OCASIONES INMOBILIARIAS DEL HENARES SL",
        "phone": "912170482"
    },
    "multimedia": [
        {
            "url": "https://static.fotocasa.es/images/ads/06cd3b85-dd58...",
            "type": "image",
            "classification": "exterior"
        },
        {
            "url": "https://static.fotocasa.es/images/ads/4085ad4c-5c34...",
            "type": "image",
            "classification": "bedroom"
        }
    ],
    "description": "Piso en venta en el centro de Madrid...",
    "buildingType": "Flat",
    "buildingSubtype": "Flat",
    "isNewConstruction": false,
    "detailUrl": "/es/comprar/vivienda/madrid/centro/187123129/d",
    "sourceUrl": "https://www.fotocasa.es/es/comprar/viviendas/madrid/todas-las-zonas/l?sortType=scoring"
}
```

Download results in JSON, HTML, CSV, or Excel.

### Use cases

- 📈 **Real estate market analysis** — Track pricing trends, average €/m² costs, and inventory levels across Spanish cities
- 💼 **Investment research** — Compare property yields, identify undervalued neighborhoods, and monitor price-per-square-meter trends
- 📇 **Lead generation** — Extract agency contact information for partnership and outreach opportunities
- 🏠 **Relocation planning** — Build filtered shortlists matching specific criteria (price, size, location, rooms)
- 🔄 **Market monitoring** — Schedule recurring runs to track new listings and price changes over time
- 🔗 **PropTech integration** — Feed property data into CRMs, comparison tools, valuation models, or analytics dashboards

### How much does it cost to scrape Fotocasa?

| Event | Price per event | Price per 1,000 |
|-------|----------------|-----------------|
| `listing-scraped` | $0.006 | **$6.00** |

One event is charged each time a property listing is successfully scraped and saved to the dataset. You only pay for listings actually returned.

**Cost examples:**

| Listings | Cost |
|----------|------|
| 10 (default run) | $0.06 |
| 100 | $0.60 |
| 1,000 | $6.00 |
| 10,000 | $60.00 |

Apify offers a **free trial** with $5 of platform credits — enough to scrape ~830 property listings at no cost.

### How it works

1. Constructs a Fotocasa.es search URL from your input parameters (location, operation, filters)
2. Opens the search page in a headless Chromium browser with residential proxies
3. Accepts cookie consent and waits for listings to load
4. Extracts property data via network interception of Fotocasa's internal API responses
5. Falls back to page state extraction or DOM parsing if network interception yields no results
6. Paginates through search results until `maxItems` is reached or no more listings are found
7. Pushes each property listing to the Apify dataset

### FAQ

**What locations can I search on Fotocasa?**
Any location available on Fotocasa.es — cities (Madrid, Barcelona, Valencia, Sevilla, Málaga), regions (Costa del Sol, Costa Brava, Islas Baleares), provinces, or neighborhoods. Enter the location name as it appears on the site.

**Can I scrape rental listings from Fotocasa?**
Yes. Set `operation` to `rent` and optionally specify `rentalTypes` to filter by long-term or temporary rentals.

**Why does this scraper use residential proxies?**
Fotocasa.es uses anti-bot protection. Residential proxies (especially Spanish ones) provide the best success rate. The scraper uses Apify's RESIDENTIAL proxy group by default.

**How many Fotocasa listings can I scrape per run?**
There is no hard limit. Set `maxItems` to control how many listings to collect. Larger runs use more compute time and proxy bandwidth.

**Does this scraper visit individual listing detail pages?**
No. It extracts data from search result pages only, which already contain comprehensive property information including price, area, rooms, GPS coordinates, agency details, and images.

**Can I schedule recurring scrapes?**
Yes. Use [Apify scheduling](https://docs.apify.com/platform/schedules) to run daily, weekly, or at any custom interval. Combine with webhooks or integrations to automate your property data pipeline.

**Can I access the data via API?**
Yes. Every run produces a dataset accessible via the [Apify API](https://docs.apify.com/api/v2). Integrate with Python, JavaScript, Google Sheets, Zapier, Make, or any HTTP-capable tool.

**What property types does Fotocasa Scraper support?**
Eight categories: homes (viviendas), new construction (obra nueva), commercial premises (locales), garages (garajes), offices (oficinas), storage rooms (trasteros), land (terrenos), and entire buildings (edificios).

### Is it legal to scrape Fotocasa?

This Actor extracts publicly available data from Fotocasa.es. Scraping public data is generally considered legal based on recent court rulings, including the US Ninth Circuit's decision in *hiQ Labs v. LinkedIn*. However, users are responsible for ensuring their use of scraped data complies with applicable laws, Fotocasa.es Terms of Service, and data protection regulations including GDPR. Do not use extracted personal data for unsolicited contact or purposes incompatible with the original collection context. For more information, read Apify's blog post on [web scraping legality](https://blog.apify.com/is-web-scraping-legal/).

### Other ParseBird real estate scrapers

| Actor | Target site | Region |
|-------|------------|--------|
| [Fotocasa Scraper](https://apify.com/parsebird/fotocasa-scraper) | Fotocasa.es | 🇪🇸 Spain |
| [Funda.nl Scraper](https://apify.com/parsebird/funda-scraper) | Funda.nl | 🇳🇱 Netherlands |
| [Funda in Business Scraper](https://apify.com/parsebird/fundainbusiness-scraper) | FundaInBusiness.nl | 🇳🇱 Netherlands (commercial) |
| [Immoweb.be Scraper](https://apify.com/parsebird/immoweb-scraper) | Immoweb.be | 🇧🇪 Belgium |

Browse all ParseBird actors on the [Apify Store](https://apify.com/parsebird).

# Actor input Schema

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

Maximum number of property listings to scrape.

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

Location to search for properties (e.g., city name or region). Examples: Madrid, Barcelona, Valencia, Sevilla, Málaga.

## `operation` (type: `string`):

Type of property operation to search for.

## `rentalTypes` (type: `array`):

Rental duration filter (only applies when operation is 'rent').

## `propertyType` (type: `string`):

Category of property to search for.

## `minPrice` (type: `integer`):

Minimum property price in euros. Set to 0 for no minimum.

## `maxPrice` (type: `integer`):

Maximum property price in euros. Set to 0 for no maximum.

## `minSize` (type: `integer`):

Minimum property area in square meters. Set to 0 for no minimum.

## `maxSize` (type: `integer`):

Maximum property area in square meters. Set to 0 for no maximum.

## `publicationDate` (type: `string`):

Filter by when the listing was published.

## `sortBy` (type: `string`):

How to sort the search results.

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

Proxy settings for the scraper. Residential proxies are recommended for fotocasa.es.

## Actor input object example

```json
{
  "maxItems": 10,
  "location": "Madrid",
  "operation": "buy",
  "rentalTypes": [],
  "propertyType": "home",
  "minPrice": 0,
  "maxPrice": 0,
  "minSize": 0,
  "maxSize": 0,
  "publicationDate": "",
  "sortBy": "rating",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `dataset` (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 = {
    "maxItems": 10,
    "location": "Madrid",
    "operation": "buy",
    "propertyType": "home",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("parsebird/fotocasa-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 = {
    "maxItems": 10,
    "location": "Madrid",
    "operation": "buy",
    "propertyType": "home",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("parsebird/fotocasa-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 '{
  "maxItems": 10,
  "location": "Madrid",
  "operation": "buy",
  "propertyType": "home",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call parsebird/fotocasa-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Fotocasa Scraper",
        "description": "Extract property listings from Fotocasa.es, Spain's largest real estate portal. Scrape prices, rooms, area, GPS coordinates, agency contacts, and images. Filter by location, operation, property type, price range, size, and publication date. Export as JSON, CSV, or Excel. API access included.",
        "version": "1.0",
        "x-build-id": "MAujvpQkm0IoECO0s"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parsebird~fotocasa-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parsebird-fotocasa-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/parsebird~fotocasa-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parsebird-fotocasa-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/parsebird~fotocasa-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parsebird-fotocasa-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": {
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of property listings to scrape.",
                        "default": 10
                    },
                    "location": {
                        "title": "Location",
                        "type": "string",
                        "description": "Location to search for properties (e.g., city name or region). Examples: Madrid, Barcelona, Valencia, Sevilla, Málaga.",
                        "default": "Madrid"
                    },
                    "operation": {
                        "title": "Operation",
                        "enum": [
                            "buy",
                            "rent",
                            "share",
                            "rentBuyOption",
                            "transfer"
                        ],
                        "type": "string",
                        "description": "Type of property operation to search for.",
                        "default": "buy"
                    },
                    "rentalTypes": {
                        "title": "Rental Duration",
                        "type": "array",
                        "description": "Rental duration filter (only applies when operation is 'rent').",
                        "items": {
                            "type": "string",
                            "enum": [
                                "longTerm",
                                "temporary"
                            ],
                            "enumTitles": [
                                "Long Term",
                                "Temporary"
                            ]
                        },
                        "default": []
                    },
                    "propertyType": {
                        "title": "Property Type",
                        "enum": [
                            "home",
                            "newHome",
                            "premises",
                            "garages",
                            "office",
                            "boxRoom",
                            "land",
                            "building"
                        ],
                        "type": "string",
                        "description": "Category of property to search for.",
                        "default": "home"
                    },
                    "minPrice": {
                        "title": "Min Price (€)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Minimum property price in euros. Set to 0 for no minimum.",
                        "default": 0
                    },
                    "maxPrice": {
                        "title": "Max Price (€)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum property price in euros. Set to 0 for no maximum.",
                        "default": 0
                    },
                    "minSize": {
                        "title": "Min Size (m²)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Minimum property area in square meters. Set to 0 for no minimum.",
                        "default": 0
                    },
                    "maxSize": {
                        "title": "Max Size (m²)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum property area in square meters. Set to 0 for no maximum.",
                        "default": 0
                    },
                    "publicationDate": {
                        "title": "Publication Date",
                        "enum": [
                            "",
                            "last48h",
                            "lastWeek",
                            "lastMonth"
                        ],
                        "type": "string",
                        "description": "Filter by when the listing was published.",
                        "default": ""
                    },
                    "sortBy": {
                        "title": "Sort By",
                        "enum": [
                            "rating",
                            "latest",
                            "cheapest",
                            "mostExpensive",
                            "biggest",
                            "smallest",
                            "cheapestPerM2"
                        ],
                        "type": "string",
                        "description": "How to sort the search results.",
                        "default": "rating"
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings for the scraper. Residential proxies are recommended for fotocasa.es.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
