Use this Fotocasa API alternative to export public residential property listings from Fotocasa Spain into structured JSON, CSV, Excel, XML, or RSS. The Fotocasa scraper accepts search-result URLs to collect many homes or individual listing URLs for focused monitoring.
The Actor preserves Fotocasa data such as listing prices, descriptions, locations, coordinates, photos, property characteristics, and public advertiser details in one consistent dataset.
Who is it for?
This Actor is built for property analysts, real estate teams, investors, researchers, and data engineers who need repeatable Fotocasa exports without manual copy-and-paste.
Typical use cases
- Build a market dataset for a Spanish city or neighborhood
- Compare sale and rental prices over time
- Monitor newly published listings with scheduled runs
- Feed public property data into spreadsheets, BI tools, databases, or AI agents
- Research inventory, agencies, and property characteristics
Input example
{
"startUrls": [
{ "url": "https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l" }
],
"maxListings": 100,
"maxPages": 5,
"changedSince": "2026-08-01T00:00:00Z"
}
Output example
{
"id": "190235067",
"url": "https://www.fotocasa.es/es/comprar/vivienda/madrid-capital/example/190235067/d",
"title": "Flat in Madrid",
"description": "Bright home with parking and storage.",
"operation": "sale",
"propertyType": "Flat",
"price": 390000,
"pricePerSquareMeter": 4875,
"area": 80,
"rooms": 2,
"bathrooms": 1,
"floor": "3",
"address": "Madrid, 28022",
"location": "Madrid",
"latitude": 40.4241,
"longitude": -3.6014,
"features": ["Parking", "Lift"],
"images": ["https://static.fotocasa.es/images/ads/example"],
"imageCount": 12,
"agencyName": "Example agency",
"agencyPhone": "+34910000000",
"energyRating": "C",
"publishedAt": "2026-08-06T10:00:00Z",
"sourceUrl": "https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l",
"pageNumber": 1,
"scrapedAt": "2026-08-06T12:00:00Z",
"changeStatus": "new"
}
Fields that Fotocasa does not expose for a particular listing are returned as null; arrays remain arrays.
Input settings
| Field | Type | Description |
|---|---|---|
startUrls |
array | One or more public Fotocasa search-result or individual property URLs. |
maxListings |
integer | Global maximum number of unique listings to export. |
maxPages |
integer | Maximum result pages visited for each search URL. Individual property URLs use one page. |
changedSince |
ISO date/time | Optional timestamp used to label recently published records as new. |
Input recipes
Collect Madrid homes for sale
Use a Fotocasa Madrid sale-results URL with maxListings: 100 and maxPages: 5.
Monitor rental inventory
Use a rental search URL, set changedSince to your prior collection timestamp, and schedule the Actor daily.
Export selected properties
Pass multiple individual listing URLs in startUrls and set maxListings to the number of URLs.
API usage
cURL
curl -X POST "https://api.apify.com/v2/acts/fetch_cat~fotocasa-property-listings-scraper/runs?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"startUrls":[{"url":"https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l"}],"maxListings":20,"maxPages":2}'
JavaScript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/fotocasa-property-listings-scraper').call({
startUrls: [{ url: 'https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l' }],
maxListings: 20,
maxPages: 2,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
Python
import os
from apify_client import ApifyClient
client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('fetch_cat/fotocasa-property-listings-scraper').call(run_input={
'startUrls': [{'url': 'https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l'}],
'maxListings': 20,
'maxPages': 2,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
MCP and AI agents
Connect through Apify MCP, or add it to Claude CLI:
claude mcp add apify --transport http "https://mcp.apify.com?tools=fetch_cat/fotocasa-property-listings-scraper"
Example MCP configuration:
{
"mcpServers": {
"apify": {
"type": "http",
"url": "https://mcp.apify.com?tools=fetch_cat/fotocasa-property-listings-scraper"
}
}
}
Try asking these example prompts through MCP:
- “Run the Fotocasa scraper and export 20 Madrid sale listings from this Fotocasa URL.”
- “Use the Fotocasa API Actor to compare prices and floor area in this Fotocasa dataset.”
- “Scrape Fotocasa listings for rent from this Barcelona search URL and return CSV-ready rows.”
Provide an explicit Fotocasa URL and a conservative result limit.
Tips and limits
- Start with a low
maxListingsvalue while validating a new URL. - Use canonical public Fotocasa search or property URLs.
- Results reflect the public page at run time; removed or unavailable listings cannot be exported.
- Some optional fields differ by listing and may be
null. - Respect Fotocasa's terms, applicable law, and personal-data requirements. Do not use output for unsolicited contact.
Support
Open an issue from the Actor's Apify Console page with the failing public URL, expected result, and run ID. Do not include credentials or private personal data.