{
  "openapi": "3.0.1",
  "info": {
    "title": "Fotocasa Scraper: Spain Property Listings",
    "description": "Scrape Fotocasa.es property listings (inmuebles) in Spain from a search URL or filters. Extract price, EUR/m², price drops, rooms, baths, m², amenities, optional energy certificate, address, coordinates, agency contacts, days on market, and monitor mode.",
    "version": "0.2",
    "x-build-id": "WhjryZM0wLLoxMabb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kareninatech~fotocasa-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kareninatech-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/kareninatech~fotocasa-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kareninatech-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/kareninatech~fotocasa-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kareninatech-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": {
          "input_url": {
            "title": "Input URL",
            "type": "string",
            "description": "Optional. Paste a Fotocasa search results URL after filtering on the website (it ends in /l, for example https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l). When set, it overrides all the filters below. Leave empty to use structured filters, which is better for AI agents."
          },
          "start_urls": {
            "title": "Extra search URLs",
            "type": "array",
            "description": "Optional. More Fotocasa search result URLs to scrape in the same run. Also overrides the filters.",
            "items": {
              "type": "string"
            }
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "comprar",
              "alquiler",
              "compartir",
              "traspaso",
              "alquiler-con-opcion-a-compra"
            ],
            "type": "string",
            "description": "Buy, rent, shared room, transfer, or rent-to-buy. Ignored when input_url is set.",
            "default": "comprar"
          },
          "property_type": {
            "title": "Property type",
            "enum": [
              "viviendas",
              "pisos",
              "aticos",
              "duplex",
              "estudios",
              "lofts",
              "bajos",
              "chalets",
              "adosados",
              "casas-rurales",
              "oficinas",
              "locales",
              "garajes",
              "terrenos",
              "trasteros",
              "naves-industriales",
              "edificios"
            ],
            "type": "string",
            "description": "Same category slugs as on Fotocasa. Ignored when input_url is set.",
            "default": "viviendas"
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Fotocasa location slug, for example madrid-capital, barcelona-capital, valencia-provincia or espana. A plain city name like Sevilla also works: the scraper tries sevilla, then sevilla-capital, then sevilla-provincia. Ignored when input_url is set.",
            "default": "madrid-capital"
          },
          "locations": {
            "title": "More locations",
            "type": "array",
            "description": "Optional. Search several cities in one run. Each uses the same operation, property type, zone and filters. Ignored when input_url is set.",
            "items": {
              "type": "string"
            }
          },
          "zone": {
            "title": "Zone",
            "type": "string",
            "description": "Optional neighborhood or district slug used by Fotocasa inside the location, for example barrio-de-salamanca or chamberi for madrid-capital. Leave empty for all zones (todas-las-zonas).",
            "default": ""
          },
          "min_price": {
            "title": "Min price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price. For rentals this is the monthly rent."
          },
          "max_price": {
            "title": "Max price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price. For rentals this is the monthly rent."
          },
          "min_rooms": {
            "title": "Min bedrooms",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Minimum number of bedrooms, for example 2. Leave empty for no minimum."
          },
          "max_rooms": {
            "title": "Max bedrooms",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum number of bedrooms, for example 4. Leave empty for no maximum."
          },
          "min_bathrooms": {
            "title": "Min bathrooms",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Minimum number of bathrooms, for example 1. Leave empty for no minimum."
          },
          "min_surface": {
            "title": "Min surface (m2)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum built surface in square metres, for example 60. Leave empty for no minimum."
          },
          "max_surface": {
            "title": "Max surface (m2)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum built surface in square metres, for example 180. Leave empty for no maximum."
          },
          "sort_by": {
            "title": "Sort by",
            "enum": [
              "",
              "newest",
              "price_asc",
              "price_desc",
              "surface_desc",
              "surface_asc"
            ],
            "type": "string",
            "description": "Order of results. Empty keeps Fotocasa's default relevance order. Ignored when input_url is set.",
            "default": ""
          },
          "max_properties": {
            "title": "Max properties",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of listings to return per run (up to 1000).",
            "default": 100
          },
          "include_full_description": {
            "title": "Include full description",
            "type": "boolean",
            "description": "Adds the full listing description. A short description_snippet is always included.",
            "default": true
          },
          "fetch_details": {
            "title": "Fetch full property details",
            "type": "boolean",
            "description": "Open each listing detail page for energy certificate (A-G + consumption + emissions), agency website/email when present, Spanish amenity list, construction type and exact street number. One extra request per property.",
            "default": false
          },
          "monitor_mode": {
            "title": "Monitor mode (only new or changed)",
            "type": "boolean",
            "description": "Remember listing ids across runs in a named key-value store. Later runs skip listings that still have the same price and listed date, and emit rows with monitor_status new or changed when something moved. Pair with Apify Schedules for alerts.",
            "default": false
          },
          "monitor_key": {
            "title": "Monitor key",
            "type": "string",
            "description": "Namespace for monitor mode so two schedules (for example Madrid vs Barcelona) do not share seen ids. Letters, numbers and dashes only. Leave empty for default.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Apify Proxy is recommended. If you see blocks, switch to the RESIDENTIAL group with country ES.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}