{
  "openapi": "3.0.1",
  "info": {
    "title": "Fotocasa Spain Sale & Rental Listings Scraper",
    "description": "Search Fotocasa listings for sale or rent across Spain by city, property type, price range, and bedrooms. Each result includes price, size, bedrooms, bathrooms, location, images, and the listing URL.",
    "version": "2.2",
    "x-build-id": "5VP42leRffobQEC1N"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vexaloom-labs~fotocasa-spain-sale-and-rental-listings-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vexaloom-labs-fotocasa-spain-sale-and-rental-listings-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/vexaloom-labs~fotocasa-spain-sale-and-rental-listings-scraper/runs": {
      "post": {
        "operationId": "runs-sync-vexaloom-labs-fotocasa-spain-sale-and-rental-listings-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/vexaloom-labs~fotocasa-spain-sale-and-rental-listings-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-vexaloom-labs-fotocasa-spain-sale-and-rental-listings-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "startUrls",
              "propertyUrls"
            ],
            "type": "string",
            "description": "How to find listings: search by location, scrape Fotocasa search URLs, or scrape individual property URLs/IDs.",
            "default": "search"
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "City, province, district, neighborhood, street or ZIP code, e.g. Madrid, Barcelona, Sitges, 28001. Used in Search by location mode.",
            "default": ""
          },
          "locationType": {
            "title": "Location type",
            "enum": [
              "auto",
              "country",
              "autonomousCommunity",
              "province",
              "municipality",
              "district",
              "neighborhood",
              "locality",
              "street",
              "zipCode"
            ],
            "type": "string",
            "description": "Narrow ambiguous place names to a level. Auto picks the best match (usually the municipality).",
            "default": "auto"
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "sale",
              "rent",
              "share",
              "rentToBuy",
              "transfer"
            ],
            "type": "string",
            "description": "Sale, rent, room share, rent-to-buy or business transfer.",
            "default": "sale"
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "all",
              "homes",
              "flats",
              "penthouses",
              "studios",
              "duplex",
              "lofts",
              "chalets",
              "garages",
              "land",
              "premises",
              "offices",
              "storageRooms",
              "buildings",
              "newConstruction"
            ],
            "type": "string",
            "description": "Property category. Subtypes such as penthouses, studios and duplex are preserved instead of being collapsed into homes.",
            "default": "homes"
          },
          "minPrice": {
            "title": "Minimum price (EUR)",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Server-side minimum sale price or monthly rent."
          },
          "maxPrice": {
            "title": "Maximum price (EUR)",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Server-side maximum sale price or monthly rent."
          },
          "minRooms": {
            "title": "Minimum bedrooms",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Server-side minimum number of bedrooms."
          },
          "maxRooms": {
            "title": "Maximum bedrooms",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Server-side maximum number of bedrooms."
          },
          "minBathrooms": {
            "title": "Minimum bathrooms",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Server-side minimum number of bathrooms."
          },
          "maxBathrooms": {
            "title": "Maximum bathrooms",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Server-side maximum number of bathrooms."
          },
          "minSurface": {
            "title": "Minimum surface (m²)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Server-side minimum built surface."
          },
          "maxSurface": {
            "title": "Maximum surface (m²)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Server-side maximum built surface."
          },
          "features": {
            "title": "Features",
            "uniqueItems": true,
            "type": "array",
            "description": "Only listings with these features. Multiple selections are combined (AND). Leave empty for no feature filter.",
            "items": {
              "type": "string",
              "enum": [
                "elevator",
                "terrace",
                "balcony",
                "pool",
                "garden",
                "parking",
                "storageRoom",
                "airConditioning",
                "heating",
                "furnished",
                "notFurnished",
                "internet",
                "petsAllowed",
                "bankOwned",
                "subsidised"
              ],
              "enumTitles": [
                "Lift",
                "Terrace",
                "Balcony",
                "Pool",
                "Garden",
                "Parking",
                "Storage room",
                "Air conditioning",
                "Heating",
                "Furnished",
                "Not furnished",
                "Internet",
                "Pets allowed",
                "Bank-owned",
                "Subsidised housing"
              ]
            },
            "default": []
          },
          "publishedSince": {
            "title": "Published since",
            "enum": [
              "any",
              "last24h",
              "last48h",
              "last7d",
              "last30d"
            ],
            "type": "string",
            "description": "Only keep listings published inside this window. Searches newest-first and stops at the cutoff.",
            "default": "any"
          },
          "rentalType": {
            "title": "Rental duration",
            "enum": [
              "any",
              "longTerm",
              "temporary"
            ],
            "type": "string",
            "description": "For rent searches only: long-term or temporary rental. Uses Fotocasa's rental path filter.",
            "default": "any"
          },
          "ownerType": {
            "title": "Owner type",
            "enum": [
              "any",
              "private",
              "agency"
            ],
            "type": "string",
            "description": "Private owners or professional agencies. Private-only uses Fotocasa's particulares path.",
            "default": "any"
          },
          "onlyPriceDrops": {
            "title": "Only price drops",
            "type": "boolean",
            "description": "Only emit listings that show a price reduction.",
            "default": false
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "newest",
              "oldest",
              "priceAsc",
              "priceDesc",
              "surfaceAsc",
              "surfaceDesc"
            ],
            "type": "string",
            "description": "Verified Fotocasa sort orders.",
            "default": "relevance"
          },
          "maxItems": {
            "title": "Maximum listings",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on emitted listings (1–10,000). Above ~9,900 rows the actor automatically splits the search into price buckets.",
            "default": 100
          },
          "startUrls": {
            "title": "Search URLs",
            "type": "array",
            "description": "Fotocasa search URLs to scrape. Filters in each URL win over the form fields. Property URLs found here are routed to detail mode.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "propertyUrls": {
            "title": "Property URLs or IDs",
            "type": "array",
            "description": "Individual Fotocasa detail URLs, new-construction project URLs, or numeric property IDs.",
            "items": {
              "type": "string"
            }
          },
          "fetchDetails": {
            "title": "Fetch details",
            "type": "boolean",
            "description": "Fetch each listing's detail page to add energy certificate, agency phone and registrations, exact street, ground surface and extra features. Slower and more requests.",
            "default": false
          },
          "maxDetails": {
            "title": "Maximum detail pages",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Limit detail requests when Fetch details is on. 0 means all emitted listings.",
            "default": 100
          },
          "monitorMode": {
            "title": "Monitor mode",
            "type": "boolean",
            "description": "Emit only new listings and listings whose price changed, using Actor state between runs. The state key is namespaced by monitorKey or the search filters.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Optional namespace for monitor state. Leave empty to derive it from the search filters.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}