{
  "openapi": "3.0.1",
  "info": {
    "title": "Fotocasa Scraper - Spanish Property Listings",
    "description": "[Limited Launch Offer $0.75/1K] Fotocasa scraper: homes for sale and rent by city, province or URL with price, rooms, m², coordinates, images and agency phone. No limit. No login.",
    "version": "0.1",
    "x-build-id": "qfzAhzwqqQ65YL22h"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kalilfagundes.w~fotocasa-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kalilfagundes.w-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/kalilfagundes.w~fotocasa-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kalilfagundes.w-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/kalilfagundes.w~fotocasa-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kalilfagundes.w-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": {
          "locations": {
            "title": "Locations (locations)",
            "type": "array",
            "description": "One per line: a city or province such as \"Madrid\", \"Barcelona\", \"Getafe\", \"Madrid provincia\". A provincial capital means the city (Madrid = madrid-capital); add \"provincia\" for the whole province. Every location is searched for each transaction and property type below.",
            "items": {
              "type": "string"
            }
          },
          "transactions": {
            "title": "Buy or rent (transactions)",
            "type": "array",
            "description": "Listings for sale, for rent, or both.",
            "items": {
              "type": "string",
              "enum": [
                "buy",
                "rent"
              ],
              "enumTitles": [
                "Buy",
                "Rent"
              ]
            },
            "default": [
              "buy"
            ]
          },
          "propertyTypes": {
            "title": "Property types (propertyTypes)",
            "type": "array",
            "description": "What to search for. Default: all homes. Rentals exist for homes, commercial premises, offices and garages.",
            "items": {
              "type": "string",
              "enum": [
                "viviendas",
                "pisos",
                "apartamentos",
                "chalets",
                "locales",
                "oficinas",
                "garajes",
                "terrenos",
                "trasteros",
                "edificios",
                "naves-industriales"
              ],
              "enumTitles": [
                "Homes (all)",
                "Flats",
                "Apartments",
                "Houses and chalets",
                "Commercial premises",
                "Offices",
                "Garages",
                "Land",
                "Storage rooms",
                "Buildings",
                "Industrial units"
              ]
            },
            "default": [
              "viviendas"
            ]
          },
          "searchUrls": {
            "title": "Fotocasa search URLs (searchUrls)",
            "type": "array",
            "description": "Optional. Search pages copied from your browser, e.g. https://www.fotocasa.es/es/comprar/viviendas/madrid-capital/todas-las-zonas/l?maxPrice=300000. Filters in the URL are kept. Used together with the locations above.",
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerSearch": {
            "title": "Max listings per search (maxResultsPerSearch)",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many listings for each location, transaction and property type (0 = all of them). A big city has more than 10,000: every page is reachable.",
            "default": 100
          },
          "maxItems": {
            "title": "Max listings in total (maxItems)",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap for the whole run (0 = no cap). Keeps the cost predictable.",
            "default": 1000
          },
          "minPrice": {
            "title": "Price from, EUR (minPrice)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price (monthly rent for rentals) in EUR."
          },
          "maxPrice": {
            "title": "Price to, EUR (maxPrice)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price (monthly rent for rentals) in EUR."
          },
          "minRooms": {
            "title": "Rooms from (minRooms)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum number of rooms."
          },
          "minBathrooms": {
            "title": "Bathrooms from (minBathrooms)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum number of bathrooms."
          },
          "minSurface": {
            "title": "Surface from, m² (minSurface)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum surface in square metres."
          },
          "maxSurface": {
            "title": "Surface to, m² (maxSurface)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum surface in square metres."
          },
          "sortBy": {
            "title": "Order (sortBy)",
            "enum": [
              "relevance",
              "newest",
              "price"
            ],
            "type": "string",
            "description": "Sort order of the search. \"Newest first\" is the one for monitoring new listings with a schedule.",
            "default": "relevance"
          },
          "maxImages": {
            "title": "Images per listing (maxImages)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "How many image links to include per listing (0 = none; imageCount always holds the total).",
            "default": 5
          },
          "maxConcurrency": {
            "title": "Pages in parallel (maxConcurrency)",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many result pages are fetched at the same time. Keep it low: pages are about 1.4 MB.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy (proxyConfiguration)",
            "type": "object",
            "description": "Default: no proxy, fastest and cheapest. If Fotocasa refuses requests the scraper switches to Apify residential proxies by itself. Choose a proxy group to use it from the start.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}