{
  "openapi": "3.0.1",
  "info": {
    "title": "Fotocasa Scraper - Spain Property Listings, Rent & Sale",
    "description": "Scrape Fotocasa.es (Spain) homes and commercial property for sale and rent from a search URL or a place name with filters. One record per listing: price, €/m², price drops, m², rooms, floor, address, coordinates, photos, agency. New-listings monitoring. $0.70 per 1,000 listings on Bronze.",
    "version": "0.1",
    "x-build-id": "rfyPMKggGmULUXfcJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/amitaviv~fotocasa-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-amitaviv-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/amitaviv~fotocasa-scraper/runs": {
      "post": {
        "operationId": "runs-sync-amitaviv-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/amitaviv~fotocasa-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-amitaviv-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": "Search URLs",
            "type": "array",
            "description": "Fotocasa search URLs copied from the browser's address bar, e.g. https://www.fotocasa.es/es/alquiler/viviendas/madrid-capital/todas-las-zonas/l?maxPrice=1500&minRooms=2. Each URL is one search; several are fine. Make the search on fotocasa.es (town, district or neighbourhood, with any filters) and paste its URL. All property types (homes, garages, land, commercial premises, offices, storage rooms, buildings) and all deal types (sale, rent, share, holiday rent, business transfer, rent-to-own). The URL's filters and sort order are applied as they are. Use the list view (…/l); a plain map view (…/m) is read as the list of the whole place, and a map with a drawn or moved area is refused. Spanish, Catalan and English versions of the site are accepted; single listing pages (…/d) are not. Default: empty. Leave empty to search by \"location\" instead; both can be used in one run.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "Place (instead of a URL)",
            "type": "string",
            "description": "Instead of (or as well as) a URL: a Spanish town, district, neighbourhood or province as you would type it in Fotocasa's search box, e.g. Valencia, Chamberí, Gràcia Barcelona or Málaga provincia. Separate several with a semicolon (Valencia; Sevilla); each place is one search. The site's first suggestion is used and the run summary shows which place it matched (\"Málaga\" matches the province). Combined with the deal type, property type, price, bedrooms, bathrooms, size and order fields below. Default: empty."
          },
          "transaction": {
            "title": "Sale or rent",
            "enum": [
              "sale",
              "rent",
              "share",
              "holiday-rent",
              "transfer",
              "rent-to-own"
            ],
            "type": "string",
            "description": "Deal type for the places in \"location\" (a pasted URL keeps its own): sale (default), rent (long-term, monthly rent), share (room in a shared flat), holiday-rent, transfer (business transfer, traspaso) or rent-to-own.",
            "default": "sale"
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "home",
              "garage",
              "land",
              "commercial",
              "office",
              "storage-room",
              "building"
            ],
            "type": "string",
            "description": "Property type for the places in \"location\" (a pasted URL keeps its own): home (default; flats, houses, penthouses, studios …), garage, land, commercial (shops and commercial premises), office, storage-room or building.",
            "default": "home"
          },
          "priceMin": {
            "title": "Price from (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest price in whole euros for the places in \"location\", e.g. 800: monthly rent for rentals, total price for sales. Default: no minimum. Not applied to pasted URLs."
          },
          "priceMax": {
            "title": "Price up to (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest price in whole euros, inclusive, for the places in \"location\", e.g. 1500: monthly rent for rentals, total price for sales. Default: no maximum. A value below priceMin fails the run before any request."
          },
          "roomsMin": {
            "title": "Bedrooms from",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum number of bedrooms for the places in \"location\", e.g. 2. Default: no minimum."
          },
          "roomsMax": {
            "title": "Bedrooms up to",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of bedrooms for the places in \"location\", e.g. 3. Default: no maximum. A value below roomsMin fails the run before any request."
          },
          "bathroomsMin": {
            "title": "Bathrooms from",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum number of bathrooms for the places in \"location\", e.g. 2. Default: no minimum."
          },
          "areaMin": {
            "title": "Size from (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum size in square metres (m²) for the places in \"location\", e.g. 60. Default: no minimum."
          },
          "areaMax": {
            "title": "Size up to (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum size in square metres (m²) for the places in \"location\", e.g. 120. Default: no maximum. A value below areaMin fails the run before any request."
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "relevance",
              "newest",
              "cheapest",
              "most-expensive"
            ],
            "type": "string",
            "description": "Order in which the places in \"location\" are read: relevance (Fotocasa's standard order, default), newest, cheapest or most-expensive. It decides which listings you get when maxItemsPerQuery is below the number of results. A pasted URL keeps its own order.",
            "default": "relevance"
          },
          "maxItemsPerQuery": {
            "title": "Max listings per search",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of listings delivered for each search (each URL and each place), from 1 to 1,000,000; default 100. Apart from the start fee you pay only per delivered listing, so this also caps the cost. Fotocasa shows at most 9,900 listings of one search; set this higher to have a larger search read in price bands (see splitLargeSearches).",
            "default": 100
          },
          "splitLargeSearches": {
            "title": "Split large searches",
            "type": "boolean",
            "description": "Only matters when maxItemsPerQuery is above 9,900. On (default): a search with more listings than Fotocasa shows at once is cut into price bands that are read one after the other, cheapest first, so all of it can be delivered; listings without a price (\"price on request\") cannot be reached that way and are counted in the run summary. Off: only the first 9,900 listings of each search.",
            "default": true
          },
          "includePrivateSellerData": {
            "title": "Include private sellers' contact data",
            "type": "boolean",
            "description": "Off (default): for listings published by a private person (or by an advertiser whose type Fotocasa does not state), the name, phone, advertiser id and page are null; the address loses its house number and door, and the coordinates are rounded to about 100 m; phone numbers and e-mail addresses are removed from the description (privateDataRedacted: true). Names written inside the description are not removed. Agencies and developers are delivered in full either way. Switch on only if you have a lawful basis under the GDPR to process private persons' data (for example, their consent); by switching it on you confirm that you do.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new listings (monitoring)",
            "type": "boolean",
            "description": "Off (default): every run delivers the listings it finds. On: return and charge only listings that earlier runs of this actor in your account have not delivered for the same search, for scheduled monitoring. Searches are then read newest first and stop at the first page that holds a known listing. The first run delivers the newest listings up to the maximum and treats the rest of the page it read as seen; later runs deliver only listings that appeared since, so set maxItemsPerQuery above the number of new listings you expect between two runs. The memory is a key-value store named fotocasa-scraper-monitor in your account; delete it to start over.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor name (optional)",
            "type": "string",
            "description": "Only with onlyNew. A free name for the monitor memory, e.g. madrid-daily. Runs with the same search and the same monitor name share one memory; give two schedules different names to keep their memories apart. Default: empty (one shared memory per search)."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Default and recommended: no proxy. Fotocasa's search service answered every request from Apify's own addresses in our tests. If a run reports that it was blocked, switch on Apify Proxy; each retry then goes out from a different address.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}