# Fotocasa Scraper: Spain Property Listings (`puhmeisterluka/fotocasa-scraper`) Actor

Property listings from any Fotocasa search, for sale or rent: price, price drops, m², rooms, address, coordinates, photos and agency details. Paste a search URL, schedule it for new listings only.

- **URL**: https://apify.com/puhmeisterluka/fotocasa-scraper.md
- **Developed by:** [Luka Puhmeister](https://apify.com/puhmeisterluka) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.95 / 1,000 listings

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/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: Spain Property Listings

Get property listings from any Fotocasa search as JSON, CSV or Excel. Sale or rent, any city, any filters. No login, no proxy.

- **Paste a search URL.** Set location, price, rooms and every other filter on fotocasa.es, copy the URL, done.
- **Price cuts.** `priceDrop` and `previousPrice` when a listing was reduced, plus `pricePerM2`.
- **Monitor mode.** Turn on **Only new listings** and schedule it. Each run returns only listings it has not returned before for that search.
- **Map-ready.** Coordinates, district, neighborhood and postal code on every listing.

### What data does it return?

| Field | Example | Notes |
|---|---|---|
| `id`, `url` | `191195483`, `https://www.fotocasa.es/es/comprar/vivienda/...` | |
| `transaction` | `sale` | `sale`, `rent`, `share` or `transfer` |
| `propertyType`, `propertySubtype` | `Flat`, `Flat` | |
| `price`, `currency` | `395000`, `EUR` | Rent prices are monthly |
| `priceDrop`, `previousPrice` | `45100`, `520000` | The latest cut and the price before it, when Fotocasa shows one |
| `pricePerM2` | `5266.67` | |
| `rooms`, `bathrooms`, `surfaceM2` | `1`, `1`, `75` | |
| `amenities` | `["parking", "elevator", "community_pool"]` | |
| `isNewConstruction`, `isOccupied`, `isAuctioned`, `isBareOwnership` | `false` | |
| `street`, `neighborhood`, `district`, `city`, `province`, `zipCode` | `Calle de Oslo, Rosas - Musas`, `Rosas - Musas`, `San Blas`, `Madrid`, `Madrid`, `28022` | |
| `latitude`, `longitude` | `40.4261`, `-3.6021` | |
| `description` | `VOhome Propiedades Las Rosas te presenta...` | |
| `images` | `["https://static.fotocasa.es/images/ads/..."]` | |
| `hasVideo`, `hasVirtualTour` | `false`, `true` | |
| `publishedAt` | `2026-10-23T09:15:06+00:00` | |
| `advertiserType` | `agency` | `agency` or `private` |
| `agencyName`, `agencyUrl`, `agencyPhone` | `VOhome Las Rosas-San Blas`, `https://www.fotocasa.es/es/pro/...`, `+34913240120` | Agencies only |
| `searchUrl`, `scrapedAt` | | |

**Private sellers:** their names and phone numbers are never returned, and phone numbers and emails in their descriptions are masked. Contact them through Fotocasa.

The run's `SEARCHES` record shows, per search URL, the total results, pages read and listings returned.

### Output example

One item from a real run, long texts shortened:

```json
{
  "id": 187960322,
  "url": "https://www.fotocasa.es/es/comprar/vivienda/madrid-capital/aire-acondicionado-calefaccion-ascensor-amueblado/187960322/d",
  "transaction": "sale",
  "propertyType": "Flat",
  "propertySubtype": "Flat",
  "price": 1980000,
  "currency": "EUR",
  "previousPrice": 2100000,
  "priceDrop": 120000,
  "pricePerM2": 14142.86,
  "rooms": 2,
  "bathrooms": 2,
  "surfaceM2": 140,
  "amenities": [
    "air_conditioner",
    "cabinets",
    "heating"
  ],
  "isNewConstruction": false,
  "isOccupied": false,
  "isAuctioned": false,
  "isBareOwnership": false,
  "street": "Recoletos",
  "neighborhood": "Recoletos",
  "district": "Barrio de Salamanca",
  "city": "Madrid",
  "province": "Madrid",
  "zipCode": "28001",
  "latitude": 40.424357197174324,
  "longitude": -3.683607584706566,
  "description": "Olisson Club presenta esta elegante vivienda completamente reformada y amueblada, situada en la tercera planta de un...",
  "images": [
    "https://static.fotocasa.es/images/ads/cfaf508f-8284-40be-9b75-79c786481c2b?rule=original",
    "https://static.fotocasa.es/images/ads/d207bd19-4362-4b1a-ae8f-79f4e446ccdb?rule=original",
    "https://static.fotocasa.es/images/ads/1fbe5afa-2a5c-405e-ad27-d4c967ef03c3?rule=original"
  ],
  "hasVideo": false,
  "hasVirtualTour": false,
  "publishedAt": "2025-10-27T11:05:13+00:00",
  "advertiserType": "agency",
  "agencyName": "Olisson",
  "agencyUrl": "https://www.fotocasa.es/es/pro/olisson/",
  "agencyPhone": "+34910708530",
  "searchUrl": "https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l",
  "scrapedAt": "2026-11-09T22:30:21+00:00"
}
```

### How to use it

1. Search on fotocasa.es with the filters you want.
2. Paste the results URL into **Search URLs**. Add as many as you like.
3. Set **Max listings per search**.
4. Run, then download from the Dataset tab or pull results through the API.

### Input example

```json
{
  "startUrls": [
    { "url": "https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l?maxPrice=400000" },
    { "url": "https://www.fotocasa.es/es/alquiler/viviendas/barcelona-capital/todas-las-zonas/l" }
  ],
  "maxItems": 500,
  "onlyNew": false
}
```

### How much does it cost?

Pay per event, with no subscription and no platform usage on top:

| Event | Price |
|---|---|
| Run start | $0.005 |
| Listing returned | $0.00095 per listing ($0.95 per 1,000) |

So 1,000 listings cost $0.955. Listings that fail or are filtered out are never billed. Set a maximum total charge on the run for a hard cap.

### Use it from code

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("PuhmeisterLuka/fotocasa-scraper").call(run_input={
    "startUrls": [{"url": "https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l"}],
    "maxItems": 100,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["price"], item["surfaceM2"], item["district"], item["url"])
```

Works the same from Node, Make, Zapier, n8n, or as an MCP tool for AI agents.

### FAQ

**How many listings can one search return?**
Up to 3,000 (100 pages). For more, split the search on fotocasa.es, by district or price band.

**How does Only new listings work?**
The Actor remembers the listing ids it returned for each search URL, in a key-value store named `fotocasa-scraper-state` in your account. Later runs skip those. Sort the search by newest on fotocasa.es for the fastest monitoring runs. Delete the store to start over.

**Why are `priceDrop` and `previousPrice` empty for most listings?**
Fotocasa only shows them when a listing was reduced.

**Does it need a proxy?**
No. Requests go one at a time, two seconds apart.

**Something broke?**
Open an issue on the Issues tab. Fixes usually ship within a day.

### More scrapers

Job boards in India, the Netherlands, Germany, Switzerland, Denmark, Poland, Singapore and the US, Remote OK, and any company's Ashby, Lever, Greenhouse, SmartRecruiters or ADP board: [all Actors by this developer](https://apify.com/puhmeisterluka).

# Actor input Schema

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

Fotocasa results pages. Set location, price, rooms and other filters on fotocasa.es, then paste the URL. Sale, rent and share searches all work.

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

Stop each search URL after this many listings. Keeps your bill predictable.

## `onlyNew` (type: `boolean`):

Return only listings this Actor has not returned before for the same search. Put it on a schedule to get new listings as they appear.

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

Optional. Runs work without a proxy.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l"
    }
  ],
  "maxItems": 100,
  "onlyNew": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `listings` (type: `string`):

One item per property listing in the default dataset.

## `searches` (type: `string`):

Total results, pages read and listings returned for every search URL.

# 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 = {
    "startUrls": [
        {
            "url": "https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("puhmeisterluka/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 = {
    "startUrls": [{ "url": "https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l" }],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("puhmeisterluka/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 '{
  "startUrls": [
    {
      "url": "https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call puhmeisterluka/fotocasa-scraper --silent --output-dataset

```

## MCP server setup

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