# Fotocasa.es Real Estate Scraper (`nogards95/fotocasa-es-scraper`) Actor

Scrape property listings from Fotocasa.es — flats, houses, new builds, offices, garages and land, for sale or for rent across Spain. Structured attributes, agent details, location and photos.

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

## Pricing

from $0.60 / 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.es Real Estate Scraper

Property listings from Fotocasa.es — flats, houses, new builds, offices, garages
and land, for sale or for rent across Spain, with structured attributes,
location, agent details and photos.

### Who is this for

Real estate agencies tracking market inventory and pricing, investors running
price-per-m² analysis across Spanish cities, PropTech products that need a
listings feed, and market researchers building housing datasets.

### What you get

- Structured attributes on every listing — price, size (m²), rooms, bathrooms,
  and amenity flags (parking, elevator, air conditioning, terrace, pool, …).
- Agent details: agency name, agent id, agent profile URL, and the contact
  phone when the seller published it.
- Full location down to neighborhood, plus map coordinates, the listing
  description and every photo. (Fotocasa does not publish exact street
  addresses.)

### Sample output

```json
{
  "id": "188518955",
  "adUuid": "601ef743-8656-4b1a-a543-cc91e9f99b1a",
  "url": "https://www.fotocasa.es/es/comprar/vivienda/linares/aire-acondicionado-parking-amueblado/188518955/d",
  "transactionType": "sale",
  "propertyType": "Flat",
  "propertySubtype": "Flat",
  "publishedAt": "2026-01-12",
  "firstPublishedAt": "2026-01-12",
  "ageDays": 241,
  "price": 95000,
  "priceRaw": "95.000 €",
  "priceReduced": 20000,
  "currency": "EUR",
  "sizeSqm": 95,
  "rooms": 4,
  "bathrooms": 2,
  "floorCode": 8,
  "hasParking": true,
  "hasElevator": false,
  "hasAirConditioning": true,
  "hasTerrace": false,
  "hasBalcony": false,
  "hasGarden": false,
  "hasPool": false,
  "hasStorageRoom": false,
  "furnished": true,
  "featureCodes": { "antiquity": 6, "floorCode": 8 },
  "isNewConstruction": false,
  "isAuction": false,
  "isBareOwnership": false,
  "isOccupied": false,
  "isRentedWithTenants": false,
  "isPromoted": true,
  "sellerType": "agency",
  "sellerName": "Gestión Inmobiliaria Ave Fenix",
  "sellerId": "9202767611596",
  "sellerUrl": "https://www.fotocasa.es/es/pro/gestion-inmobiliaria-ave-fenix/",
  "phone": "+34645824208",
  "province": "Jaén",
  "municipality": "Linares",
  "city": "Linares",
  "district": "Zona Hospital",
  "neighborhood": null,
  "zipCode": "23700",
  "region": "Andalucía",
  "latitude": 38.09018132,
  "longitude": -3.63980775,
  "coordinatesApproximate": true,
  "promotionTitle": null,
  "description": "Piso en venta ubicado en la tercera planta de un edificio sin ascensor…",
  "images": [
    "https://static.fotocasa.es/images/ads/66b32c8c-0292-4b27-9ba2-b6f428ae8c13?rule=original"
  ]
}
```

`featuresRaw` (the full untouched feature array) is also included on every item.

### Input

| Field | Description |
|---|---|
| `transaction` | `comprar` (for sale) or `alquiler` (for rent). Default `comprar`. |
| `propertyType` | `viviendas` (homes), `casas`, `pisos`, `obra-nueva` (new build), `garajes`, `locales`, `oficinas`, `terrenos`. Default `viviendas`. |
| `location` | Pick a Spanish province or its capital city from the dropdown (all 50 provinces covered). Default `madrid-capital`. |
| `maxItems` | Stop after this many listings. Default 40, 0 = unlimited. |
| `maxPages` | Result pages to scrape, ~30 listings each. Default 1, max 100. |

### Example runs

- Flats for sale in Valencia city:
  `{ "transaction": "comprar", "propertyType": "pisos", "location": "valencia-capital", "maxPages": 10 }`
- Rental market across Málaga province:
  `{ "transaction": "alquiler", "propertyType": "viviendas", "location": "malaga-provincia", "maxItems": 0, "maxPages": 20 }`

### Technical notes

- HTTP-only. No browser, low compute cost, fast starts.
- Listings that Fotocasa repeats across pages are deduplicated, so you are
  never charged twice for the same ad.
- Every attribute is optional on Fotocasa's side; missing values come back as
  `null`, never as `0`.
- `floorCode` is Fotocasa's internal floor identifier, not a storey number. A
  handful of other attributes (antiquity, orientation, heating, conservation)
  come back as `featureCodes` — Fotocasa's numeric ids for those values.
- Runs through Apify residential proxy by default — no setup needed, it works
  out of the box.

````



# Actor input Schema

## `transaction` (type: `string`):

Buy or rent listings.
## `propertyType` (type: `string`):

Which kind of property to scrape.
## `location` (type: `string`):

Spanish province or its capital city. Picking from this list guarantees a URL Fotocasa actually serves — not every property type exists in every location (e.g. Houses may be empty in a small province), but the location itself is always valid.
## `maxItems` (type: `integer`):

Stop after this many listings have been saved. 0 = unlimited.
## `maxPages` (type: `integer`):

How many result pages to scrape, ~30 listings each. Keep the default small — Apify runs a daily automated test with the default input and it must finish within 5 minutes.

## Actor input object example

```json
{
  "transaction": "comprar",
  "propertyType": "viviendas",
  "location": "madrid-capital",
  "maxItems": 40,
  "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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("nogards95/fotocasa-es-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("nogards95/fotocasa-es-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 '{}' |
apify call nogards95/fotocasa-es-scraper --silent --output-dataset

```

## MCP server setup

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