{
  "openapi": "3.0.1",
  "info": {
    "title": "Fotocasa Scraper: Spain Property Listings for Sale and Rent",
    "description": "Scrape fotocasa.es property listings in Spain by city, district or pasted search URL: price, price drop, m², rooms, floor, condition, full address, GPS, description, photos, agency name and phone. $0.80 per 1,000 listings.",
    "version": "0.1",
    "x-build-id": "ZMuN18m02qAr0WGk2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tagadanar~fotocasa-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tagadanar-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/tagadanar~fotocasa-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tagadanar-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/tagadanar~fotocasa-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tagadanar-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",
            "type": "array",
            "description": "Places in Spain, resolved with fotocasa's own place search: a city (\"Madrid\", \"Valencia\"), a district or neighbourhood (\"Chamberí, Madrid\"), a province or region. Add \", <city or province>\" after the name to pick between places with the same name. Up to 50 locations + URLs per run.",
            "items": {
              "type": "string"
            }
          },
          "searchUrls": {
            "title": "Fotocasa search URLs",
            "type": "array",
            "description": "Optional: search result URLs copied from fotocasa.es (e.g. https://www.fotocasa.es/es/alquiler/viviendas/barcelona-capital/todas-las-zonas/l?maxPrice=1200). Each URL keeps its own place, operation, property type, sort and filters; the filter fields below do not change it.",
            "items": {
              "type": "string"
            }
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "BUY",
              "RENT",
              "SHARE",
              "TRANSFER",
              "RENT_TO_OWN"
            ],
            "type": "string",
            "description": "Buy (for sale), rent, share (rooms), transfer of a business, or rent with an option to buy. Applies to Locations.",
            "default": "BUY"
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "HOMES",
              "GARAGES",
              "LAND",
              "COMMERCIAL_PREMISES",
              "OFFICES",
              "STORAGE_ROOMS",
              "BUILDINGS"
            ],
            "type": "string",
            "description": "What kind of property. Applies to Locations.",
            "default": "HOMES"
          },
          "minPrice": {
            "title": "Min price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest price in euros (monthly rent for rentals). Leave empty for no minimum."
          },
          "maxPrice": {
            "title": "Max price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest price in euros (monthly rent for rentals). Leave empty for no maximum."
          },
          "minSize": {
            "title": "Min size (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Smallest built area in square metres."
          },
          "maxSize": {
            "title": "Max size (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Largest built area in square metres."
          },
          "minRooms": {
            "title": "Min bedrooms",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "At least this many bedrooms (1 to 4; 4 means 4 or more)."
          },
          "minBathrooms": {
            "title": "Min bathrooms",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "At least this many bathrooms (1 to 3; 3 means 3 or more)."
          },
          "publishedWithin": {
            "title": "Published within",
            "enum": [
              "ANY",
              "LAST_24_HOURS",
              "LAST_48_HOURS",
              "LAST_WEEK",
              "LAST_MONTH"
            ],
            "type": "string",
            "description": "Only listings published recently, as filtered by the site.",
            "default": "ANY"
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "RELEVANCE",
              "NEWEST",
              "PRICE_LOW",
              "PRICE_HIGH",
              "SIZE_LARGE",
              "PRICE_PER_SQM_LOW"
            ],
            "type": "string",
            "description": "Order of the results, as on the site. With a cap, this decides which listings you get first.",
            "default": "RELEVANCE"
          },
          "maxItems": {
            "title": "Max listings per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Total listings to deliver in this run (you pay per listing). Default 100, max 10,000.",
            "default": 100
          },
          "maxItemsPerSearch": {
            "title": "Max listings per search",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Optional cap for each location or URL, so one big city does not use the whole run. 0 = no per-search cap.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}