{
  "openapi": "3.0.1",
  "info": {
    "title": "Fotocasa Property [$0.99] Scraper · Spain Real Estate Listings",
    "description": "Scraper de Fotocasa.es: extrae anuncios desde cualquier URL de búsqueda. Precio, m², habitaciones, baños, planta, certificado energético, tipo de inmueble, características, fotos etiquetadas por estancia, coordenadas y anunciante con teléfono. 133 campos, exporta a JSON, CSV o Excel.",
    "version": "0.0",
    "x-build-id": "Kbi66zPLfNsF0Pvrq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~fotocasa-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-fotocasa-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/memo23~fotocasa-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-fotocasa-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/memo23~fotocasa-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-fotocasa-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "startUrls": {
            "title": "Fotocasa search URLs",
            "type": "array",
            "description": "Full Fotocasa.es search URLs. Each is paginated automatically until `Maximum items` is reached. Start URLs take priority: when one is given, every filter below is ignored.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City, province, neighbourhood or other area in Spain. Used only when Start URLs is empty. Provincial capitals become `madrid-capital` unless Location type is province/region/country."
          },
          "locationType": {
            "title": "Location type",
            "enum": [
              "",
              "country",
              "autonomous_community",
              "province",
              "area",
              "region",
              "municipality",
              "locality",
              "district",
              "neighborhood",
              "urbanization",
              "coast",
              "geographical_area",
              "street",
              "zip_code"
            ],
            "type": "string",
            "description": "Use Province when you want Madrid-the-province, not Madrid capital. Same values as igolaizola/fotocasa-scraper.",
            "default": ""
          },
          "latitude": {
            "title": "Latitude",
            "minimum": -90,
            "maximum": 90,
            "type": "number",
            "description": "Center of a radius filter. Used with Longitude. Listings outside Distance (km) are dropped. Set Location as well so the listing pages have a starting area."
          },
          "longitude": {
            "title": "Longitude",
            "minimum": -180,
            "maximum": 180,
            "type": "number",
            "description": "Center of a radius filter. Used with Latitude."
          },
          "distanceKm": {
            "title": "Distance (km)",
            "minimum": 1,
            "type": "integer",
            "description": "Keep listings inside this radius of Latitude/Longitude. Default 20, same as igolaizola.",
            "default": 20
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "comprar",
              "alquiler",
              "compartir",
              "alquiler-con-opcion-a-compra",
              "traspaso",
              "buy",
              "rent",
              "share",
              "rentBuyOption",
              "transfer"
            ],
            "type": "string",
            "description": "Buy, rent, share, rent-to-buy or transfer. English aliases (buy/rent/share/rentBuyOption/transfer) from igolaizola are accepted.",
            "default": "comprar"
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "viviendas",
              "casas",
              "pisos",
              "atico",
              "duplex",
              "estudio",
              "garajes",
              "oficinas",
              "locales",
              "naves",
              "terrenos",
              "trasteros",
              "edificios",
              "home",
              "newHome",
              "premises",
              "garages",
              "office",
              "boxRoom",
              "land",
              "building"
            ],
            "type": "string",
            "description": "Fotocasa path types plus igolaizola aliases (home, newHome, premises, …). newHome adds the obra-nueva path segment.",
            "default": "viviendas"
          },
          "rooms": {
            "title": "Rooms",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Exact bedroom count, 1 to 4. Fotocasa allows only ONE of Rooms / Feature / Published in last 48 h per search."
          },
          "feature": {
            "title": "Feature",
            "enum": [
              "terraza",
              "ascensor",
              "piscina",
              "jardin",
              "obra-nueva",
              "amueblado",
              "no-amueblado",
              "con-chimenea",
              "con-vistas-al-mar",
              "a-reformar",
              "reformado",
              "lujo",
              "banco",
              "chollo"
            ],
            "type": "string",
            "description": "One Fotocasa feature filter. Only ONE of Rooms / Feature / Published in last 48 h can be used at a time."
          },
          "publishedLast48h": {
            "title": "Published in the last 48 hours",
            "type": "boolean",
            "description": "Same as Publication date = Last 48 hours. Only ONE of Rooms / Feature / Last 48 h / New home / Temporary rent can be used at a time.",
            "default": false
          },
          "publicationDate": {
            "title": "Publication date",
            "enum": [
              "",
              "last48h",
              "lastWeek",
              "lastMonth"
            ],
            "type": "string",
            "description": "last48h uses Fotocasa's own path. lastWeek / lastMonth keep paginating and keep rows by listedDate (Fotocasa has no week/month listing path).",
            "default": ""
          },
          "rentalTypes": {
            "title": "Rental types (rent only)",
            "type": "array",
            "description": "Long-term only drops temporary (seasonal) rentals, which Fotocasa's normal rent search mixes in. Temporary only uses Fotocasa's /alquiler-temporal/ section. Choose both, or neither, to get every rental. Same values as igolaizola.",
            "items": {
              "type": "string",
              "enum": [
                "longTerm",
                "temporary"
              ],
              "enumTitles": [
                "Long-term rental",
                "Temporary rental"
              ]
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "newest",
              "cheapest",
              "most-expensive",
              "largest",
              "smallest",
              "cheapest-per-m2",
              "rating",
              "latest",
              "mostExpensive",
              "biggest",
              "cheapestPerM2"
            ],
            "type": "string",
            "description": "Used only when Start URLs is empty. igolaizola names (rating, latest, mostExpensive, …) are accepted.",
            "default": "relevance"
          },
          "minPrice": {
            "title": "Minimum price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Used only when Start URLs is empty."
          },
          "maxPrice": {
            "title": "Maximum price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Used only when Start URLs is empty."
          },
          "minSurface": {
            "title": "Minimum surface (m2)",
            "minimum": 0,
            "type": "integer",
            "description": "Used only when Start URLs is empty."
          },
          "maxSurface": {
            "title": "Maximum surface (m2)",
            "minimum": 0,
            "type": "integer",
            "description": "Used only when Start URLs is empty."
          },
          "minSize": {
            "title": "Min size (m2) — igolaizola alias of Minimum surface",
            "minimum": 0,
            "type": "integer",
            "description": "Alias of minSurface so an igolaizola input JSON works unchanged."
          },
          "maxSize": {
            "title": "Max size (m2) — igolaizola alias of Maximum surface",
            "minimum": 0,
            "type": "integer",
            "description": "Alias of maxSurface so an igolaizola input JSON works unchanged."
          },
          "flatten": {
            "title": "Flatten nested fields for CSV-friendly output",
            "type": "boolean",
            "description": "When enabled (default), nested objects/arrays (e.g. `address`, `features`, `photos`) are flattened into CSV-friendly columns. Disable to keep the full nested JSON.",
            "default": true
          },
          "fetchDetails": {
            "title": "Fetch full property details (energy certificate, exact address, decoded features)",
            "type": "boolean",
            "description": "If enabled, opens each property's detail page to add the **energy certificate** rating (A–G + value + environmental impact), **exact street + number**, **construction type**, **ground surface**, **quality rating**, the **rent price index**, and a fully **decoded feature list** (ELEVATOR=NO, FURNISHED=YES…). Adds one extra request per property and charges an `additional-data` event each time. Leave off for the fast/cheap search-only output.",
            "default": false
          },
          "monitorMode": {
            "title": "Monitor mode (only new or changed listings)",
            "type": "boolean",
            "description": "For scheduled runs. Remembers each property id in a per-user store. A later run skips an id that is still at the same price and listed date, and emits it again if the price (or listed date) moved. Adds `monitorStatus` (`new` | `changed`) and `previousPrice` on emitted rows. `Maximum items` is still the scan cap.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Namespace for monitor mode so two schedules (e.g. Madrid vs Barcelona) do not share seen-ids. Letters, numbers and dashes only. Leave empty to use `default`."
          },
          "enrichEmails": {
            "title": "Enrich with agency contact emails (experimental, billed per email)",
            "type": "boolean",
            "description": "If enabled, tries to find a contact email for each listing agency by discovering the agency's website (Clearbit) and reading its contact/about pages. Adds contactEmail + contactWebsite columns. Best-effort, billed per email found; never charged for misses.",
            "default": false
          },
          "agencyList": {
            "title": "Return agencies instead of properties",
            "type": "boolean",
            "description": "On: the run returns Spanish real-estate agencies that match the filters below, one row per agency: name, phone, email, website, office address with coordinates, licence number, live listing counts, and the agency's Fotocasa and habitaclia profile links. Search URLs and property filters are ignored, and results arrive in seconds. Each agency row is billed as one result plus one additional-data event.",
            "default": false
          },
          "agencyProvince": {
            "title": "Province",
            "type": "string",
            "description": "Agencies active in this province: with an office there or with listings there, the same as Fotocasa's own agency directory. Spanish, Catalan, Basque and Galician names all work, e.g. Madrid, Barcelona, Málaga, Illes Balears, Bizkaia, A Coruña. Leave empty for all of Spain."
          },
          "agencyOfficeInProvinceOnly": {
            "title": "Only agencies with an office in that province",
            "type": "boolean",
            "description": "Leave out agencies based elsewhere that only list properties in the province (national networks, banks' property arms).",
            "default": false
          },
          "agencyTown": {
            "title": "Town of the office (optional)",
            "type": "string",
            "description": "Only agencies whose office is in this town, e.g. Marbella, Sabadell, Madrid."
          },
          "agencyPostalCodes": {
            "title": "Postal codes of the office (optional)",
            "type": "string",
            "description": "One or more, comma-separated. A full code (28004) or a prefix (280 covers 28000-28099)."
          },
          "agencyName": {
            "title": "Agency name contains (optional)",
            "type": "string",
            "description": "Only agencies whose name contains this text, e.g. Tecnocasa, RE/MAX, Engel."
          },
          "agencyHasEmail": {
            "title": "Only agencies with an email",
            "type": "boolean",
            "description": "Leave out agencies that publish no email address.",
            "default": false
          },
          "agencyHasWebsite": {
            "title": "Only agencies with a website",
            "type": "boolean",
            "description": "Leave out agencies that publish no website.",
            "default": false
          },
          "agencyMinListings": {
            "title": "Minimum live listings",
            "minimum": 0,
            "type": "integer",
            "description": "Only agencies with at least this many properties on Fotocasa right now. Useful to skip one-listing accounts."
          },
          "maxItems": {
            "title": "Maximum items to scrape",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on the number of properties collected. Each search page returns ~30 listings and paginates automatically; use this cap to control billing.",
            "default": 10000
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of rows processed in parallel (mainly relevant when agency-email enrichment is on). 6-12 is the sweet spot.",
            "default": 8
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "type": "integer",
            "description": "Number of retries before a failed request is given up.",
            "default": 5
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Unblocker is selected by default. Fotocasa blocks datacenter IPs; Unblocker is the pool built for anti-bot pages. Switch to RESIDENTIAL or your own proxy URLs only if you have a reason.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "UNBLOCKER"
              ]
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}