# Fotocasa Listings Scraper · Radius search · $1/1K (`mlg14/fotocasa-scraper`) Actor

Search Spanish property listings on Fotocasa for real estate research, investment and rent monitoring: prices, area, rooms, location, description, photos and agency details, by place or coordinate radius. $1/1K listings.

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

## Pricing

$1.00 / 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 Listings Scraper

Scrape Fotocasa property listings for sale, rent, sharing, transfers, and rent with an option to buy across Spain. Export Fotocasa data to CSV, JSON, or Excel with a location or coordinate radius, making this actor a practical Fotocasa API alternative for public listing research.

The actor collects one record per property. It includes the asking price, floor area, room counts, public location, description, publication time, photos, videos, and professional advertiser details when those fields are available. Searches use the same public listing data as the site's search experience. A maximum result setting lets a short sample and a larger market survey use the same input format.

### What data can you extract from Fotocasa?

Each dataset item is a flat property record. Empty values mean the listing did not disclose that field or the search response did not provide it. Amounts use euros, and floor area uses square meters. A coordinate may represent an approximate displayed point rather than an exact entrance.

| Field | Description | Example |
| --- | --- | --- |
| `propertyId` | Stable public listing identifier | `190399711` |
| `listingUrl` | Direct property page | `https://www.fotocasa.es/es/comprar/vivienda/.../190399711/d` |
| `operation` | Transaction label | `SALE` |
| `price` | Asking price in euros | `489000` |
| `priceDrop` | Reported reduction, when present | `42000` |
| `pricePerSquareMeter` | Price divided by listed area | `11372.09` |
| `surface` | Floor area in square meters | `43` |
| `rooms` | Number of rooms | `1` |
| `baths` | Number of bathrooms | `1` |
| `floor` | Floor code from the listing | `6` |
| `street` | Published street text | `Calle de Don Ramón de la Cruz` |
| `number` | Published street number | `12` |
| `zipCode` | Postal code | `28001` |
| `municipality` | City or municipality | `Madrid` |
| `district` | District | `Barrio de Salamanca` |
| `neighborhood` | Neighborhood | `Lista` |
| `province` | Province | `Madrid` |
| `latitude` | Published latitude | `40.428577` |
| `longitude` | Published longitude | `-3.6781402` |
| `description` | Property description | `Apartamento de 43 m²...` |
| `publicationDate` | Listing publication timestamp | `2026-08-04T11:35:30.630` |
| `updatedAt` | Listing update timestamp | `2026-08-14T14:05:17.550` |
| `propertyTypeId` | Site property category code | `2` |
| `propertySubtypeId` | Site subtype code | `1` |
| `rentalType` | Rental duration code if supplied | `LONG_TERM` |
| `agencyName` | Public advertiser display name | `Example Property Office` |
| `agencyType` | Professional or private classification | `professional` |
| `agencyPhone` | Published professional phone | `+34911000000` |
| `agencyUrl` | Public advertiser page | `https://www.fotocasa.es/es/pro/example/` |
| `imageUrls` | Array of photo URLs | `[]` or image links |
| `videoUrls` | Array of video URLs | `[]` or video links |
| `photoCount` | Site reported photo count | `21` |
| `amenityIds` | Site feature identifiers | `["2", "13"]` |
| `hasVirtualTour` | Online guided tour flag | `false` |

The feature identifiers are preserved as site codes because a label can vary with language or product category. The complete description and all public media URLs remain in the JSON item even when the table preview shows shortened values. `agencyPhone` is populated only for professional advertisers; a private seller's number is not included in this field.

### How to scrape Fotocasa

1. Enter a place such as `Madrid` in `location`. For ambiguous place names, choose `locationType`, such as `municipality` or `province`. Alternatively, enter both `latitude` and `longitude` and set `distanceKm` for a radius search.
2. Choose the transaction in `operation` and the category in `propertyType`. Set optional price, size, publication, rental duration, and sort controls to describe the market you want to study.
3. Set `maxItems` to the number of unique properties you need. Start with 30 to 100 for a sample, then increase the limit after checking the returned fields and geography.
4. Run the actor. Open its dataset to inspect the result table and download CSV, JSON, or Excel. Each item includes a direct listing URL for spot checks.

A place search first resolves the public location suggestion. The chosen location identifier is then sent to the listing search. A coordinate search sends an encoded circular area and verifies each returned coordinate against your requested distance. Both routes use the same output fields, so their datasets can be combined after deduplication by `propertyId`.

### Input

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `location` | string | `Madrid` prefill | Place name; optional when both coordinates are present. |
| `locationType` | string | automatic | Limit the place suggestion to a level such as municipality, district, province, or neighborhood. |
| `latitude` | number | none | Radius center latitude; supply longitude too. |
| `longitude` | number | none | Radius center longitude; supply latitude too. |
| `distanceKm` | integer | `20` | Radius in kilometers, from 1 to 100. |
| `operation` | string | `buy` | `buy`, `rent`, `share`, `rentBuyOption`, or `transfer`. |
| `propertyType` | string | `home` | `home`, `newHome`, `premises`, `garages`, `office`, `boxRoom`, `land`, or `building`. |
| `rentalTypes` | array | `[]` | Choose `longTerm` or `temporary` for a rental search. Empty or both means all durations. |
| `minPrice` | integer | `0` | Minimum asking price in euros; zero removes the bound. |
| `maxPrice` | integer | `0` | Maximum asking price in euros; zero removes the bound. |
| `minSize` | integer | `0` | Minimum floor area in square meters; zero removes the bound. |
| `maxSize` | integer | `0` | Maximum floor area in square meters; zero removes the bound. |
| `publicationDate` | string | any time | `last48h`, `lastWeek`, or `lastMonth`. |
| `sortBy` | string | `rating` | Relevance, newest, cheapest, most expensive, largest, smallest, or cheapest per square meter. |
| `maxItems` | integer | `100` | Stop after this many unique records; zero requests all accessible results. |
| `proxyConfiguration` | object | platform proxy | Change network settings if your workspace requires it. |

A focused sale search:

```json
{
  "location": "Madrid",
  "locationType": "municipality",
  "operation": "buy",
  "propertyType": "home",
  "minPrice": 200000,
  "maxPrice": 400000,
  "minSize": 50,
  "sortBy": "latest",
  "maxItems": 100
}
```

A coordinate search can target an area that does not fit one named district:

```json
{
  "latitude": 40.4168,
  "longitude": -3.7038,
  "distanceKm": 10,
  "operation": "rent",
  "propertyType": "home",
  "maxPrice": 2500,
  "maxItems": 150
}
```

Coordinates override `location` when both are present. A radius describes straight line distance, not travel time or a road route. A listing whose published point lies outside the radius is excluded. If a property has no published coordinates, it cannot pass a radius search.

### Output example

This shortened record comes from the verified 60 property run. The dataset carries the full description and media arrays.

```json
{
  "propertyId": "190948847",
  "listingUrl": "https://www.fotocasa.es/es/comprar/vivienda/madrid-capital/aire-acondicionado-calefaccion-ascensor-amueblado-internet/190948847/d",
  "operation": "SALE",
  "price": 229000,
  "priceDrop": null,
  "pricePerSquareMeter": 3881.36,
  "surface": 59,
  "rooms": 2,
  "baths": 1,
  "floor": "10",
  "street": "Calle de López Grass",
  "number": "26",
  "zipCode": "28038",
  "municipality": "Madrid",
  "district": "Puente de Vallecas",
  "neighborhood": "Numancia",
  "latitude": 40.3969171,
  "longitude": -3.659901699999999,
  "description": "Piso en venta en Nueva Numancia – Calle López Grass 26. ...",
  "publicationDate": "2026-09-26T18:40:36.677",
  "agencyType": "particular",
  "agencyPhone": null,
  "photoCount": 10,
  "hasVirtualTour": false
}
```

The asking price is a listing value, not a completed transaction. The `pricePerSquareMeter` field is calculated from the same listing's price and surface and is empty if either source value is absent. A price drop is reported only when the site supplies one. Use `propertyId` to join repeated exports or compare changes between scheduled runs.

### Use cases

- **Market analysts:** compare asking price per square meter between municipalities or districts using a repeatable category and size range. Save the input beside the dataset so later exports use the same scope.
- **Buyers and tenant representatives:** watch newly published homes under a specific budget. Sort by newest, then review direct listing URLs before acting on a result.
- **Property managers:** compare rental asking prices, floor areas, room counts, and the share of temporary rentals across neighborhoods. Keep sale and rent results in separate groups when calculating statistics.
- **Investors:** build a shortlist using area, room count, advertised price, and proximity to a point. Verify the actual property location and condition on the source listing before making a decision.
- **Agency research teams:** track public competitors' advertised inventory and detect price changes across dated exports. Professional advertiser fields help aggregate listings by office.
- **Local publishers:** create a public market snapshot or chart based on current advertisements, with links back to the source pages and a clear note that these are asking prices.

### How much does it cost to scrape Fotocasa?

The configured result charge is **$1 per 1,000 delivered properties**, or $0.001 for one dataset item. Platform usage is included in this event price. You pay for records delivered, so `maxItems` gives a straightforward budget bound. The final price displayed in the run form is authoritative if the listing's pricing changes.

At that rate, a 100 item sample costs $0.10, 1,000 delivered listings cost $1.00, and 5,000 delivered listings cost $5.00. For example, a search with `maxItems: 1000` that finds only 730 matching listings produces 730 items and a $0.73 result charge. A broader search capped at 5,000 items cannot charge more than $5.00 in result events under this stated rate. If your input has a rare filter, it may return fewer records than the cap.

A coordinate search may examine pages containing listings outside the circle and discard those records. Discarded listings are not dataset items. Very small radii can take longer to reach a requested item count because fewer candidates pass the exact distance check.

### Tips for best results

Start with one municipality and a moderate `maxItems` setting. Check whether the returned `municipality`, `district`, and `price` columns match your question. A province search can cover a much wider area and require more pages. If a name points to multiple places, set `locationType` and use a more specific location string; a municipality and a province can share the same name.

Use price and floor area bounds to focus a search before increasing the result cap. For a large export, split an area into nonoverlapping price bands or geographic districts and deduplicate by `propertyId` afterward. This can also improve coverage when the search service limits deep pagination. The newest sort is suitable for monitoring newly advertised properties; relevance is suitable for a broad inventory sample.

For rentals, specify one rental duration when you need only long term or temporary listings. The duration filter has no effect outside `rent`. Publication date filtering narrows the active search window; it should not be treated as a guarantee that an advertisement has never appeared before. The site's ordering and promoted inventory can change between runs, so two exports taken at different times may have different page boundaries.

Keep `maxItems` low when testing a new input. Once the sample looks correct, raise it for the production run. Schedule regular runs with the same filters to compare asking prices, additions, and removals. A missing property in a later export can mean it was sold, withdrawn, hidden by ranking, or moved beyond the fetched page range; the dataset alone cannot determine which explanation applies.

### Limits

Only public search results are collected. Listing availability, advertised prices, descriptions, and ranking can change at any time. The source may hide an address number, publish an approximate map point, omit an energy rating, or provide no professional agency details. This actor does not obtain private contact data or information behind an account.

The search service normally returns up to 30 records per page. The actor requests successive pages, removes duplicate property IDs, and stops when it reaches the requested item count, an empty page, the reported total, or its 1,000 page safeguard. If the service imposes a lower deep page limit for a particular search, the actor stops at that boundary. Split a very broad search by price or place for deeper coverage.

A circle is approximated as a many sided polygon for the remote search and checked again using the listing's published point. The remote result total can be an estimate for the enclosing area. Exact radius output is enforced locally, but listings without coordinates are excluded from radius results. For named locations, the result follows the site's own location hierarchy and may include nearby promoted inventory only if the search response places it in the main result list.

Photo and video URLs come from listing metadata; a media link can later expire or change. `photoCount` is the site's count and may differ from the number of URLs present in a particular response. Numeric category and amenity identifiers are preserved without inventing labels. The `agencyPhone` field is available only for professional advertisers and may be empty even when an office page has other contact options.

### FAQ

#### Is it legal to collect these listings?

The actor uses public search data. You remain responsible for your intended use, the site's terms, applicable copyright rules, and privacy law including GDPR. Avoid misuse of personal data and review local requirements before redistributing records. This information is general and is not legal advice.

#### Do I need to configure proxies?

The default setting uses the platform proxy. In the observed search flow, the JSON search routes worked from datacenter addresses. Network controls can change, so a run may still fail temporarily. Changing the proxy setting is optional for normal use.

#### How fast is a run?

A search returns up to roughly 30 property records per page. A small sample often needs only a few listing requests, while a broad export needs more pages. Radius filtering can require extra pages because properties beyond the requested distance are discarded. Network response times, source throttling, and the selected result cap determine the full duration.

#### Can I schedule searches and monitor changes?

Yes. Save an input and run it on a schedule. Compare exports by `propertyId` and store the run date to identify newly seen listings and changes in advertised price. A removed record is not proof of a sale, because page ranking and listing visibility can change.

#### Can I export to a spreadsheet?

Yes. Download the dataset as CSV or Excel, or send JSON through a workflow. Arrays such as `imageUrls` and `amenityIds` are easiest to inspect in JSON. For spreadsheet analysis, use numeric `price`, `surface`, and `pricePerSquareMeter` columns directly.

#### Why is a field empty?

The listing may not publish that detail, or the public search response may leave it out. Street numbers, private advertiser details, price reductions, rental duration, and some location levels are often absent. Empty values are retained as empty rather than estimated.

#### Does a radius mean travel distance?

No. `distanceKm` is straight line distance between the chosen center and the listing's published coordinate. Road and transit times can be much longer. If a listing uses an approximate map point, its true physical location may differ from the displayed point.

### Use with AI agents (MCP)

Add this actor to any MCP client (Claude, Cursor, VS Code, n8n...) with one URL:

`https://mcp.apify.com?tools=mlg14/fotocasa-scraper`

An agent receives one record per Fotocasa property: price, floor area, rooms, municipality, description, publication date, photos and professional advertiser details. Keep `maxItems` at 20-50 so a run finishes in under 3 minutes.

**Prompt 1:** "Find 20 flats for sale in Madrid on Fotocasa, newest first."

```json
{
  "location": "Madrid",
  "operation": "buy",
  "propertyType": "home",
  "sortBy": "latest",
  "maxItems": 20
}
```

**Prompt 2:** "Get 30 long-term rentals in Barcelona under 1500 euros per month."

```json
{
  "location": "Barcelona",
  "operation": "rent",
  "rentalTypes": [
    "longTerm"
  ],
  "maxPrice": 1500,
  "maxItems": 30
}
```

**Prompt 3:** "Show 25 properties within 5 km of central Valencia, published last week."

```json
{
  "latitude": 39.4699,
  "longitude": -0.3763,
  "distanceKm": 5,
  "publicationDate": "lastWeek",
  "maxItems": 25
}
```

### Integrations

Use the dataset through the platform API, webhooks, Zapier, Make, n8n, or a spreadsheet connector. A scheduled run can send fresh records to a database or dashboard, while a webhook can notify a downstream process when the dataset is ready. Keep `propertyId` as the join key and save the input with each export to retain the search context. For ongoing monitoring, compare records from separate runs instead of assuming a single run contains a complete history.

### Support

Open an issue on the Issues tab; we reply within 24h and add fields on request.

# Actor input Schema

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

Stop after this many unique properties. Example: 50 for a quick test. Set 0 to collect everything the search exposes; keep it small for first runs.

## `location` (type: `string`):

City, province, district or other public place name in Spain. Example: Madrid or Barcelona. Use for place searches; coordinates take precedence when set.

## `locationType` (type: `string`):

Place level when a name is ambiguous. Allowed values: country, autonomous_community, province, area, region, municipality, locality, district, neighborhood, urbanization, coast, geographical_area, street, zip_code, or empty. Example: municipality. Leave empty for the closest match.

## `latitude` (type: `number`):

Center latitude for a radius search, e.g. 40.4168. Use together with longitude and distanceKm; overrides location. Leave empty for place searches.

## `longitude` (type: `number`):

Center longitude for a radius search, e.g. -3.7038. Use together with latitude and distanceKm. Leave empty for place searches.

## `distanceKm` (type: `integer`):

Maximum distance in km from the coordinate center. Example: 5 for a small radius. Used only with latitude and longitude; leave at 20 otherwise.

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

Listing transaction. Allowed values: buy, rent, share, rentBuyOption, transfer. Example: rent. Use buy for sales, share for room shares.

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

Real estate category. Allowed values: home, newHome, premises, garages, office, boxRoom, land, building. Example: newHome. Use home for normal flats and houses.

## `rentalTypes` (type: `array`):

For rental searches, rental duration. Allowed values: longTerm, temporary. Example: \["longTerm"] for long-term rentals. Leave empty to include all durations.

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

Minimum listing price in euros. Example: 200000. Set 0 for no minimum; use with maxPrice for a budget range.

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

Maximum listing price in euros. Example: 400000. Set 0 for no maximum; use with minPrice for a budget range.

## `minSize` (type: `integer`):

Minimum floor area in square meters. Example: 60. Set 0 for no minimum; use to skip very small properties.

## `maxSize` (type: `integer`):

Maximum floor area in square meters. Example: 150. Set 0 for no maximum; use to skip very large properties.

## `publicationDate` (type: `string`):

Only listings published within this period. Allowed values: last48h, lastWeek, lastMonth, or empty for any time. Example: lastWeek. Use last48h for monitoring runs.

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

Result order. Allowed values: rating, latest, cheapest, mostExpensive, biggest, smallest, cheapestPerM2. Example: latest. Use latest for fresh listings, cheapest for bargains.

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

Proxy settings for requests to the site. Keep the default (e.g. useApifyProxy true) Apify datacenter proxy; the actor escalates automatically if access is blocked.

## Actor input object example

```json
{
  "maxItems": 50,
  "location": "Madrid",
  "locationType": "",
  "distanceKm": 20,
  "operation": "buy",
  "propertyType": "home",
  "rentalTypes": [],
  "minPrice": 0,
  "maxPrice": 0,
  "minSize": 0,
  "maxSize": 0,
  "publicationDate": "",
  "sortBy": "rating",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `properties` (type: `string`):

All collected property records in the default dataset.

# 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 = {
    "maxItems": 50,
    "location": "Madrid"
};

// Run the Actor and wait for it to finish
const run = await client.actor("mlg14/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 = {
    "maxItems": 50,
    "location": "Madrid",
}

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

```

## MCP server setup

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