# Fotocasa Scraper — Spain Property Listings, Prices & Agencies (`hipersoft/fotocasa-scraper`) Actor

Scrape Fotocasa.es property listings for sale and rent across Spain: price, rooms, size, address, coordinates, photos, features and agency contacts. Paste search links or type a location.

- **URL**: https://apify.com/hipersoft/fotocasa-scraper.md
- **Developed by:** [Hipersoft](https://apify.com/hipersoft) (community)
- **Categories:** Real estate
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.0005 / listing scraped

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 — Spain Property Listings, Prices & Agencies

Fotocasa Scraper collects property listings from **Fotocasa.es**, one of Spain's largest real estate portals. Type a location or paste a search link and get homes, offices, premises, garages and land for sale or rent as clean rows: price, rooms, size, address, coordinates, photos, amenities and agency contacts.

![Fotocasa Scraper input — locations, operation and property type](https://api.apify.com/v2/key-value-stores/SUfvnaFLd9z9eBCtV/records/fotocasa-input.png?v=1)

### What does Fotocasa Scraper do?

It turns Fotocasa search results into structured data you can export as JSON, CSV or Excel. Give it any Spanish location, or copy a search link with your filters already set (price range, rooms and so on), and it goes through the result pages until it reaches your limit. A listing that appears in two searches is only returned and charged once.

### What data can you scrape from Fotocasa?

| Group | Fields |
| --- | --- |
| Listing | `id`, `url`, `title`, `operation`, `propertyType`, `propertySubtype`, `description` |
| Price | `price`, `priceText`, `priceReduction`, `currency` |
| Size and layout | `rooms`, `bathrooms`, `surfaceM2`, `floor`, `amenities` |
| Location | `address`, `neighborhood`, `district`, `city`, `province`, `region`, `zipCode`, `latitude`, `longitude` |
| Media | `imageUrl`, `images`, `imageCount`, `hasVideo`, `hasVirtualTour`, `hasFloorPlans` |
| Status | `isNewConstruction`, `isAuctioned`, `isOccupied`, `publishedAt`, `updatedAt` |
| Agency | `sellerType`, `agencyName`, `agencyUrl`, `agencyPhone` |

### Use cases

- **Market research**: track asking prices and price per square metre by city, district or postcode.
- **Investment analysis**: find price reductions, auctions and occupied properties across Spain.
- **Lead generation**: build lists of active real estate agencies with phone numbers.
- **Price monitoring**: schedule a run and compare results over time to see new listings and price changes.
- **Mapping and dashboards**: every listing with coordinates is ready for a map or BI tool.

### How to scrape Fotocasa

1. Open the **Input** tab.
2. Type one or more locations, such as `madrid-capital`, or paste search links from Fotocasa.
3. Choose **For sale** or **For rent** and the property type.
4. Set **Maximum listings**.
5. Click **Start**, then download your results from the **Output** tab.

### Input

| Field | Type | Description |
| --- | --- | --- |
| `locations` | array | Location names as Fotocasa writes them, e.g. `madrid-capital`, `barcelona-capital`. |
| `operation` | string | `comprar` (for sale) or `alquiler` (for rent). Used with `locations`. |
| `propertyType` | string | `viviendas`, `locales`, `oficinas`, `garajes`, `terrenos`, `edificios` or `trasteros`. Used with `locations`. |
| `startUrls` | array | Fotocasa search links. When set, these replace `locations`. |
| `maxItems` | integer | Most listings to return across all searches. |

Example input:

```json
{
  "locations": ["madrid-capital"],
  "operation": "comprar",
  "propertyType": "viviendas",
  "maxItems": 100
}
```

Tip: to find a location name, search on Fotocasa and copy the part of the link after `/viviendas/`.

### Output

![Fotocasa Scraper output example — a listing with price, location and agency](https://api.apify.com/v2/key-value-stores/SUfvnaFLd9z9eBCtV/records/fotocasa-output.png?v=1)

One row per listing, taken from a real run (description shortened):

```json
{
  "id": 191073179,
  "url": "https://www.fotocasa.es/es/comprar/vivienda/madrid-capital/aire-acondicionado-calefaccion-parking-trastero-ascensor-piscina-no-amueblado/191073179/d",
  "title": "Calle de la Pueblanueva, Ensanche de Vallecas - La Gavia",
  "price": 279000,
  "priceText": "279.000 €",
  "priceReduction": null,
  "currency": "EUR",
  "operation": "sale",
  "propertyType": "Flat",
  "propertySubtype": "Apartment",
  "rooms": 1,
  "bathrooms": 1,
  "surfaceM2": 57,
  "floor": 10,
  "amenities": [
    "air_conditioner",
    "cabinets",
    "heating",
    "parking",
    "storage_room",
    "elevator",
    "porter_service",
    "armored_door",
    "community_pool",
    "not_furnished"
  ],
  "description": "Inmobiliaria VOhome Propiedades La Gavia vende piso en el Ensanche de Vallecas.  La vivienda se encuentra en la última planta del edificio y destaca por su bu...",
  "address": "Calle de la Pueblanueva, Ensanche de Vallecas - La Gavia",
  "neighborhood": "Ensanche de Vallecas - La Gavia",
  "district": "Villa de Vallecas",
  "city": "Madrid",
  "province": "Madrid",
  "region": "Madrid",
  "zipCode": "28051",
  "latitude": 40.37456417348556,
  "longitude": -3.607369961909858,
  "images": [
    "https://static.fotocasa.es/images/ads/634db5af-fa7c-4d5e-ab95-43f5c9cfcfb9?rule=original",
    "https://static.fotocasa.es/images/ads/192eabce-d7bc-4eea-959e-5a6f7e915e32?rule=original"
  ],
  "imageUrl": "https://static.fotocasa.es/images/ads/634db5af-fa7c-4d5e-ab95-43f5c9cfcfb9?rule=original",
  "imageCount": 21,
  "hasVideo": true,
  "hasVirtualTour": true,
  "hasFloorPlans": false,
  "isNewConstruction": false,
  "isAuctioned": false,
  "isOccupied": false,
  "sellerType": "professional",
  "agencyName": "Vohome La Gavia",
  "agencyUrl": "https://www.fotocasa.es/es/pro/vohome-la-gavia/",
  "agencyPhone": "+34910133200",
  "publishedAt": "2026-10-09T19:06:27.793Z",
  "updatedAt": "2026-10-09T19:06:27.793Z",
  "source": "https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l",
  "scrapedAt": "2026-11-05T19:16:56.853Z"
}
```

### Other property scrapers

- [Rightmove Scraper](https://apify.com/hipersoft/rightmove-scraper): UK property listings.
- [Zillow Scraper](https://apify.com/hipersoft/zillow-scraper): US homes and prices.
- [PropertyGuru Scraper](https://apify.com/hipersoft/propertyguru-scraper): Singapore property listings.

### FAQ

**How much does it cost?**
You pay per listing delivered, shown on the **Pricing** tab. Set a maximum cost per run and it stops cleanly at that limit, storing only what you paid for.

**How many listings can I get?**
As many as your search has, up to your limit. In testing, a Madrid search of about 12,600 homes returned 1,000 unique listings in a single run within a couple of minutes. For very large areas, split the search by city or district.

**Why are some fields empty?**
Fotocasa doesn't show every field on every listing. Offices and garages usually have no room count, and some listings hide the exact street.

**Do you return private sellers' contact details?**
No. `agencyName`, `agencyUrl` and `agencyPhone` are filled only for professional agencies.

**Can I connect this to other tools?**
Yes, through [integrations on the Apify platform](https://apify.com/integrations): [Make](https://apify.com/integrations/make), [Zapier](https://apify.com/integrations/zapier), [Slack](https://docs.apify.com/platform/integrations/slack), [Google Drive](https://docs.apify.com/platform/integrations/drive), [Airbyte](https://docs.apify.com/platform/integrations/airbyte) and [GitHub](https://docs.apify.com/platform/integrations/github).

**Is it legal to scrape Fotocasa?**
It returns publicly listed property information. You are responsible for how you use it, including Fotocasa's terms and privacy law such as GDPR.

### Feedback

How did it go? Good or bad, a [review](https://console.apify.com/actors/0speSTdTcXHixt64j/reviews) helps other users decide and tells us what to improve. Something broken or missing? Open an [issue](https://apify.com/hipersoft/fotocasa-scraper/issues) and we'll look at it.

### Notes

Independent tool, not affiliated with Fotocasa. Returns only public data; you are responsible for how you use it.

# Actor input Schema

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

Fotocasa location names, e.g. madrid-capital, barcelona-capital, valencia-capital. Used when no search links are given.

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

Buy or rent. Used with Locations.

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

Used with Locations.

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

Fotocasa search result links, copied from your browser. When set, these replace Locations.

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

Most listings to return across all searches. Each listing is billed.

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

Optional. Leave off unless you need a specific connection.

## Actor input object example

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

# Actor output Schema

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

The results as dataset items.

# 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-capital"
    ],
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/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-capital"],
    "maxItems": 100,
    "proxyConfiguration": { "useApifyProxy": False },
}

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

```

## MCP server setup

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