# Fotocasa Property Scraper (`snappytools/fotocasa-property-scraper`) Actor

Paste one or more Fotocasa search links and get back one row per property listing. Each row has the listing id, its url, the price, rooms, bathrooms, surfaceM2, city, province and map coordinates, so you can sort and filter Spanish homes for sale or rent in a spreadsheet.

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

## Pricing

$1.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.

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 Property Scraper – Spanish property listings export

Paste one or more Fotocasa search links and get back one row per property listing. Each row has the listing `id`, its `url`, the `price`, `rooms`, `bathrooms`, `surfaceM2`, `city`, `province` and map coordinates, so you can sort and filter Spanish homes for sale or rent in a spreadsheet.

You set your filters on fotocasa.es the way you normally would (city, buy or rent, price range, bedrooms), copy the address from your browser, and the scraper reads the public result pages for you.

You can put a run on a schedule and compare the `id` values between runs to spot new listings in an area.

### Why this one

- **Uses your own search links.** Any filters you set on fotocasa.es carry through, so there is no second set of options to learn.
- **Clean, flat rows.** Price, rooms, bathrooms and size come out as plain numbers, ready for Excel or a database.
- **Stable IDs.** Every row carries the Fotocasa listing `id`, so you can join runs and track changes over time.
- **Limits you control.** **Max listings** and **Max pages per search** cap every run, so it never grows past what you asked for.
- **Cheap.** $1.50 per 1,000 results, and runs with no results cost nothing.

### Quick start

```json
{
  "startUrls": [{ "url": "https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l" }],
  "maxItems": 5,
  "maxPages": 1
}
```

This returns up to 5 homes for sale in Madrid from the first result page. In a test run on 13 Nov 2026 it returned 5 listings.

### What you can use it for

| Who | What for |
| --- | --- |
| Property investors | Compare asking prices per square metre across Spanish cities |
| Real estate agents | Watch new listings in the areas you cover |
| Relocation consultants | Build shortlists of rentals for clients moving to Spain |
| Market analysts | Track supply and asking prices over time with scheduled runs |

### How to use it

1. Click **Try for free**.
2. In **Search URLs**, paste one or more Fotocasa search pages, for example `https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l`.
3. Set **Max listings** to the most rows you want across all searches, for example `100` (1 to 1000, default 50).
4. Set **Max pages per search** to how deep to go in each search, for example `3` (1 to 20, default 3).
5. Click **Start**.

Tip: add the run to **Schedules** to collect fresh listings regularly.

### What data you get

Each dataset row is one listing with these fields.

| Field | What it is | Example |
| --- | --- | --- |
| `id` | Fotocasa listing ID | `188954057` |
| `url` | Listing page on fotocasa.es | `https://www.fotocasa.es/ca/comprar/vivenda/madrid-capital/aire-condicionat-ascensor-moblat/188954057/d` |
| `title` | Start of the listing headline | `En VALTIER Real Estate presentamos este magnífico piso en General Pardiñas...` |
| `operation` | Sale or rent | `sale` |
| `propertyType` | Property type code from Fotocasa | `1` |
| `price` | Asking price as a number | `850000` |
| `currency` | Currency of the price | `EUR` |
| `rooms` | Bedrooms | `3` |
| `bathrooms` | Bathrooms | `2` |
| `surfaceM2` | Floor area in square metres | `105` |
| `city` | Town or city, empty when not shown | `null` |
| `province` | Province | `Madrid` |
| `latitude` | Latitude | `40.436730342949396` |
| `longitude` | Longitude | `-3.677858698378124` |
| `publishedAt` | Listing date as given by the site | `2026-02-26T15:38:58.447Z` |
| `scrapedAt` | When the row was collected | `2026-11-13T22:09:11.358Z` |
| `sourceUrl` | The search page the listing came from | `https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l` |

### Pricing

| Event | Price |
| --- | --- |
| Result (one listing saved to the dataset) | $0.0015 |

There is no start fee.

| Run | Cost |
| --- | --- |
| 100 results | $0.15 |
| 1,000 results | $1.50 |
| 10,000 results | $15.00 |

### Good to know

- **Limits.** Up to 1,000 listings per run and up to 20 result pages per search URL.
- **Where the data comes from.** Public Fotocasa search result pages. No login is used.
- **Missing values.** If Fotocasa does not show a field for a listing, it comes back empty. `city` was empty in the test run.
- **Freshness.** Data is as live as the site at run time.
- **Not affiliated.** This tool isn't affiliated with or endorsed by Fotocasa.

### FAQ

**Can I scrape rentals as well as sales?**
Yes. Paste a rental search link from fotocasa.es and the `operation` field tells you which kind each row is.

**Can I use several cities in one run?**
Yes. Add one search link per city in **Search URLs**. **Max listings** applies to the whole run.

### Getting the data out

Download results as Excel, CSV or JSON from the Output tab. Send them to Google Sheets, Slack, Zapier, Make or webhooks from the **Integrations** tab. Every run is also available through the Apify API, and you can run it on a timer from **Schedules**.

### Questions or problems

Open an issue on the **Issues** tab and include the run link. I reply within one business day.

### Related tools

- [Trade Me Property Scraper](https://apify.com/snappytools/trade-me-property-scraper): property listings from Trade Me
- [Otodom Scraper](https://apify.com/snappytools/otodom-scraper): property listings from Otodom
- [Shopify Store Catalog and Contact Scraper](https://apify.com/snappytools/shopify-store-leads-public): product catalogues and contact details from Shopify stores

# Actor input Schema

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

Public Fotocasa search result pages (https://www.fotocasa.es/...). Set your filters on fotocasa.es, then paste the address here.

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

Maximum number of listings saved across all search URLs (1 to 1000).

## `maxPages` (type: `integer`):

Maximum number of result pages read for each search URL (1 to 20).

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l"
    }
  ],
  "maxItems": 20,
  "maxPages": 1
}
```

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

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

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

```

## MCP server setup

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