{
  "openapi": "3.0.1",
  "info": {
    "title": "Idealista Scraper",
    "description": "Scrape Idealista real estate listings across Spain, Italy & Portugal. Extract price, GPS, energy rating, rooms, agency contact. DataDome bypass included.",
    "version": "0.1",
    "x-build-id": "NXH4e2mWb0FjYyPqp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hotels-scrapers~idealista-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hotels-scrapers-idealista-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/hotels-scrapers~idealista-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hotels-scrapers-idealista-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/hotels-scrapers~idealista-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hotels-scrapers-idealista-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": [
          "operation",
          "propertyType",
          "country",
          "location"
        ],
        "properties": {
          "fetchDetails": {
            "title": "⭐ Fetch listing details (recommended for richer data)",
            "type": "boolean",
            "description": "Visit each listing's detail page (curl_cffi + DataDome cookie; Camoufox fallback) to enrich with address, geo coords, bathrooms, energy rating, agency contact, and full feature list. ~10× more requests — slower and higher block risk. Adds the 'enriched listing' charge ($0.003/listing) on top of standard dataset-item billing.",
            "default": false
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "sale",
              "rent"
            ],
            "type": "string",
            "description": "Listing operation",
            "default": "sale"
          },
          "propertyType": {
            "title": "Property Type",
            "enum": [
              "homes",
              "newDevelopments",
              "offices",
              "premises",
              "garages",
              "lands",
              "storageRooms",
              "buildings",
              "bedrooms"
            ],
            "type": "string",
            "description": "Type of property",
            "default": "homes"
          },
          "country": {
            "title": "Country",
            "enum": [
              "es",
              "it",
              "pt"
            ],
            "type": "string",
            "description": "Idealista country site",
            "default": "es"
          },
          "location": {
            "title": "Location (URL slug or full search URL)",
            "type": "string",
            "description": "Idealista location URL slug (e.g. 'madrid-comunidad_de_madrid', 'barcelona-barcelona') OR a full Idealista search URL (passthrough). City names like 'Madrid' are accepted but resolved best-effort.",
            "default": "madrid-madrid"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1800,
            "type": "integer",
            "description": "Maximum number of listings to extract (1-1800; Idealista caps results around 1800)",
            "default": 5
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "relevance",
              "lowestPrice",
              "highestPrice",
              "mostRecent",
              "biggest",
              "smallest",
              "lowestPriceM2",
              "highestPriceM2"
            ],
            "type": "string",
            "description": "Sorting method",
            "default": "relevance"
          },
          "minPrice": {
            "title": "Min price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price; 0 = any",
            "default": 0
          },
          "maxPrice": {
            "title": "Max price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price; 0 = any",
            "default": 0
          },
          "minSize": {
            "title": "Min size (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum size in m²; 0 = any",
            "default": 0
          },
          "maxSize": {
            "title": "Max size (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum size in m²; 0 = any",
            "default": 0
          },
          "publicationDate": {
            "title": "Publication date",
            "enum": [
              "",
              "Y",
              "T",
              "W",
              "M"
            ],
            "type": "string",
            "description": "Filter by publication recency",
            "default": ""
          },
          "bedrooms": {
            "title": "Bedrooms",
            "uniqueItems": true,
            "type": "array",
            "description": "Bedroom counts to include",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "bathrooms": {
            "title": "Bathrooms",
            "uniqueItems": true,
            "type": "array",
            "description": "Bathroom counts to include",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "homeType": {
            "title": "Home type",
            "uniqueItems": true,
            "type": "array",
            "description": "Home subtypes (only with propertyType=homes)",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "condition": {
            "title": "Condition",
            "uniqueItems": true,
            "type": "array",
            "description": "Property condition",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "floor": {
            "title": "Floor",
            "uniqueItems": true,
            "type": "array",
            "description": "Floor positions",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "airConditioning": {
            "title": "Air conditioning",
            "type": "boolean",
            "description": "Only show listings with air conditioning",
            "default": false
          },
          "fittedWardrobes": {
            "title": "Fitted wardrobes",
            "type": "boolean",
            "description": "Only show listings with fitted wardrobes",
            "default": false
          },
          "lift": {
            "title": "Lift",
            "type": "boolean",
            "description": "Only show listings with a lift",
            "default": false
          },
          "balcony": {
            "title": "Balcony",
            "type": "boolean",
            "description": "Only show listings with a balcony",
            "default": false
          },
          "terrace": {
            "title": "Terrace",
            "type": "boolean",
            "description": "Only show listings with a terrace",
            "default": false
          },
          "exterior": {
            "title": "Exterior",
            "type": "boolean",
            "description": "Only show exterior-facing listings",
            "default": false
          },
          "garage": {
            "title": "Garage",
            "type": "boolean",
            "description": "Only show listings with garage / parking",
            "default": false
          },
          "garden": {
            "title": "Garden",
            "type": "boolean",
            "description": "Only show listings with a garden",
            "default": false
          },
          "swimmingPool": {
            "title": "Swimming pool",
            "type": "boolean",
            "description": "Only show listings with swimming pool",
            "default": false
          },
          "storageRoom": {
            "title": "Storage room",
            "type": "boolean",
            "description": "Only show listings with storage room",
            "default": false
          },
          "accessible": {
            "title": "Accessible",
            "type": "boolean",
            "description": "Only show wheelchair-accessible listings",
            "default": false
          },
          "seaViews": {
            "title": "Sea views",
            "type": "boolean",
            "description": "Only show listings with sea views",
            "default": false
          },
          "luxury": {
            "title": "Luxury",
            "type": "boolean",
            "description": "Only show luxury listings",
            "default": false
          },
          "plan": {
            "title": "Floor plan available",
            "type": "boolean",
            "description": "Only show listings with floor plan",
            "default": false
          },
          "virtualTour": {
            "title": "Virtual tour available",
            "type": "boolean",
            "description": "Only show listings with virtual tour",
            "default": false
          },
          "customProxyUrl": {
            "title": "Custom Proxy URL (BYO premium residential)",
            "type": "string",
            "description": "Optional: full proxy URL (http://user:pass@host:port). Overrides Apify proxy. Recommended for hardened DataDome targets — Apify residential pool may be burned. Use Decodo / Bright Data / IPRoyal ES residential."
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Apify residential proxy. Defaults to Spain (ES) — change country code to IT or PT when scraping idealista.it / idealista.pt.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "ES"
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}