{
  "openapi": "3.0.1",
  "info": {
    "title": "Fotocasa Scraper: Spain Property Listings, Agency Phones",
    "description": "Scrape property listings from Fotocasa.es, one of Spain's biggest real estate portals. Filter by province, city, price, rooms and size. Export prices, addresses, coordinates, photos and agency phone numbers, or one lead row per agency.",
    "version": "0.1",
    "x-build-id": "kZdmRjMlT69CPinrl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fayoussef~fotocasa-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fayoussef-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/fayoussef~fotocasa-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fayoussef-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/fayoussef~fotocasa-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fayoussef-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": {
          "mode": {
            "title": "What to collect",
            "enum": [
              "listings",
              "agencies"
            ],
            "type": "string",
            "description": "Listings gives one row per property. Agency leads groups the results into one row per real-estate agency, with its phone and how many listings it has.",
            "default": "listings"
          },
          "max_items": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows. Leave empty for everything that matches."
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "sale",
              "rent"
            ],
            "type": "string",
            "description": "Buy or rent.",
            "default": "sale"
          },
          "property_type": {
            "title": "Property type",
            "enum": [
              "viviendas",
              "locales",
              "oficinas",
              "terrenos",
              "garajes",
              "trasteros",
              "edificios"
            ],
            "type": "string",
            "description": "The kind of property to search.",
            "default": "viviendas"
          },
          "provinces": {
            "title": "Provinces",
            "type": "array",
            "description": "One or more provinces. Leave empty, with no cities, to search all of Spain.",
            "items": {
              "type": "string",
              "enum": [
                "a-coruna-provincia",
                "albacete-provincia",
                "alicante-provincia",
                "almeria-provincia",
                "araba-alava-provincia",
                "asturias-provincia",
                "avila-provincia",
                "badajoz-provincia",
                "barcelona-provincia",
                "bizkaia-provincia",
                "burgos-provincia",
                "caceres-provincia",
                "cadiz-provincia",
                "cantabria-provincia",
                "castellon-provincia",
                "ceuta-provincia",
                "ciudad-real-provincia",
                "cordoba-provincia",
                "cuenca-provincia",
                "gipuzkoa-provincia",
                "girona-provincia",
                "granada-provincia",
                "guadalajara-provincia",
                "huelva-provincia",
                "huesca-provincia",
                "illes-balears-provincia",
                "jaen-provincia",
                "la-rioja-provincia",
                "las-palmas-provincia",
                "leon-provincia",
                "lleida-provincia",
                "lugo-provincia",
                "madrid-provincia",
                "malaga-provincia",
                "melilla-provincia",
                "murcia-provincia",
                "navarra-provincia",
                "ourense-provincia",
                "palencia-provincia",
                "pontevedra-provincia",
                "salamanca-provincia",
                "santa-cruz-de-tenerife-provincia",
                "segovia-provincia",
                "sevilla-provincia",
                "soria-provincia",
                "tarragona-provincia",
                "teruel-provincia",
                "toledo-provincia",
                "valencia-provincia",
                "valladolid-provincia",
                "zamora-provincia",
                "zaragoza-provincia"
              ],
              "enumTitles": [
                "A Coruña",
                "Albacete",
                "Alicante",
                "Almería",
                "Araba - Álava",
                "Asturias",
                "Ávila",
                "Badajoz",
                "Barcelona",
                "Bizkaia",
                "Burgos",
                "Cáceres",
                "Cádiz",
                "Cantabria",
                "Castellón",
                "Ceuta",
                "Ciudad Real",
                "Córdoba",
                "Cuenca",
                "Gipuzkoa",
                "Girona",
                "Granada",
                "Guadalajara",
                "Huelva",
                "Huesca",
                "Illes Balears",
                "Jaén",
                "La Rioja",
                "Las Palmas",
                "León",
                "Lleida",
                "Lugo",
                "Madrid",
                "Málaga",
                "Melilla",
                "Murcia",
                "Navarra",
                "Ourense",
                "Palencia",
                "Pontevedra",
                "Salamanca",
                "Santa Cruz de Tenerife",
                "Segovia",
                "Sevilla",
                "Soria",
                "Tarragona",
                "Teruel",
                "Toledo",
                "Valencia",
                "Valladolid",
                "Zamora",
                "Zaragoza"
              ]
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "City names, for example Madrid or Barcelona. Searches the city itself, not the whole province.",
            "items": {
              "type": "string"
            }
          },
          "price_from": {
            "title": "Min price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest price."
          },
          "price_to": {
            "title": "Max price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest price."
          },
          "rooms_from": {
            "title": "Min rooms",
            "minimum": 0,
            "type": "integer",
            "description": "Fewest bedrooms."
          },
          "rooms_to": {
            "title": "Max rooms",
            "minimum": 0,
            "type": "integer",
            "description": "Most bedrooms."
          },
          "bathrooms_from": {
            "title": "Min bathrooms",
            "minimum": 0,
            "type": "integer",
            "description": "Fewest bathrooms."
          },
          "surface_from_m2": {
            "title": "Min surface (m2)",
            "minimum": 0,
            "type": "integer",
            "description": "Smallest surface."
          },
          "surface_to_m2": {
            "title": "Max surface (m2)",
            "minimum": 0,
            "type": "integer",
            "description": "Largest surface."
          },
          "sort_by": {
            "title": "Sort by",
            "enum": [
              "newest",
              "price_asc",
              "price_desc",
              "relevance"
            ],
            "type": "string",
            "description": "Order of the results.",
            "default": "newest"
          },
          "start_urls": {
            "title": "Fotocasa search URLs",
            "type": "array",
            "description": "Paste search results URLs from fotocasa.es. When set, the location and filter fields above are ignored.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave as is. Paid plans get a proxy included, free plans use Apify residential. Add your own proxy URLs here only if you prefer them."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}