{
  "data": {
    "id": "5VP42leRffobQEC1N",
    "actId": "o33Jzuf8dGQeft46K",
    "userId": "NL4ThgItAwaoBlffQ",
    "startedAt": "2026-11-04T00:01:46.078Z",
    "finishedAt": "2026-11-04T00:02:01.087Z",
    "status": "SUCCEEDED",
    "meta": {
      "origin": "CLI"
    },
    "stats": {
      "durationMillis": 14881,
      "runTimeSecs": 14.881,
      "computeUnits": 0.016534444444444445,
      "imageSizeBytes": 319160320
    },
    "options": {
      "useCache": true,
      "betaPackages": false,
      "memoryMbytes": 4096,
      "diskMbytes": 8192
    },
    "createdByOrganizationMemberUserId": "zifX0mkAFMHe8CatY",
    "exitCode": 0,
    "inputSchema": "{\n  \"title\": \"Fotocasa Spain Sale & Rental Listings Scraper\",\n  \"description\": \"Search Fotocasa by location or paste search/property URLs. Get full listing records with price, surface, rooms, location, agency, media, new-construction projects and optional detail enrichment.\",\n  \"type\": \"object\",\n  \"schemaVersion\": 1,\n  \"properties\": {\n    \"mode\": {\n      \"title\": \"Mode\",\n      \"type\": \"string\",\n      \"description\": \"How to find listings: search by location, scrape Fotocasa search URLs, or scrape individual property URLs/IDs.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"search\",\n        \"startUrls\",\n        \"propertyUrls\"\n      ],\n      \"enumTitles\": [\n        \"Search by location\",\n        \"Search URLs\",\n        \"Property URLs / IDs\"\n      ],\n      \"default\": \"search\",\n      \"prefill\": \"search\",\n      \"sectionCaption\": \"Mode\"\n    },\n    \"location\": {\n      \"title\": \"Location\",\n      \"type\": \"string\",\n      \"description\": \"City, province, district, neighborhood, street or ZIP code, e.g. Madrid, Barcelona, Sitges, 28001. Used in Search by location mode.\",\n      \"editor\": \"textfield\",\n      \"default\": \"\",\n      \"prefill\": \"madrid\"\n    },\n    \"locationType\": {\n      \"title\": \"Location type\",\n      \"type\": \"string\",\n      \"description\": \"Narrow ambiguous place names to a level. Auto picks the best match (usually the municipality).\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"auto\",\n        \"country\",\n        \"autonomousCommunity\",\n        \"province\",\n        \"municipality\",\n        \"district\",\n        \"neighborhood\",\n        \"locality\",\n        \"street\",\n        \"zipCode\"\n      ],\n      \"enumTitles\": [\n        \"Auto\",\n        \"Country\",\n        \"Autonomous community\",\n        \"Province\",\n        \"Municipality\",\n        \"District\",\n        \"Neighborhood\",\n        \"Locality\",\n        \"Street\",\n        \"ZIP code\"\n      ],\n      \"default\": \"auto\",\n      \"prefill\": \"auto\"\n    },\n    \"operation\": {\n      \"title\": \"Operation\",\n      \"type\": \"string\",\n      \"description\": \"Sale, rent, room share, rent-to-buy or business transfer.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"sale\",\n        \"rent\",\n        \"share\",\n        \"rentToBuy\",\n        \"transfer\"\n      ],\n      \"enumTitles\": [\n        \"For sale\",\n        \"For rent\",\n        \"Shared rent\",\n        \"Rent to buy\",\n        \"Business transfer\"\n      ],\n      \"default\": \"sale\",\n      \"prefill\": \"sale\",\n      \"sectionCaption\": \"Search filters\"\n    },\n    \"propertyType\": {\n      \"title\": \"Property type\",\n      \"type\": \"string\",\n      \"description\": \"Property category. Subtypes such as penthouses, studios and duplex are preserved instead of being collapsed into homes.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"all\",\n        \"homes\",\n        \"flats\",\n        \"penthouses\",\n        \"studios\",\n        \"duplex\",\n        \"lofts\",\n        \"chalets\",\n        \"garages\",\n        \"land\",\n        \"premises\",\n        \"offices\",\n        \"storageRooms\",\n        \"buildings\",\n        \"newConstruction\"\n      ],\n      \"enumTitles\": [\n        \"All types\",\n        \"Homes\",\n        \"Flats / apartments\",\n        \"Penthouses\",\n        \"Studios\",\n        \"Duplex\",\n        \"Lofts\",\n        \"Chalets\",\n        \"Garages\",\n        \"Land\",\n        \"Commercial premises\",\n        \"Offices\",\n        \"Storage rooms\",\n        \"Buildings\",\n        \"New construction\"\n      ],\n      \"default\": \"homes\",\n      \"prefill\": \"homes\"\n    },\n    \"minPrice\": {\n      \"title\": \"Minimum price (EUR)\",\n      \"type\": \"integer\",\n      \"description\": \"Server-side minimum sale price or monthly rent.\",\n      \"minimum\": 0,\n      \"maximum\": 100000000\n    },\n    \"maxPrice\": {\n      \"title\": \"Maximum price (EUR)\",\n      \"type\": \"integer\",\n      \"description\": \"Server-side maximum sale price or monthly rent.\",\n      \"minimum\": 0,\n      \"maximum\": 100000000\n    },\n    \"minRooms\": {\n      \"title\": \"Minimum bedrooms\",\n      \"type\": \"integer\",\n      \"description\": \"Server-side minimum number of bedrooms.\",\n      \"minimum\": 0,\n      \"maximum\": 20\n    },\n    \"maxRooms\": {\n      \"title\": \"Maximum bedrooms\",\n      \"type\": \"integer\",\n      \"description\": \"Server-side maximum number of bedrooms.\",\n      \"minimum\": 0,\n      \"maximum\": 20\n    },\n    \"minBathrooms\": {\n      \"title\": \"Minimum bathrooms\",\n      \"type\": \"integer\",\n      \"description\": \"Server-side minimum number of bathrooms.\",\n      \"minimum\": 0,\n      \"maximum\": 20\n    },\n    \"maxBathrooms\": {\n      \"title\": \"Maximum bathrooms\",\n      \"type\": \"integer\",\n      \"description\": \"Server-side maximum number of bathrooms.\",\n      \"minimum\": 0,\n      \"maximum\": 20\n    },\n    \"minSurface\": {\n      \"title\": \"Minimum surface (m²)\",\n      \"type\": \"integer\",\n      \"description\": \"Server-side minimum built surface.\",\n      \"minimum\": 0,\n      \"maximum\": 100000\n    },\n    \"maxSurface\": {\n      \"title\": \"Maximum surface (m²)\",\n      \"type\": \"integer\",\n      \"description\": \"Server-side maximum built surface.\",\n      \"minimum\": 0,\n      \"maximum\": 100000\n    },\n    \"features\": {\n      \"title\": \"Features\",\n      \"type\": \"array\",\n      \"description\": \"Only listings with these features. Multiple selections are combined (AND). Leave empty for no feature filter.\",\n      \"editor\": \"select\",\n      \"items\": {\n        \"type\": \"string\",\n        \"enum\": [\n          \"elevator\",\n          \"terrace\",\n          \"balcony\",\n          \"pool\",\n          \"garden\",\n          \"parking\",\n          \"storageRoom\",\n          \"airConditioning\",\n          \"heating\",\n          \"furnished\",\n          \"notFurnished\",\n          \"internet\",\n          \"petsAllowed\",\n          \"bankOwned\",\n          \"subsidised\"\n        ],\n        \"enumTitles\": [\n          \"Lift\",\n          \"Terrace\",\n          \"Balcony\",\n          \"Pool\",\n          \"Garden\",\n          \"Parking\",\n          \"Storage room\",\n          \"Air conditioning\",\n          \"Heating\",\n          \"Furnished\",\n          \"Not furnished\",\n          \"Internet\",\n          \"Pets allowed\",\n          \"Bank-owned\",\n          \"Subsidised housing\"\n        ]\n      },\n      \"uniqueItems\": true,\n      \"default\": [],\n      \"prefill\": []\n    },\n    \"publishedSince\": {\n      \"title\": \"Published since\",\n      \"type\": \"string\",\n      \"description\": \"Only keep listings published inside this window. Searches newest-first and stops at the cutoff.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"any\",\n        \"last24h\",\n        \"last48h\",\n        \"last7d\",\n        \"last30d\"\n      ],\n      \"enumTitles\": [\n        \"Any time\",\n        \"Last 24 hours\",\n        \"Last 48 hours\",\n        \"Last 7 days\",\n        \"Last 30 days\"\n      ],\n      \"default\": \"any\",\n      \"prefill\": \"any\"\n    },\n    \"rentalType\": {\n      \"title\": \"Rental duration\",\n      \"type\": \"string\",\n      \"description\": \"For rent searches only: long-term or temporary rental. Uses Fotocasa's rental path filter.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"any\",\n        \"longTerm\",\n        \"temporary\"\n      ],\n      \"enumTitles\": [\n        \"Any\",\n        \"Long term\",\n        \"Temporary\"\n      ],\n      \"default\": \"any\",\n      \"prefill\": \"any\"\n    },\n    \"ownerType\": {\n      \"title\": \"Owner type\",\n      \"type\": \"string\",\n      \"description\": \"Private owners or professional agencies. Private-only uses Fotocasa's particulares path.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"any\",\n        \"private\",\n        \"agency\"\n      ],\n      \"enumTitles\": [\n        \"Any\",\n        \"Private owner\",\n        \"Agency\"\n      ],\n      \"default\": \"any\",\n      \"prefill\": \"any\"\n    },\n    \"onlyPriceDrops\": {\n      \"title\": \"Only price drops\",\n      \"type\": \"boolean\",\n      \"description\": \"Only emit listings that show a price reduction.\",\n      \"default\": false,\n      \"prefill\": false\n    },\n    \"sortBy\": {\n      \"title\": \"Sort by\",\n      \"type\": \"string\",\n      \"description\": \"Verified Fotocasa sort orders.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"relevance\",\n        \"newest\",\n        \"oldest\",\n        \"priceAsc\",\n        \"priceDesc\",\n        \"surfaceAsc\",\n        \"surfaceDesc\"\n      ],\n      \"enumTitles\": [\n        \"Relevance\",\n        \"Newest first\",\n        \"Oldest first\",\n        \"Price: low to high\",\n        \"Price: high to low\",\n        \"Surface: low to high\",\n        \"Surface: high to low\"\n      ],\n      \"default\": \"relevance\",\n      \"prefill\": \"relevance\"\n    },\n    \"maxItems\": {\n      \"title\": \"Maximum listings\",\n      \"type\": \"integer\",\n      \"description\": \"Hard cap on emitted listings (1–10,000). Above ~9,900 rows the actor automatically splits the search into price buckets.\",\n      \"minimum\": 1,\n      \"maximum\": 10000,\n      \"default\": 100,\n      \"prefill\": 3,\n      \"sectionCaption\": \"Volume\"\n    },\n    \"startUrls\": {\n      \"title\": \"Search URLs\",\n      \"type\": \"array\",\n      \"description\": \"Fotocasa search URLs to scrape. Filters in each URL win over the form fields. Property URLs found here are routed to detail mode.\",\n      \"editor\": \"requestListSources\",\n      \"sectionCaption\": \"URLs\"\n    },\n    \"propertyUrls\": {\n      \"title\": \"Property URLs or IDs\",\n      \"type\": \"array\",\n      \"description\": \"Individual Fotocasa detail URLs, new-construction project URLs, or numeric property IDs.\",\n      \"editor\": \"stringList\"\n    },\n    \"fetchDetails\": {\n      \"title\": \"Fetch details\",\n      \"type\": \"boolean\",\n      \"description\": \"Fetch each listing's detail page to add energy certificate, agency phone and registrations, exact street, ground surface and extra features. Slower and more requests.\",\n      \"default\": false,\n      \"prefill\": false,\n      \"sectionCaption\": \"Details and monitoring\"\n    },\n    \"maxDetails\": {\n      \"title\": \"Maximum detail pages\",\n      \"type\": \"integer\",\n      \"description\": \"Limit detail requests when Fetch details is on. 0 means all emitted listings.\",\n      \"minimum\": 0,\n      \"maximum\": 10000,\n      \"default\": 100,\n      \"prefill\": 0\n    },\n    \"monitorMode\": {\n      \"title\": \"Monitor mode\",\n      \"type\": \"boolean\",\n      \"description\": \"Emit only new listings and listings whose price changed, using Actor state between runs. The state key is namespaced by monitorKey or the search filters.\",\n      \"default\": false,\n      \"prefill\": false\n    },\n    \"monitorKey\": {\n      \"title\": \"Monitor key\",\n      \"type\": \"string\",\n      \"description\": \"Optional namespace for monitor state. Leave empty to derive it from the search filters.\",\n      \"editor\": \"textfield\",\n      \"default\": \"\",\n      \"prefill\": \"\"\n    }\n  },\n  \"required\": [\n    \"mode\"\n  ]\n}",
    "readme": "# Fotocasa Spain Sale & Rental Listings Scraper\n\nScrape [Fotocasa](https://www.fotocasa.es), one of Spain's largest real-estate portals, without cookies, login, API keys or a proxy. Search any Spanish city, district, neighborhood, street or ZIP code, paste Fotocasa search URLs, or fetch individual property and new-construction project pages.\n\n## What this actor does\n\n- **Search by location** — resolve city, province, autonomous community, district, neighborhood, locality, street or ZIP code through Fotocasa's own suggestion service.\n- **Paste search URLs** — every filter already in the URL (operation, property type, price, rooms, surface, features, sort) is preserved.\n- **Paste property URLs or IDs** — fetch individual listings and new-construction project pages directly.\n- **Five operations** — sale, rent, shared rent, rent-to-buy and business transfer.\n- **Fifteen property categories** — homes, flats, penthouses, studios, duplex, lofts, chalets, garages, land, commercial premises, offices, storage rooms, buildings and new construction. Subtypes are preserved, not collapsed into \"homes\".\n- **Server-side filters** — price, bedrooms, bathrooms, surface, features and verified sort orders.\n- **Special filters** — published in the last 24/48 hours, last 7/30 days, rental duration, private-owner-only, bank-owned, subsidised housing and price drops.\n- **New-construction projects** — project name, URL, delivery date, promoter, price/room/bath/surface ranges, images and every unit.\n- **Optional detail enrichment** — energy certificate, exact street, ground surface, agency phone and official registrations, extra features and reference.\n- **Optional monitor mode** — emit only new listings and price changes using persisted Actor state.\n- **Up to 10,000 rows** — searches above Fotocasa's ~9,900-row API window are automatically split into price buckets and deduplicated.\n\n## Input\n\n| Field | Type | Default | Description |\n|---|---|---|---|\n| `mode` | select | `search` | `search`, `startUrls` or `propertyUrls` |\n| `location` | string | – | City, province, district, neighborhood, street or ZIP code |\n| `locationType` | select | `auto` | Country, autonomous community, province, municipality, district, neighborhood, locality, street or ZIP code |\n| `operation` | select | `sale` | `sale`, `rent`, `share`, `rentToBuy`, `transfer` |\n| `propertyType` | select | `homes` | All / homes / flats / penthouses / studios / duplex / lofts / chalets / garages / land / premises / offices / storageRooms / buildings / newConstruction |\n| `minPrice`, `maxPrice` | integer | – | EUR (monthly rent for rentals) |\n| `minRooms`, `maxRooms` | integer | – | Bedrooms |\n| `minBathrooms`, `maxBathrooms` | integer | – | Bathrooms |\n| `minSurface`, `maxSurface` | integer | – | Built surface in m² |\n| `features` | multi-select | – | elevator, terrace, balcony, pool, garden, parking, storageRoom, airConditioning, heating, furnished, notFurnished, internet, petsAllowed, bankOwned, subsidised |\n| `publishedSince` | select | `any` | `last24h`, `last48h`, `last7d`, `last30d` |\n| `rentalType` | select | `any` | `longTerm` or `temporary` (rent only) |\n| `ownerType` | select | `any` | `private` or `agency` |\n| `onlyPriceDrops` | boolean | `false` | Only listings with a price reduction |\n| `sortBy` | select | `relevance` | relevance, newest, oldest, priceAsc, priceDesc, surfaceAsc, surfaceDesc |\n| `maxItems` | integer | `100` | 1–10,000 |\n| `startUrls` | array of `{ \"url\": ... }` | – | Fotocasa search URLs (or paste URLs in the UI) |\n| `propertyUrls` | array | – | Detail URLs, project URLs or numeric IDs |\n| `fetchDetails` | boolean | `false` | Enrich with detail-page fields |\n| `maxDetails` | integer | `100` | 0 = all emitted listings |\n| `monitorMode` | boolean | `false` | Emit new/price-changed listings only |\n| `monitorKey` | string | – | Optional state namespace |\n\n## Examples\n\n### Sale listings in Madrid\n\n```json\n{\n  \"mode\": \"search\",\n  \"location\": \"madrid\",\n  \"operation\": \"sale\",\n  \"propertyType\": \"flats\",\n  \"minRooms\": 2,\n  \"maxPrice\": 450000,\n  \"sortBy\": \"priceAsc\",\n  \"maxItems\": 200\n}\n```\n\n### Rentals under €1,500 with detail enrichment\n\n```json\n{\n  \"mode\": \"search\",\n  \"location\": \"barcelona\",\n  \"operation\": \"rent\",\n  \"maxPrice\": 1500,\n  \"rentalType\": \"longTerm\",\n  \"fetchDetails\": true,\n  \"maxDetails\": 50,\n  \"maxItems\": 50\n}\n```\n\n### Paste a Fotocasa search URL\n\n```json\n{\n  \"mode\": \"startUrls\",\n  \"startUrls\": [\n    {\"url\": \"https://www.fotocasa.es/es/comprar/viviendas/madrid/todas-las-zonas/l\"}\n  ],\n  \"maxItems\": 100\n}\n```\n\n### Individual property or project URLs\n\n```json\n{\n  \"mode\": \"propertyUrls\",\n  \"propertyUrls\": [\n    \"https://www.fotocasa.es/es/comprar/vivienda/madrid/x/190909371/d\",\n    \"https://www.fotocasa.es/es/comprar/obra-nueva/barcelona-capital/20517030\"\n  ]\n}\n```\n\n### Monitor new listings\n\n```json\n{\n  \"mode\": \"search\",\n  \"location\": \"valencia\",\n  \"operation\": \"rent\",\n  \"monitorMode\": true,\n  \"monitorKey\": \"valencia-rentals\",\n  \"maxItems\": 100\n}\n```\n\n## Output\n\nKeep all legacy fields (`recordType`, `listingId`, `title`, `price`, `currency`, `area`, `bedrooms`, `bathrooms`, `propertyType`, `city`, `neighborhood`, `province`, `postalCode`, `address`, `imageUrl`, `propertyUrl`, `description`, `isNewDevelopment`, `mode`, `scrapedAt`) and add:\n\n- **Identity** — `recordType` (`property` or `newConstructionProject`), `propertyId`, `realEstateAdId`, `detailUrl`, `operation`, `transactionTypeId`, `propertySubtype`, `propertyTypeId`, `subtypeId`.\n- **Price** — `priceOnRequest`, `priceDropAmount`, `previousPrice`, `priceDropPercent`, `pricePerSquareMeter`, `pricePeriod`.\n- **Property** — `surface`, `plotArea`, `floor`, `floorType`, `orientation`, `orientationName`, `antiquity`, `antiquityName`, `condition`, `hotWater`, `heating`, `features`, `featureIds`, `amenities`, `hasLift`, `hasTerrace`, `hasBalcony`, `hasPool`, `hasGarden`, `hasParking`, `hasStorageRoom`, `hasAirConditioning`, `hasHeating`, `isFurnished`, `hasInternet`, `hasPetsAllowed`.\n- **Media** — `images`, `photoCount`, `videos`, `hasVideo`, `hasVirtualTour`, `hasFloorPlans`, `hasOnlineGuidedTour`, `media`.\n- **Location** — `street`, `streetNumber`, `municipality`, `district`, `region`, `country`, `locationText`, `latitude`, `longitude`, `coordinatesAccuracy`, `locationIds`, `addressVisibilityMode`.\n- **Agency** — `agencyName`, `agencyAlias`, `agencyId`, `agencyType`, `agencyUrl`, `agencyLogo`, `agencyPhone`, `agencyReference`, `agencyRegistrations`, `publisherId`, `isPrivateOwner`, `isBank`, `phone`, `hasPhoneVisibility`.\n- **Dates and flags** — `publishedAt`, `updatedAt`, `bumpedAt`, `isNewConstruction`, `isPromotion`, `isOpportunity`, `isAuctioned`, `isOccupied`, `isRentedWithTenants`, `isBareOwnership`, `isTemporaryRental`, `isTop`, `isPremium`, `hasSubsidies`, `isPhotoReport`.\n- **Detail enrichment** — `energyRating`, `energyConsumption`, `energyEmissions`, `energyCertificateStatus`, `groundSurface`, `extraFeatures`, `reference`, `keyDeliveryDate`, `constructionType`, `qualityRate`, `rentReferenceIndex`.\n- **Projects** — `projectId`, `projectName`, `projectUrl`, `projectKeyDeliveryDate`, `projectPromoterName`, `projectPromoterPhone`, `projectUnitCount`, `projectPriceMin`, `projectPriceMax`, `projectRoomsMin`, `projectRoomsMax`, `projectBathroomsMin`, `projectBathroomsMax`, `projectSurfaceMin`, `projectSurfaceMax`, `projectImages`, `projectUnits`, `promotionTypologies`.\n- **Monitor** — `changeType`, `previousPrice`, `firstSeenAt`, `lastSeenAt`.\n\nEmpty fields are omitted at every level. Price `999999999` is treated as \"price on request\", never as a real price.\n\n## Use cases\n\n- **Buyer research** — compare asking prices and surfaces across neighborhoods.\n- **Rental tracking** — watch long-term or temporary rental supply and rents.\n- **Investor screening** — filter by price, surface, rooms and features, then enrich energy and agency data.\n- **Lead generation** — agency name, phone, reference and registrations, private-vs-agency flags.\n- **New-build monitoring** — project names, promoters, delivery dates and unit inventories.\n- **Market change alerts** — schedule monitor mode to get only new and re-priced listings.\n\n## FAQ\n\n**Do I need a Fotocasa account, cookie, API key or proxy?** No. The actor uses Fotocasa's public search and SSR JSON endpoints directly, with no login, cookie, key or proxy input.\n\n**Which locations can I use?** Any place Fotocasa recognizes: Spain, autonomous communities, provinces, municipalities, districts, neighborhoods, localities, streets and ZIP codes. Try `Madrid`, `Barcelona`, `Sitges`, `Eixample`, `28001` or a street name.\n\n**Can I paste a normal Fotocasa search URL?** Yes. Use `startUrls` mode and paste the URL; the operation, property type, location and filters are read from the path and query string.\n\n**Why did I get fewer than `maxItems`?** Three reasons: the search genuinely has fewer matches, Fotocasa's public API window is about 9,900 rows per query (the actor partitions above that only when `maxItems` is above 9,900), or a client-side filter such as price drops or private owners scanned its safety limit. The run status message always reports delivered vs reported counts.\n\n**How does detail enrichment work?** With `fetchDetails: true` the actor fetches the listing detail page to add fields the search API does not carry: energy certificate, exact street, ground surface, agency phone/registrations and extra features. It is off by default because it adds one request per listing. `maxDetails: 0` enriches every emitted listing.\n\n**What happens with more than 10,000 results?** `maxItems` is a hard cap at 10,000. For large searches the actor splits the query into the price buckets shown in the status message and deduplicates by property ID. To go deeper than the API window on a smaller request, add price or location filters yourself.\n\n**Does monitor mode need extra setup?** No. It stores a compact map of property IDs and prices in Actor state, keyed by `monitorKey` (or a hash of your filters). The first run emits everything as `new`; later runs emit only `new` and `priceChanged` records.\n\n**Are rental duration, published date and private-owner filters server-side?** Fotocasa's JSON search body ignores them. The actor applies them through Fotocasa's own path filters or client-side cutoffs, and says so in the run status when a scan limit is reached.\n\n**Why is `price` missing on some records?** Fotocasa sometimes publishes \"price on request\" as `999999999` or a null. The actor omits `price` and sets `priceOnRequest: true` instead of inventing a value.\n\n**Why do private-owner searches return fewer listings?** Fotocasa's `/particulares` page shows 15 private-owner listings per page and ignores extra query filters. The actor paginates that page, applies price/room/surface and price-drop filters client-side, and reports when the private page is exhausted; use a narrower location or price range to see different private listings. Rental-duration filtering is unavailable on the private page.\n\n**Is this affiliated with Fotocasa?** No. It is an independent actor that reads publicly available Fotocasa data and is not affiliated with or endorsed by Fotocasa.\n",
    "actorDefinition": {
      "actorSpecification": 1,
      "name": "fotocasa-spain-sale-and-rental-listings-scraper",
      "title": "Fotocasa Spain Sale & Rental Listings Scraper",
      "description": "Scrape Fotocasa Spain by location or URL: sale, rent, share, rent-to-buy and transfer listings with price, surface, rooms, agency, coordinates, media, new-construction projects, 7 sorts, detail enrichment and monitor mode. No proxy or login.",
      "version": "2.2",
      "buildTag": "latest",
      "dockerfile": "./Dockerfile",
      "readme": "# Fotocasa Spain Sale & Rental Listings Scraper\n\nScrape [Fotocasa](https://www.fotocasa.es), one of Spain's largest real-estate portals, without cookies, login, API keys or a proxy. Search any Spanish city, district, neighborhood, street or ZIP code, paste Fotocasa search URLs, or fetch individual property and new-construction project pages.\n\n## What this actor does\n\n- **Search by location** — resolve city, province, autonomous community, district, neighborhood, locality, street or ZIP code through Fotocasa's own suggestion service.\n- **Paste search URLs** — every filter already in the URL (operation, property type, price, rooms, surface, features, sort) is preserved.\n- **Paste property URLs or IDs** — fetch individual listings and new-construction project pages directly.\n- **Five operations** — sale, rent, shared rent, rent-to-buy and business transfer.\n- **Fifteen property categories** — homes, flats, penthouses, studios, duplex, lofts, chalets, garages, land, commercial premises, offices, storage rooms, buildings and new construction. Subtypes are preserved, not collapsed into \"homes\".\n- **Server-side filters** — price, bedrooms, bathrooms, surface, features and verified sort orders.\n- **Special filters** — published in the last 24/48 hours, last 7/30 days, rental duration, private-owner-only, bank-owned, subsidised housing and price drops.\n- **New-construction projects** — project name, URL, delivery date, promoter, price/room/bath/surface ranges, images and every unit.\n- **Optional detail enrichment** — energy certificate, exact street, ground surface, agency phone and official registrations, extra features and reference.\n- **Optional monitor mode** — emit only new listings and price changes using persisted Actor state.\n- **Up to 10,000 rows** — searches above Fotocasa's ~9,900-row API window are automatically split into price buckets and deduplicated.\n\n## Input\n\n| Field | Type | Default | Description |\n|---|---|---|---|\n| `mode` | select | `search` | `search`, `startUrls` or `propertyUrls` |\n| `location` | string | – | City, province, district, neighborhood, street or ZIP code |\n| `locationType` | select | `auto` | Country, autonomous community, province, municipality, district, neighborhood, locality, street or ZIP code |\n| `operation` | select | `sale` | `sale`, `rent`, `share`, `rentToBuy`, `transfer` |\n| `propertyType` | select | `homes` | All / homes / flats / penthouses / studios / duplex / lofts / chalets / garages / land / premises / offices / storageRooms / buildings / newConstruction |\n| `minPrice`, `maxPrice` | integer | – | EUR (monthly rent for rentals) |\n| `minRooms`, `maxRooms` | integer | – | Bedrooms |\n| `minBathrooms`, `maxBathrooms` | integer | – | Bathrooms |\n| `minSurface`, `maxSurface` | integer | – | Built surface in m² |\n| `features` | multi-select | – | elevator, terrace, balcony, pool, garden, parking, storageRoom, airConditioning, heating, furnished, notFurnished, internet, petsAllowed, bankOwned, subsidised |\n| `publishedSince` | select | `any` | `last24h`, `last48h`, `last7d`, `last30d` |\n| `rentalType` | select | `any` | `longTerm` or `temporary` (rent only) |\n| `ownerType` | select | `any` | `private` or `agency` |\n| `onlyPriceDrops` | boolean | `false` | Only listings with a price reduction |\n| `sortBy` | select | `relevance` | relevance, newest, oldest, priceAsc, priceDesc, surfaceAsc, surfaceDesc |\n| `maxItems` | integer | `100` | 1–10,000 |\n| `startUrls` | array of `{ \"url\": ... }` | – | Fotocasa search URLs (or paste URLs in the UI) |\n| `propertyUrls` | array | – | Detail URLs, project URLs or numeric IDs |\n| `fetchDetails` | boolean | `false` | Enrich with detail-page fields |\n| `maxDetails` | integer | `100` | 0 = all emitted listings |\n| `monitorMode` | boolean | `false` | Emit new/price-changed listings only |\n| `monitorKey` | string | – | Optional state namespace |\n\n## Examples\n\n### Sale listings in Madrid\n\n```json\n{\n  \"mode\": \"search\",\n  \"location\": \"madrid\",\n  \"operation\": \"sale\",\n  \"propertyType\": \"flats\",\n  \"minRooms\": 2,\n  \"maxPrice\": 450000,\n  \"sortBy\": \"priceAsc\",\n  \"maxItems\": 200\n}\n```\n\n### Rentals under €1,500 with detail enrichment\n\n```json\n{\n  \"mode\": \"search\",\n  \"location\": \"barcelona\",\n  \"operation\": \"rent\",\n  \"maxPrice\": 1500,\n  \"rentalType\": \"longTerm\",\n  \"fetchDetails\": true,\n  \"maxDetails\": 50,\n  \"maxItems\": 50\n}\n```\n\n### Paste a Fotocasa search URL\n\n```json\n{\n  \"mode\": \"startUrls\",\n  \"startUrls\": [\n    {\"url\": \"https://www.fotocasa.es/es/comprar/viviendas/madrid/todas-las-zonas/l\"}\n  ],\n  \"maxItems\": 100\n}\n```\n\n### Individual property or project URLs\n\n```json\n{\n  \"mode\": \"propertyUrls\",\n  \"propertyUrls\": [\n    \"https://www.fotocasa.es/es/comprar/vivienda/madrid/x/190909371/d\",\n    \"https://www.fotocasa.es/es/comprar/obra-nueva/barcelona-capital/20517030\"\n  ]\n}\n```\n\n### Monitor new listings\n\n```json\n{\n  \"mode\": \"search\",\n  \"location\": \"valencia\",\n  \"operation\": \"rent\",\n  \"monitorMode\": true,\n  \"monitorKey\": \"valencia-rentals\",\n  \"maxItems\": 100\n}\n```\n\n## Output\n\nKeep all legacy fields (`recordType`, `listingId`, `title`, `price`, `currency`, `area`, `bedrooms`, `bathrooms`, `propertyType`, `city`, `neighborhood`, `province`, `postalCode`, `address`, `imageUrl`, `propertyUrl`, `description`, `isNewDevelopment`, `mode`, `scrapedAt`) and add:\n\n- **Identity** — `recordType` (`property` or `newConstructionProject`), `propertyId`, `realEstateAdId`, `detailUrl`, `operation`, `transactionTypeId`, `propertySubtype`, `propertyTypeId`, `subtypeId`.\n- **Price** — `priceOnRequest`, `priceDropAmount`, `previousPrice`, `priceDropPercent`, `pricePerSquareMeter`, `pricePeriod`.\n- **Property** — `surface`, `plotArea`, `floor`, `floorType`, `orientation`, `orientationName`, `antiquity`, `antiquityName`, `condition`, `hotWater`, `heating`, `features`, `featureIds`, `amenities`, `hasLift`, `hasTerrace`, `hasBalcony`, `hasPool`, `hasGarden`, `hasParking`, `hasStorageRoom`, `hasAirConditioning`, `hasHeating`, `isFurnished`, `hasInternet`, `hasPetsAllowed`.\n- **Media** — `images`, `photoCount`, `videos`, `hasVideo`, `hasVirtualTour`, `hasFloorPlans`, `hasOnlineGuidedTour`, `media`.\n- **Location** — `street`, `streetNumber`, `municipality`, `district`, `region`, `country`, `locationText`, `latitude`, `longitude`, `coordinatesAccuracy`, `locationIds`, `addressVisibilityMode`.\n- **Agency** — `agencyName`, `agencyAlias`, `agencyId`, `agencyType`, `agencyUrl`, `agencyLogo`, `agencyPhone`, `agencyReference`, `agencyRegistrations`, `publisherId`, `isPrivateOwner`, `isBank`, `phone`, `hasPhoneVisibility`.\n- **Dates and flags** — `publishedAt`, `updatedAt`, `bumpedAt`, `isNewConstruction`, `isPromotion`, `isOpportunity`, `isAuctioned`, `isOccupied`, `isRentedWithTenants`, `isBareOwnership`, `isTemporaryRental`, `isTop`, `isPremium`, `hasSubsidies`, `isPhotoReport`.\n- **Detail enrichment** — `energyRating`, `energyConsumption`, `energyEmissions`, `energyCertificateStatus`, `groundSurface`, `extraFeatures`, `reference`, `keyDeliveryDate`, `constructionType`, `qualityRate`, `rentReferenceIndex`.\n- **Projects** — `projectId`, `projectName`, `projectUrl`, `projectKeyDeliveryDate`, `projectPromoterName`, `projectPromoterPhone`, `projectUnitCount`, `projectPriceMin`, `projectPriceMax`, `projectRoomsMin`, `projectRoomsMax`, `projectBathroomsMin`, `projectBathroomsMax`, `projectSurfaceMin`, `projectSurfaceMax`, `projectImages`, `projectUnits`, `promotionTypologies`.\n- **Monitor** — `changeType`, `previousPrice`, `firstSeenAt`, `lastSeenAt`.\n\nEmpty fields are omitted at every level. Price `999999999` is treated as \"price on request\", never as a real price.\n\n## Use cases\n\n- **Buyer research** — compare asking prices and surfaces across neighborhoods.\n- **Rental tracking** — watch long-term or temporary rental supply and rents.\n- **Investor screening** — filter by price, surface, rooms and features, then enrich energy and agency data.\n- **Lead generation** — agency name, phone, reference and registrations, private-vs-agency flags.\n- **New-build monitoring** — project names, promoters, delivery dates and unit inventories.\n- **Market change alerts** — schedule monitor mode to get only new and re-priced listings.\n\n## FAQ\n\n**Do I need a Fotocasa account, cookie, API key or proxy?** No. The actor uses Fotocasa's public search and SSR JSON endpoints directly, with no login, cookie, key or proxy input.\n\n**Which locations can I use?** Any place Fotocasa recognizes: Spain, autonomous communities, provinces, municipalities, districts, neighborhoods, localities, streets and ZIP codes. Try `Madrid`, `Barcelona`, `Sitges`, `Eixample`, `28001` or a street name.\n\n**Can I paste a normal Fotocasa search URL?** Yes. Use `startUrls` mode and paste the URL; the operation, property type, location and filters are read from the path and query string.\n\n**Why did I get fewer than `maxItems`?** Three reasons: the search genuinely has fewer matches, Fotocasa's public API window is about 9,900 rows per query (the actor partitions above that only when `maxItems` is above 9,900), or a client-side filter such as price drops or private owners scanned its safety limit. The run status message always reports delivered vs reported counts.\n\n**How does detail enrichment work?** With `fetchDetails: true` the actor fetches the listing detail page to add fields the search API does not carry: energy certificate, exact street, ground surface, agency phone/registrations and extra features. It is off by default because it adds one request per listing. `maxDetails: 0` enriches every emitted listing.\n\n**What happens with more than 10,000 results?** `maxItems` is a hard cap at 10,000. For large searches the actor splits the query into the price buckets shown in the status message and deduplicates by property ID. To go deeper than the API window on a smaller request, add price or location filters yourself.\n\n**Does monitor mode need extra setup?** No. It stores a compact map of property IDs and prices in Actor state, keyed by `monitorKey` (or a hash of your filters). The first run emits everything as `new`; later runs emit only `new` and `priceChanged` records.\n\n**Are rental duration, published date and private-owner filters server-side?** Fotocasa's JSON search body ignores them. The actor applies them through Fotocasa's own path filters or client-side cutoffs, and says so in the run status when a scan limit is reached.\n\n**Why is `price` missing on some records?** Fotocasa sometimes publishes \"price on request\" as `999999999` or a null. The actor omits `price` and sets `priceOnRequest: true` instead of inventing a value.\n\n**Why do private-owner searches return fewer listings?** Fotocasa's `/particulares` page shows 15 private-owner listings per page and ignores extra query filters. The actor paginates that page, applies price/room/surface and price-drop filters client-side, and reports when the private page is exhausted; use a narrower location or price range to see different private listings. Rental-duration filtering is unavailable on the private page.\n\n**Is this affiliated with Fotocasa?** No. It is an independent actor that reads publicly available Fotocasa data and is not affiliated with or endorsed by Fotocasa.\n",
      "input": {
        "title": "Fotocasa Spain Sale & Rental Listings Scraper",
        "description": "Search Fotocasa by location or paste search/property URLs. Get full listing records with price, surface, rooms, location, agency, media, new-construction projects and optional detail enrichment.",
        "type": "object",
        "schemaVersion": 1,
        "properties": {
          "mode": {
            "title": "Mode",
            "type": "string",
            "description": "How to find listings: search by location, scrape Fotocasa search URLs, or scrape individual property URLs/IDs.",
            "editor": "select",
            "enum": [
              "search",
              "startUrls",
              "propertyUrls"
            ],
            "enumTitles": [
              "Search by location",
              "Search URLs",
              "Property URLs / IDs"
            ],
            "default": "search",
            "prefill": "search",
            "sectionCaption": "Mode"
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City, province, district, neighborhood, street or ZIP code, e.g. Madrid, Barcelona, Sitges, 28001. Used in Search by location mode.",
            "editor": "textfield",
            "default": "",
            "prefill": "madrid"
          },
          "locationType": {
            "title": "Location type",
            "type": "string",
            "description": "Narrow ambiguous place names to a level. Auto picks the best match (usually the municipality).",
            "editor": "select",
            "enum": [
              "auto",
              "country",
              "autonomousCommunity",
              "province",
              "municipality",
              "district",
              "neighborhood",
              "locality",
              "street",
              "zipCode"
            ],
            "enumTitles": [
              "Auto",
              "Country",
              "Autonomous community",
              "Province",
              "Municipality",
              "District",
              "Neighborhood",
              "Locality",
              "Street",
              "ZIP code"
            ],
            "default": "auto",
            "prefill": "auto"
          },
          "operation": {
            "title": "Operation",
            "type": "string",
            "description": "Sale, rent, room share, rent-to-buy or business transfer.",
            "editor": "select",
            "enum": [
              "sale",
              "rent",
              "share",
              "rentToBuy",
              "transfer"
            ],
            "enumTitles": [
              "For sale",
              "For rent",
              "Shared rent",
              "Rent to buy",
              "Business transfer"
            ],
            "default": "sale",
            "prefill": "sale",
            "sectionCaption": "Search filters"
          },
          "propertyType": {
            "title": "Property type",
            "type": "string",
            "description": "Property category. Subtypes such as penthouses, studios and duplex are preserved instead of being collapsed into homes.",
            "editor": "select",
            "enum": [
              "all",
              "homes",
              "flats",
              "penthouses",
              "studios",
              "duplex",
              "lofts",
              "chalets",
              "garages",
              "land",
              "premises",
              "offices",
              "storageRooms",
              "buildings",
              "newConstruction"
            ],
            "enumTitles": [
              "All types",
              "Homes",
              "Flats / apartments",
              "Penthouses",
              "Studios",
              "Duplex",
              "Lofts",
              "Chalets",
              "Garages",
              "Land",
              "Commercial premises",
              "Offices",
              "Storage rooms",
              "Buildings",
              "New construction"
            ],
            "default": "homes",
            "prefill": "homes"
          },
          "minPrice": {
            "title": "Minimum price (EUR)",
            "type": "integer",
            "description": "Server-side minimum sale price or monthly rent.",
            "minimum": 0,
            "maximum": 100000000
          },
          "maxPrice": {
            "title": "Maximum price (EUR)",
            "type": "integer",
            "description": "Server-side maximum sale price or monthly rent.",
            "minimum": 0,
            "maximum": 100000000
          },
          "minRooms": {
            "title": "Minimum bedrooms",
            "type": "integer",
            "description": "Server-side minimum number of bedrooms.",
            "minimum": 0,
            "maximum": 20
          },
          "maxRooms": {
            "title": "Maximum bedrooms",
            "type": "integer",
            "description": "Server-side maximum number of bedrooms.",
            "minimum": 0,
            "maximum": 20
          },
          "minBathrooms": {
            "title": "Minimum bathrooms",
            "type": "integer",
            "description": "Server-side minimum number of bathrooms.",
            "minimum": 0,
            "maximum": 20
          },
          "maxBathrooms": {
            "title": "Maximum bathrooms",
            "type": "integer",
            "description": "Server-side maximum number of bathrooms.",
            "minimum": 0,
            "maximum": 20
          },
          "minSurface": {
            "title": "Minimum surface (m²)",
            "type": "integer",
            "description": "Server-side minimum built surface.",
            "minimum": 0,
            "maximum": 100000
          },
          "maxSurface": {
            "title": "Maximum surface (m²)",
            "type": "integer",
            "description": "Server-side maximum built surface.",
            "minimum": 0,
            "maximum": 100000
          },
          "features": {
            "title": "Features",
            "type": "array",
            "description": "Only listings with these features. Multiple selections are combined (AND). Leave empty for no feature filter.",
            "editor": "select",
            "items": {
              "type": "string",
              "enum": [
                "elevator",
                "terrace",
                "balcony",
                "pool",
                "garden",
                "parking",
                "storageRoom",
                "airConditioning",
                "heating",
                "furnished",
                "notFurnished",
                "internet",
                "petsAllowed",
                "bankOwned",
                "subsidised"
              ],
              "enumTitles": [
                "Lift",
                "Terrace",
                "Balcony",
                "Pool",
                "Garden",
                "Parking",
                "Storage room",
                "Air conditioning",
                "Heating",
                "Furnished",
                "Not furnished",
                "Internet",
                "Pets allowed",
                "Bank-owned",
                "Subsidised housing"
              ]
            },
            "uniqueItems": true,
            "default": [],
            "prefill": []
          },
          "publishedSince": {
            "title": "Published since",
            "type": "string",
            "description": "Only keep listings published inside this window. Searches newest-first and stops at the cutoff.",
            "editor": "select",
            "enum": [
              "any",
              "last24h",
              "last48h",
              "last7d",
              "last30d"
            ],
            "enumTitles": [
              "Any time",
              "Last 24 hours",
              "Last 48 hours",
              "Last 7 days",
              "Last 30 days"
            ],
            "default": "any",
            "prefill": "any"
          },
          "rentalType": {
            "title": "Rental duration",
            "type": "string",
            "description": "For rent searches only: long-term or temporary rental. Uses Fotocasa's rental path filter.",
            "editor": "select",
            "enum": [
              "any",
              "longTerm",
              "temporary"
            ],
            "enumTitles": [
              "Any",
              "Long term",
              "Temporary"
            ],
            "default": "any",
            "prefill": "any"
          },
          "ownerType": {
            "title": "Owner type",
            "type": "string",
            "description": "Private owners or professional agencies. Private-only uses Fotocasa's particulares path.",
            "editor": "select",
            "enum": [
              "any",
              "private",
              "agency"
            ],
            "enumTitles": [
              "Any",
              "Private owner",
              "Agency"
            ],
            "default": "any",
            "prefill": "any"
          },
          "onlyPriceDrops": {
            "title": "Only price drops",
            "type": "boolean",
            "description": "Only emit listings that show a price reduction.",
            "default": false,
            "prefill": false
          },
          "sortBy": {
            "title": "Sort by",
            "type": "string",
            "description": "Verified Fotocasa sort orders.",
            "editor": "select",
            "enum": [
              "relevance",
              "newest",
              "oldest",
              "priceAsc",
              "priceDesc",
              "surfaceAsc",
              "surfaceDesc"
            ],
            "enumTitles": [
              "Relevance",
              "Newest first",
              "Oldest first",
              "Price: low to high",
              "Price: high to low",
              "Surface: low to high",
              "Surface: high to low"
            ],
            "default": "relevance",
            "prefill": "relevance"
          },
          "maxItems": {
            "title": "Maximum listings",
            "type": "integer",
            "description": "Hard cap on emitted listings (1–10,000). Above ~9,900 rows the actor automatically splits the search into price buckets.",
            "minimum": 1,
            "maximum": 10000,
            "default": 100,
            "prefill": 3,
            "sectionCaption": "Volume"
          },
          "startUrls": {
            "title": "Search URLs",
            "type": "array",
            "description": "Fotocasa search URLs to scrape. Filters in each URL win over the form fields. Property URLs found here are routed to detail mode.",
            "editor": "requestListSources",
            "sectionCaption": "URLs"
          },
          "propertyUrls": {
            "title": "Property URLs or IDs",
            "type": "array",
            "description": "Individual Fotocasa detail URLs, new-construction project URLs, or numeric property IDs.",
            "editor": "stringList"
          },
          "fetchDetails": {
            "title": "Fetch details",
            "type": "boolean",
            "description": "Fetch each listing's detail page to add energy certificate, agency phone and registrations, exact street, ground surface and extra features. Slower and more requests.",
            "default": false,
            "prefill": false,
            "sectionCaption": "Details and monitoring"
          },
          "maxDetails": {
            "title": "Maximum detail pages",
            "type": "integer",
            "description": "Limit detail requests when Fetch details is on. 0 means all emitted listings.",
            "minimum": 0,
            "maximum": 10000,
            "default": 100,
            "prefill": 0
          },
          "monitorMode": {
            "title": "Monitor mode",
            "type": "boolean",
            "description": "Emit only new listings and listings whose price changed, using Actor state between runs. The state key is namespaced by monitorKey or the search filters.",
            "default": false,
            "prefill": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Optional namespace for monitor state. Leave empty to derive it from the search filters.",
            "editor": "textfield",
            "default": "",
            "prefill": ""
          }
        },
        "required": [
          "mode"
        ]
      },
      "output": {
        "actorOutputSchemaVersion": 1,
        "title": "Fotocasa Spain Sale & Rental Listings Scraper Output",
        "description": "Fotocasa property and new-construction project records with transaction, price, surface, rooms, features, location hierarchy, coordinates, agency, media, dates, optional detail enrichment (energy certificate, exact street, agency phone/registrations) and optional monitor changes.",
        "properties": {
          "listings": {
            "type": "string",
            "title": "Property Listings",
            "description": "Dataset containing all scraped property listings, new-construction projects and monitor changes from Fotocasa.",
            "template": "{{links.apiDefaultDatasetUrl}}/items"
          }
        }
      },
      "storages": {
        "dataset": {
          "actorSpecification": 1,
          "views": {
            "overview": {
              "title": "Properties",
              "transformation": {
                "fields": [
                  "title",
                  "price",
                  "surface",
                  "bedrooms",
                  "bathrooms",
                  "propertySubtype",
                  "city",
                  "neighborhood",
                  "agencyName",
                  "propertyUrl"
                ]
              },
              "display": {
                "component": "table",
                "properties": {}
              }
            }
          }
        }
      },
      "environmentVariables": {},
      "defaultMemoryMbytes": 1024
    },
    "buildNumber": "2.2.1",
    "imageDigest": "6e1dadf0434897bd249fa033b6be2c368d379624a5f6f77a9b0a8c808593c71d",
    "actVersion": {
      "sourceType": "SOURCE_FILES",
      "buildTag": "latest",
      "versionNumber": "2.2"
    },
    "usage": {
      "ACTOR_COMPUTE_UNITS": 0.016534444444444445
    }
  }
}