# Fotocasa Scraper - Spain Real Estate Listings (`jeftazy/fotocasa-scraper`) Actor

Scrape fotocasa.es property listings across Spain. Search by city or paste a Fotocasa URL. Get price, €/m², rooms, size, address, coordinates, photos and agency phone for homes for sale, rent or share. Export JSON, CSV or Excel.

- **URL**: https://apify.com/jeftazy/fotocasa-scraper.md
- **Developed by:** [Luka Jeftic](https://apify.com/jeftazy) (community)
- **Categories:** Real estate, Lead generation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Fotocasa Scraper

Scrape real estate listings from [fotocasa.es](https://www.fotocasa.es), one of Spain's largest property portals. Search by city or paste a Fotocasa search URL. For each listing you get price, size, bedrooms, bathrooms, exact location, photos and agency contact. Results come as JSON, CSV or Excel.

### What can Fotocasa Scraper do?

- Search **any location in Spain** by name: city, province, district or neighborhood (e.g. `Madrid`, `Málaga`, `Eixample`)
- Or **paste search URLs** from fotocasa.es, with the filters you set on the site
- Scrape homes, garages, land, commercial premises, offices, storage rooms and buildings **for sale, for rent, to share or rent-to-own**
- Filter by price, bedrooms, bathrooms and size, and sort by newest or price
- Get **coordinates, price per m², amenities and agency phone numbers** for every listing
- Fast and cheap: it reads Fotocasa's data directly, without a browser, so thousands of listings take seconds
- Export to JSON, CSV, Excel or HTML, or connect through the API, Zapier, Make, n8n or MCP

### What data can you extract?

| Field | Example |
|---|---|
| `url` | https://www.fotocasa.es/es/comprar/vivienda/madrid-capital/.../191280336/d |
| `price`, `pricePeriod`, `priceDrop` | 730000, null, 19000 |
| `pricePerSqm` | 8295 |
| `rooms`, `bathrooms`, `surface`, `floor` | 3, 2, 88, 8 |
| `propertySubtype`, `condition` | flat, very_good |
| `amenities` | elevator, air_conditioner, terrace, swimming_pool |
| `address`, `neighborhood`, `district`, `municipality`, `province`, `zipCode` | Calle del Conde de Romanones, Embajadores - Lavapiés, Centro, Madrid Capital, Madrid, 28012 |
| `latitude`, `longitude` | 40.413338, -3.7049925 |
| `description`, `mainImage`, `images` | Full text, first photo and all photo URLs |
| `advertiserType`, `advertiserName`, `advertiserPhone`, `advertiserUrl` | professional, Aproperties Real Estate, +34911353884 |
| `publishedAt`, `isNewListing`, `hasVirtualTour` | 2026-04-15T14:25:30Z, false, true |

Contact details are included only for professional advertisers (agencies), never for private sellers.

### How to use Fotocasa Scraper

1. Click **Try for free**.
2. Type one or more **locations**, or paste **Fotocasa search URLs**.
3. Choose **operation**, **property type** and any filters.
4. Set **Max results** and click **Start**.
5. Download the results as JSON, CSV or Excel when the run finishes.

### How much does it cost?

You pay per listing saved, plus a small fee per run. A run that saves 1,000 listings usually finishes in under a minute. See the **Pricing** tab for current prices.

### Input example

```json
{
    "locations": ["Madrid", "Valencia"],
    "operation": "buy",
    "propertyType": "homes",
    "maxPrice": 400000,
    "minRooms": 2,
    "sortBy": "newest",
    "maxItems": 500
}
```

### Output example

```json
{
    "id": 189382740,
    "url": "https://www.fotocasa.es/es/comprar/vivienda/madrid-capital/aire-acondicionado-calefaccion-jardin-trastero-ascensor/189382740/d",
    "operation": "buy",
    "propertyType": "homes",
    "propertySubtype": "flat",
    "price": 730000,
    "pricePeriod": null,
    "priceDrop": 19000,
    "pricePerSqm": 8295,
    "currency": "EUR",
    "rooms": 3,
    "bathrooms": 2,
    "surface": 88,
    "floor": 8,
    "condition": null,
    "amenities": ["air_conditioner", "balcony", "elevator", "garden", "heater"],
    "address": "Calle del Conde de Romanones, Centro",
    "neighborhood": "Embajadores - Lavapiés",
    "district": "Centro",
    "municipality": "Madrid Capital",
    "province": "Madrid",
    "region": "Madrid",
    "zipCode": "28012",
    "latitude": 40.413338,
    "longitude": -3.7049925,
    "description": "EXCLUSIVO PISO MUY LUMINOSO A ESTRENAR EN EL CORAZÓN DE MADRID...",
    "mainImage": "https://static.fotocasa.es/images/ads/b335cff7-ca2d-4aa9-aae7-c006b82b7d66?rule=original",
    "images": ["https://static.fotocasa.es/images/ads/b335cff7-ca2d-4aa9-aae7-c006b82b7d66?rule=original"],
    "isNewListing": false,
    "hasVirtualTour": false,
    "advertiserType": "professional",
    "advertiserName": "Aproperties Real Estate Madrid",
    "advertiserPhone": "+34911353884",
    "advertiserUrl": "https://www.fotocasa.es/inmobiliarias/aproperties-real-estate-madrid-9202756368671",
    "publishedAt": "2026-04-15T14:25:30.163Z",
    "searchQuery": "Madrid",
    "scrapedAt": "2026-11-02T17:37:49.615225+00:00"
}
```

### Tips

- **Large searches:** Fotocasa returns at most 9,900 listings per search. For bigger areas, split the search by price range (e.g. 0–200k, 200k–400k) or by districts. Listings found by more than one search are saved only once.
- **Monitoring new listings:** sort by **Newest first**, set a small **Max results** and [schedule](https://docs.apify.com/platform/schedules) the actor daily.
- **Search URLs:** set filters on fotocasa.es, then copy the URL from your browser. Price, rooms, size and other filters in the URL are applied.

### FAQ

**Is it legal to scrape Fotocasa?**
The actor only collects publicly visible listing data. It does not collect contact details of private individuals. Check that your use complies with Fotocasa's terms and with GDPR, especially if you store or reuse agency contact data.

**Some fields are empty.**
Fields such as `floor`, `condition` or `amenities` are empty when the advertiser didn't fill them in on Fotocasa.

**I found a bug or need a feature.**
Open an issue in the **Issues** tab and I'll reply as soon as I can.

***

*This actor is not affiliated with or endorsed by Fotocasa or Adevinta.*

# Actor input Schema

## `locations` (type: `array`):

Cities, provinces, districts or neighborhoods in Spain, e.g. "Madrid", "Barcelona", "Málaga". Each one is searched with the filters below.

## `startUrls` (type: `array`):

Optional. Paste search result URLs from fotocasa.es, e.g. https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l. Operation, property type and price/room filters in the URL override the settings below.

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

Listings for sale, for rent, rooms to share, or rent-to-own.

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

Type of property to search for. Ignored for Share and Rent to own, which are homes only.

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

Minimum price in euros. Leave empty for no limit.

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

Maximum price in euros. Leave empty for no limit.

## `minRooms` (type: `integer`):

Minimum number of bedrooms. Homes only.

## `maxRooms` (type: `integer`):

Maximum number of bedrooms. Homes only.

## `minBathrooms` (type: `integer`):

Minimum number of bathrooms. Homes, commercial premises and offices only.

## `minSurface` (type: `integer`):

Minimum size in square meters.

## `maxSurface` (type: `integer`):

Maximum size in square meters.

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

Order of the results.

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

Maximum number of listings to save across all searches. 0 means no limit (Fotocasa returns up to 9,900 listings per search).

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

Proxy servers used for requests. Datacenter proxies are usually enough.

## Actor input object example

```json
{
  "locations": [
    "Madrid"
  ],
  "operation": "buy",
  "propertyType": "homes",
  "sortBy": "relevance",
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "locations": [
        "Madrid"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("jeftazy/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 = {
    "locations": ["Madrid"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("jeftazy/fotocasa-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 '{
  "locations": [
    "Madrid"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call jeftazy/fotocasa-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jeftazy/fotocasa-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/TkGXPtaMbfW4zj9fr/builds/JY1SLTyN5tDMGf9bH/openapi.json
