{
  "openapi": "3.0.1",
  "info": {
    "title": "Habitaclia Scraper",
    "description": "Spanish property listings from habitaclia with the agency email and phone on every agency listing: homes, new builds, offices, premises, parking and land, for sale or rent, anywhere in Spain. Price per m2, price drops, energy rating, 28 features and new-listing tracking.",
    "version": "1.0",
    "x-build-id": "fSGV1UxE057qpAKsp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/normdata~habitaclia-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-normdata-habitaclia-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/normdata~habitaclia-scraper/runs": {
      "post": {
        "operationId": "runs-sync-normdata-habitaclia-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/normdata~habitaclia-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-normdata-habitaclia-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": {
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "type": "integer",
            "description": "Caps how many listings this run writes. Leave empty to collect every match."
          },
          "operation": {
            "title": "Buy or rent",
            "enum": [
              "comprar",
              "alquiler"
            ],
            "type": "string",
            "description": "Listings for sale or for rent.",
            "default": "comprar"
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "viviendas",
              "obra-nueva",
              "oficinas",
              "locales_comerciales",
              "aparcamientos",
              "industriales",
              "inversiones",
              "terrenos_y_solares"
            ],
            "type": "string",
            "description": "Homes, new build homes, offices, commercial premises, parking spaces, industrial buildings, whole buildings, or land.",
            "default": "viviendas"
          },
          "subtypes": {
            "title": "Home subtypes",
            "type": "array",
            "description": "Only these kinds of home, e.g. penthouses and duplexes. Homes only.",
            "items": {
              "type": "string",
              "enum": [
                "FLAT",
                "APARTMENT",
                "PENTHOUSE",
                "DUPLEX",
                "LOFT",
                "GROUND_FLOOR",
                "STUDIO",
                "HOUSE",
                "CHALET",
                "TERRACED_HOUSE",
                "PAIRED_HOUSE",
                "RUSTIC_HOUSE"
              ],
              "enumTitles": [
                "Flat",
                "Apartment",
                "Penthouse",
                "Duplex",
                "Loft",
                "Ground floor flat",
                "Studio",
                "House",
                "Chalet",
                "Terraced house",
                "Semi-detached house",
                "Country house"
              ]
            }
          },
          "places": {
            "title": "Places",
            "type": "array",
            "description": "Cities, towns, comarcas, or districts as you would write them, e.g. \"Barcelona\", \"Sabadell\", \"Vallès Occidental\", \"Chamberí\". Add the city or province after a comma when a name exists in several places, e.g. \"Eixample, Barcelona\". An unknown name stops the run with suggestions.",
            "items": {
              "type": "string"
            }
          },
          "provinces": {
            "title": "Whole provinces",
            "type": "array",
            "description": "Search entire provinces. Leave both this and Places empty to search all of Spain.",
            "items": {
              "type": "string",
              "enum": [
                "a-coruna-provincia",
                "araba-alava-provincia",
                "albacete-provincia",
                "alicante-provincia",
                "almeria-provincia",
                "andorra-provincia",
                "asturias-provincia",
                "avila-provincia",
                "badajoz-provincia",
                "barcelona-provincia",
                "burgos-provincia",
                "caceres-provincia",
                "cadiz-provincia",
                "cantabria-provincia",
                "castellon-provincia",
                "ceuta-provincia",
                "ciudad-real-provincia",
                "cordoba-provincia",
                "cuenca-provincia",
                "girona-provincia",
                "granada-provincia",
                "guadalajara-provincia",
                "gipuzkoa-provincia",
                "huelva-provincia",
                "huesca-provincia",
                "illes-balears-provincia",
                "jaen-provincia",
                "la-rioja-provincia",
                "las-palmas-provincia",
                "leon-provincia",
                "lleida-provincia",
                "lugo-provincia",
                "madrid-provincia",
                "malaga-provincia",
                "melilla-provincia",
                "murcia-provincia",
                "navarra-provincia",
                "ourense-provincia",
                "palencia-provincia",
                "pontevedra-provincia",
                "salamanca-provincia",
                "santa-cruz-de-tenerife-provincia",
                "segovia-provincia",
                "sevilla-provincia",
                "soria-provincia",
                "tarragona-provincia",
                "teruel-provincia",
                "toledo-provincia",
                "valencia-provincia",
                "valladolid-provincia",
                "bizkaia-provincia",
                "zamora-provincia",
                "zaragoza-provincia"
              ],
              "enumTitles": [
                "A Coruña",
                "Álava",
                "Albacete",
                "Alicante",
                "Almería",
                "Andorra",
                "Asturias",
                "Ávila",
                "Badajoz",
                "Barcelona",
                "Burgos",
                "Cáceres",
                "Cádiz",
                "Cantabria",
                "Castellón",
                "Ceuta",
                "Ciudad Real",
                "Córdoba",
                "Cuenca",
                "Girona",
                "Granada",
                "Guadalajara",
                "Guipúzcoa",
                "Huelva",
                "Huesca",
                "Illes Balears",
                "Jaén",
                "La Rioja",
                "Las Palmas",
                "León",
                "Lleida",
                "Lugo",
                "Madrid",
                "Málaga",
                "Melilla",
                "Murcia",
                "Navarra",
                "Ourense",
                "Palencia",
                "Pontevedra",
                "Salamanca",
                "Santa Cruz de Tenerife",
                "Segovia",
                "Sevilla",
                "Soria",
                "Tarragona",
                "Teruel",
                "Toledo",
                "Valencia",
                "Valladolid",
                "Vizcaya",
                "Zamora",
                "Zaragoza"
              ]
            }
          },
          "priceMin": {
            "title": "Minimum price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest asking price in euros (monthly rent when renting)."
          },
          "priceMax": {
            "title": "Maximum price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest asking price in euros (monthly rent when renting)."
          },
          "surfaceMin": {
            "title": "Minimum size (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Smallest built surface in square metres."
          },
          "surfaceMax": {
            "title": "Maximum size (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Largest built surface in square metres."
          },
          "roomsMin": {
            "title": "Minimum bedrooms",
            "enum": [
              "any",
              "1",
              "2",
              "3",
              "4",
              "5"
            ],
            "type": "string",
            "description": "Fewest bedrooms.",
            "default": "any"
          },
          "roomsMax": {
            "title": "Maximum bedrooms",
            "enum": [
              "any",
              "1",
              "2",
              "3",
              "4",
              "5"
            ],
            "type": "string",
            "description": "Most bedrooms.",
            "default": "any"
          },
          "bathroomsMin": {
            "title": "Minimum bathrooms",
            "enum": [
              "any",
              "1",
              "2",
              "3",
              "4"
            ],
            "type": "string",
            "description": "Fewest bathrooms.",
            "default": "any"
          },
          "features": {
            "title": "Must have",
            "type": "array",
            "description": "Every feature chosen must be present, e.g. swimming pool, terrace, lift, parking. Pets allowed is mostly listed on rentals, and smoke outlet on commercial premises.",
            "items": {
              "type": "string",
              "enum": [
                "POOL",
                "TERRACE",
                "ELEVATOR",
                "PRIVATE_GARDEN",
                "PRIVATE_PARKING",
                "FURNISHED",
                "AIR_CONDITIONER",
                "STORAGE_ROOM",
                "BALCONY",
                "PRIVATE_POOL",
                "COMMUNITY_POOL",
                "EQUIPPED_KITCHEN",
                "WARDROBES",
                "SUITE_BATHROOM",
                "DOORMAN",
                "SECURITY_DOOR",
                "ALARM",
                "SURVEILLANCE_SYSTEM",
                "COMMUNITY_AREA",
                "CHILDREN_AREA",
                "GYM",
                "SPORTS_AREA",
                "PETS_ALLOWED",
                "FIREPLACE",
                "HOME_AUTOMATION",
                "NEARBY_PUBLIC_TRANSPORT",
                "YARD",
                "SMOKE_OUTLET"
              ],
              "enumTitles": [
                "Swimming pool",
                "Terrace",
                "Lift",
                "Private garden",
                "Private parking",
                "Furnished",
                "Air conditioning",
                "Storage room",
                "Balcony",
                "Private pool",
                "Community pool",
                "Equipped kitchen",
                "Built-in wardrobes",
                "En suite bathroom",
                "Doorman",
                "Security door",
                "Alarm",
                "Surveillance system",
                "Community area",
                "Children area",
                "Gym",
                "Sports area",
                "Pets allowed",
                "Fireplace",
                "Home automation",
                "Near public transport",
                "Yard",
                "Smoke outlet"
              ]
            }
          },
          "conditions": {
            "title": "Condition",
            "type": "array",
            "description": "Only homes in one of these states, e.g. needs renovation for investors.",
            "items": {
              "type": "string",
              "enum": [
                "NEEDS_RENOVATION",
                "GOOD",
                "PRETTY_GOOD",
                "ALMOST_NEW",
                "RENOVATED"
              ],
              "enumTitles": [
                "Needs renovation",
                "Good",
                "Very good",
                "Almost new",
                "Renovated"
              ]
            }
          },
          "minEnergyRating": {
            "title": "Minimum energy rating",
            "enum": [
              "any",
              "A",
              "B",
              "C",
              "D",
              "E",
              "F"
            ],
            "type": "string",
            "description": "Energy consumption rating from the certificate. Listings without a certificate are left out when this is set.",
            "default": "any"
          },
          "priceDropsOnly": {
            "title": "Recent price drops only",
            "type": "boolean",
            "description": "Only listings whose price was lowered, with the amount and the price before.",
            "default": false
          },
          "advertiser": {
            "title": "Advertiser",
            "enum": [
              "any",
              "agency",
              "private"
            ],
            "type": "string",
            "description": "Agencies come with their name, email, phone, website, and logo. Private owners are listed without any personal details.",
            "default": "any"
          },
          "withContactOnly": {
            "title": "Only listings with agency email or phone",
            "type": "boolean",
            "description": "Keeps only listings that come with an agency contact, for lead lists.",
            "default": false
          },
          "onlyNewListings": {
            "title": "Only listings new since the last run",
            "type": "boolean",
            "description": "Remembers what this same search returned before, so a scheduled run returns only new listings. The first run returns the newest matches and sets the starting point.",
            "default": false
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "RELEVANCE",
              "NEWEST",
              "PRICE_ASC",
              "PRICE_DESC",
              "PRICE_DROP_HIGH"
            ],
            "type": "string",
            "description": "Order of results, the same options as on the site.",
            "default": "RELEVANCE"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}