{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"be4c848e-0616-42b3-8167-f508d0414956","name":"Fotocasa API","description":"The Fotocasa API returns property listings from Fotocasa, one of Spain's main property portals, as JSON: homes, garages, land, premises, offices and buildings for sale and for rent across Spain, the Balearic Islands and Andorra, with price and price drops, surface, rooms, bathrooms, floor, rental type, location down to the district and neighbourhood, photos, energy certificate and the advertiser type, plus listing counts for every district of a search. This collection holds every endpoint of the Fotocasa API on RapidAPI, ready to send from Postman.\n\nBuilt and maintained by [Happy Endpoint](https://happyendpoint.com/library/fotocasa-api?utm_source=postman&utm_medium=collection&utm_campaign=fotocasa-api).\n\n## Get started\n\n1. Subscribe to the [Fotocasa API on RapidAPI](https://rapidapi.com/happyendpoint/api/fotocasa3) and copy your key. Current plans are listed there.\n2. Fork this collection into your own workspace. Open the collection's **Variables** tab and paste your key into the **Current value** of `rapidapi_key`. Leave the Initial value empty: current values stay on your machine and are never shared.\n3. Send **Fotocasa > Location suggestions (combinedLocations)** with a place such as `madrid`. Searches take the nine-part location string it returns (Madrid city is `724,14,28,173,0,28079,0,0,0`) and its latitude and longitude, not a place name.\n4. Send **Fotocasa > Search listings for sale or rent** with that string, `transactionType=RENT` or `BUY`, `propertyType=HOMES` and filters such as `minRooms`, then open one row's `propertyId` with **Property details**.\n\nRequests with a saved **Example response** show real response data before you subscribe.\n\n## What you can do\n\n- **Find locations:** place suggestions for typed text, each with the location string and centre point a search needs.\n- **Search listings** for sale or rent by location, property type and subtype, price, surface, rooms, bathrooms, condition, new construction and listing age, in six sort orders, page by page.\n- **Map a city in one call:** every search returns `locationFacets`, the listing count of each district under your filters, with the location string to search that district.\n- **Get the full listing:** features, extras, every photo, descriptions per language, energy certificate and coordinates.\n\nAll 4 requests are `GET`. Every response is wrapped in `{\"success\": true, \"data\": ...}`.\n\n## Things to know about the data\n\nFrom live responses on 20 October and 4 November 2026, mostly Madrid rentals:\n\n- **District counts add up to the total.** A Madrid rental search with `minRooms=2` on 4 November had `totalItems: 4017`, and its 21 district facets summed to exactly 4,017, from 1,106 in Centro down to 10 in Villa de Vallecas.\n- **Facets follow your filters.** Arganzuela showed 400 rentals unfiltered and 231 with `minRooms=2` on 20 October (220 on 4 November). Compare districts only between searches with the same filters.\n- **Search rows and property details have different shapes.** A row has `transaction.price`, `surface`, `rooms` and `baths` as plain fields; **Property details** returns `transactions[0].value` as a list (`[990]`) and `features` as a list of one-key objects (`[{\"rooms\": 3}, {\"surface\": 78}]`).\n- **Codes are numeric strings.** You search with `RENT`, but rows carry `transactionType: \"3\"`, and `id` is `\"3_191295679\"` (type and `propertyId`). **Property details** takes the bare `propertyId` plus `BUY` or `RENT`.\n- **`rentalType` is often empty.** Of the 30 newest Madrid rentals, 21 had `rentalType: null`, 8 `LONG_TERM` and 1 `TEMPORARY`. Keep `TEMPORARY` rows (short and room lets) out of long-term rent comparisons.\n- **Cheapest-first brings out the odd ads.** Price-ascending Madrid rentals started with a 12 m2 room at 360 EUR. Set a floor before you take a median.\n- **Rows carry advertiser phone numbers.** `agency.type` is `professional` or `particular` (a private person), and every one of the 30 rows had a `phone` field. The saved examples here have contact fields removed; do the same before you publish data.\n\n## Worked example\n\n[Fotocasa API and Scraper: Spain Property Listings, Rents and District Counts as JSON](https://www.linkedin.com/pulse/fotocasa-api-scraper-spain-property-listings-rents-district-u3h0f): a walk-through of the Fotocasa data on LinkedIn, with the location string, a Madrid search and the district counts explained.\n\nRunnable Python and JavaScript examples, including a search exported to CSV: [github.com/happyendpointhq/fotocasa-api](https://github.com/happyendpointhq/fotocasa-api).\n\n## Use it from Claude, Cursor or any MCP client\n\nRapidAPI exposes every endpoint of this API as an MCP tool. Point your MCP client at `https://mcp.rapidapi.com` with the headers `x-api-host: fotocasa3.p.rapidapi.com` and `x-api-key: <your RapidAPI key>`.\n\n## Links\n\n- Product page and FAQ: [happyendpoint.com/library/fotocasa-api](https://happyendpoint.com/library/fotocasa-api?utm_source=postman&utm_medium=collection&utm_campaign=fotocasa-api)\n- Subscribe and plans: [rapidapi.com/happyendpoint/api/fotocasa3](https://rapidapi.com/happyendpoint/api/fotocasa3)\n- Code examples and sample responses: [github.com/happyendpointhq/fotocasa-api](https://github.com/happyendpointhq/fotocasa-api)\n- More property data by country, including Spain's Idealista, the UK and the UAE: [happyendpoint.com/real-estate-data](https://happyendpoint.com/real-estate-data?utm_source=postman&utm_medium=collection&utm_campaign=fotocasa-api)\n\n## More from Happy Endpoint on Postman\n\nEvery public Happy Endpoint collection, for real estate, ecommerce and other platforms: [postman.com/happyendpoints-team](https://www.postman.com/happyendpoints-team).\n\n## Contact\n\nQuestions about the API, custom data or bulk datasets: email [hello@happyendpoint.com](mailto:hello@happyendpoint.com).\n\n## Disclaimer\n\nHappy Endpoint is an independent provider. This collection is not affiliated with, endorsed by, sponsored by or connected to Fotocasa. Fotocasa is a trademark of its owner, referenced only to describe the data.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":true,"owner":"56555678","team":43080622,"collectionId":"be4c848e-0616-42b3-8167-f508d0414956","publishedId":"2sBYHYuxap","public":true,"publicUrl":"https://documenter-api.postman.tech/view/56555678/2sBYHYuxap","privateUrl":"https://go.postman.co/documentation/56555678-be4c848e-0616-42b3-8167-f508d0414956","customColor":{"highlight":"1D4ED8","right-sidebar":"303030","top-bar":"FFFFFF"},"documentationLayout":"classic-double-column","customisation":{"appearance":{"themes":[{"name":"light","logo":null,"colors":{"highlight":"1D4ED8","right-sidebar":"303030","top-bar":"FFFFFF"}},{"name":"dark","logo":null,"colors":{"highlight":"60A5FA","right-sidebar":"303030","top-bar":"212121"}}],"default":"light"},"metaTags":[{"name":"title","value":"Fotocasa API: Spain Property Listings for Sale and Rent"},{"name":"description","value":"Fotocasa API Postman collection: Spanish homes for sale and rent, prices, photos, features and listing counts by district in Madrid and Barcelona."}]},"version":"8.12.12","publishDate":"2026-11-09T12:47:17.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"Fotocasa API: Spain Property Listings for Sale and Rent","description":"Fotocasa API Postman collection: Spanish homes for sale and rent, prices, photos, features and listing counts by district in Madrid and Barcelona."},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://postman-image-service.postman.com/api/cloudinary-proxy/postman/image/upload/t_team_logo_pubdoc/v1/team/0d967c87095e757db82929b270ca9e6f39361a13321214cb4c21a32a767ccc2e","favicon":"https://postman-image-service.postman.com/api/cloudinary-proxy/postman/image/upload/v1793253795/team/fea4634cfb38c1c4b615f71bbf3e1a80"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2sBYHYuxap"}