{
  "openapi": "3.0.1",
  "info": {
    "title": "Fotocasa Spain Property Listings Scraper",
    "description": "Extract structured Fotocasa property listings across Spain. Filter by location, sale or rent, property type, price, size, rooms and bathrooms, then receive unique listings with prices, photos, agency details and source URLs in your Dataset.",
    "version": "0.1",
    "x-build-id": "o9VNTQIdk9Jw3KP4R"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datascraperes~fotocasa-property-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datascraperes-fotocasa-property-search-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/datascraperes~fotocasa-property-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-datascraperes-fotocasa-property-search-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/datascraperes~fotocasa-property-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-datascraperes-fotocasa-property-search-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": {
          "searchUrls": {
            "title": "Search URLs — easiest option",
            "type": "array",
            "description": "Copy the results-page URL after selecting your location and filters on Fotocasa. Paste one URL per entry. These URLs define the operation, property type, filters and sorting; the location controls below are ignored. Clear this list before using Search by location.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum listings",
            "minimum": 30,
            "maximum": 1000,
            "type": "integer",
            "description": "Optional. Stop after this many unique listings across all searches (30–1,000). If omitted, use 30. This is a limit, not a guarantee: fewer matching listings may be available. Only unique listings saved to the Dataset are charged.",
            "default": 30
          },
          "locationQuery": {
            "title": "Location (optional alternative)",
            "type": "string",
            "description": "Optional place name, for example Madrid or Valencia. Clear Search URLs first. Leave this blank when using URLs. If the place is ambiguous, specify a more precise name or choose its location level."
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "buy",
              "rent",
              "share"
            ],
            "type": "string",
            "description": "Optional for location searches. Buy is the default. Ignored when Search URLs is populated; the URL already specifies the operation.",
            "default": "buy"
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "homes",
              "premises",
              "garages",
              "offices",
              "boxRooms",
              "lands",
              "buildings"
            ],
            "type": "string",
            "description": "Optional for location searches. Homes is the default. Ignored when Search URLs is populated.",
            "default": "homes"
          },
          "sortBy": {
            "title": "Listing order",
            "enum": [
              "rating",
              "latest",
              "cheapest",
              "mostExpensive",
              "biggest",
              "smallest",
              "cheapestPerM2"
            ],
            "type": "string",
            "description": "Optional for location searches. Default: Fotocasa relevance. For URL searches, sorting comes from the URL.",
            "default": "rating"
          },
          "locationLevel": {
            "title": "Location level (if ambiguous)",
            "enum": [
              "MUNICIPALITY",
              "PROVINCE",
              "REGION",
              "DISTRICT",
              "NEIGHBORHOOD"
            ],
            "type": "string",
            "description": "Optional. Helps match the Location text to the right kind of place. Default: city or municipality. Used only with Location; for exact districts or neighbourhoods, you can also use a Fotocasa search URL.",
            "default": "MUNICIPALITY"
          },
          "minPrice": {
            "title": "Minimum price (optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional minimum price for location searches only. Leave blank for no minimum bound. Enter a whole number, zero or greater. Must not exceed the maximum."
          },
          "maxPrice": {
            "title": "Maximum price (optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional maximum price for location searches only. Leave blank for no maximum bound. Enter a whole number, zero or greater. Must not be below the minimum."
          },
          "minSurface": {
            "title": "Minimum surface (optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional minimum surface for location searches only. Leave blank for no minimum bound. Enter a whole number, zero or greater. Must not exceed the maximum."
          },
          "maxSurface": {
            "title": "Maximum surface (optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional maximum surface for location searches only. Leave blank for no maximum bound. Enter a whole number, zero or greater. Must not be below the minimum."
          },
          "minRooms": {
            "title": "Minimum rooms (optional)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Optional minimum rooms for location searches only. Leave blank for no minimum bound. Enter a whole number from 1 to 10. Must not exceed the maximum."
          },
          "maxRooms": {
            "title": "Maximum rooms (optional)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Optional maximum rooms for location searches only. Leave blank for no maximum bound. Enter a whole number from 1 to 10. Must not be below the minimum."
          },
          "minBathrooms": {
            "title": "Minimum bathrooms (optional)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Optional minimum bathrooms for location searches only. Leave blank for no minimum bound. Enter a whole number from 1 to 10. Must not exceed the maximum."
          },
          "maxBathrooms": {
            "title": "Maximum bathrooms (optional)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Optional maximum bathrooms for location searches only. Leave blank for no maximum bound. Enter a whole number from 1 to 10. Must not be below the minimum."
          },
          "locationSlug": {
            "title": "Location slug",
            "type": "string",
            "description": "Optional advanced JSON/API field: Fotocasa URL location segment, for example madrid-capital. Default: madrid-capital. Used only when Search URLs and Location are absent. Preserved for existing integrations."
          },
          "additionalQueryParameters": {
            "title": "Advanced public URL parameters",
            "type": "string",
            "description": "Optional advanced JSON/API field: JSON object encoded as text, for example {\"featureIds\":\"1;2\"}. Used only for generated location/slug searches, not Search URLs. Scalar text, finite numbers and booleans only; structured fields take priority. For the form, copy a filtered Fotocasa URL instead."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}