{
  "openapi": "3.0.1",
  "info": {
    "title": "Idealista Scraper",
    "description": "Scrape property listings from Idealista.com — search results and full detail pages with photos, features, location, and optional contact phones.",
    "version": "2.0",
    "x-build-id": "MClbzKYhIqKVdmn3h"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datascrapers~idealista-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datascrapers-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/datascrapers~idealista-scraper/runs": {
      "post": {
        "operationId": "runs-sync-datascrapers-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/datascrapers~idealista-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-datascrapers-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",
        "properties": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Optional Idealista listing URLs (/inmueble/, /immobile/, /imovel/). When present, these override location search.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "country": {
            "title": "Country",
            "enum": [
              "es",
              "it",
              "pt"
            ],
            "type": "string",
            "description": "Idealista market: Spain (es), Italy (it), or Portugal (pt).",
            "default": "es"
          },
          "searchQueries": {
            "title": "Search location",
            "type": "array",
            "description": "Location text such as \"Madrid\", \"malaga teatinos\", or \"barcelona eixample\". Used when Start URLs are empty. A raw locationId (0-EU-…) is also accepted.",
            "items": {
              "type": "string"
            }
          },
          "locationId": {
            "title": "Location ID",
            "type": "string",
            "description": "Optional Idealista locationId (e.g. 0-EU-ES-28-07-001-079). Overrides search location text when set."
          },
          "center": {
            "title": "Map center (lat,lng)",
            "type": "string",
            "description": "Optional GPS center for radius search, e.g. \"40.4168,-3.7038\". Requires Distance. Overrides location text / locationId."
          },
          "distance": {
            "title": "Distance (meters)",
            "minimum": 1,
            "type": "integer",
            "description": "Radius in meters for center-based search."
          },
          "operation": {
            "title": "Buy or rent",
            "enum": [
              "buy",
              "rent",
              "sale"
            ],
            "type": "string",
            "description": "Sale or rent. Rooms and holiday stays are rent-only; new homes and transfers are sale-only.",
            "default": "buy"
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "homes",
              "newHomes",
              "rooms",
              "holiday",
              "garages",
              "storageRooms",
              "offices",
              "commercial",
              "transfers",
              "land",
              "buildings",
              "warehouses"
            ],
            "type": "string",
            "description": "Listing category for location search.",
            "default": "homes"
          },
          "minPrice": {
            "title": "Min price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price filter in euros."
          },
          "maxPrice": {
            "title": "Max price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price filter in euros."
          },
          "minSize": {
            "title": "Min size (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum size in square metres."
          },
          "maxSize": {
            "title": "Max size (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum size in square metres."
          },
          "minRooms": {
            "title": "Min rooms",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Minimum bedrooms (0 = studio)."
          },
          "minBathrooms": {
            "title": "Min bathrooms",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Minimum bathrooms (3 = 3 or more)."
          },
          "order": {
            "title": "Order by",
            "enum": [
              "publicationDate",
              "price",
              "size"
            ],
            "type": "string",
            "description": "Sort field for search results."
          },
          "sort": {
            "title": "Sort direction",
            "enum": [
              "asc",
              "desc"
            ],
            "type": "string",
            "description": "asc or desc (pairs with Order by).",
            "default": "asc"
          },
          "sinceDate": {
            "title": "Listed since",
            "enum": [
              "Y",
              "W",
              "M"
            ],
            "type": "string",
            "description": "Recency filter: Y = last 48h, W = week, M = month."
          },
          "filters": {
            "title": "Feature filters",
            "type": "object",
            "description": "Optional Idealista boolean filters (elevator, garage, swimmingPool, garden, airConditioning, storeRoom, exterior, balcony, terrance, penthouse, duplex, bankOffer, virtualTour, …).",
            "default": {}
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of listings to scrape (0 = unlimited)",
            "default": 0
          },
          "maxPages": {
            "title": "Max Search Pages",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum search result pages per location (0 = unlimited).",
            "default": 0
          },
          "scrapeListingDetails": {
            "title": "Scrape listing details",
            "type": "boolean",
            "description": "Fetch full listing details (description, all photos, energy rating, amenities). Charged when the full detail is returned.",
            "default": true
          },
          "includeContactPhones": {
            "title": "Include contact phones",
            "type": "boolean",
            "description": "Include advertiser phone numbers when available. Charged when phone numbers are present.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many listing-detail requests to run in parallel. Higher is faster; too high may trigger rate limits.",
            "default": 10
          },
          "requestDelayMs": {
            "title": "Request Delay (ms)",
            "minimum": 0,
            "type": "integer",
            "description": "Base delay between requests on each worker (milliseconds).",
            "default": 100
          },
          "locale": {
            "title": "Locale",
            "enum": [
              "es",
              "en",
              "it",
              "pt"
            ],
            "type": "string",
            "description": "Language for location suggest and detail text (es, en, it, pt)",
            "default": "es"
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Optional proxy. Recommended on the Apify platform if you see rate limits or empty results.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}