{
  "openapi": "3.0.1",
  "info": {
    "title": "Idealista Scraper",
    "description": "Idealista scraper for idealista.com, .it and .pt: homes, rooms, offices, garages and land for sale or rent by city or pasted search URL. Price, price per m², price cuts, size, rooms, floor, lift, agency name, photos. Monitor mode alerts on new listings and price drops. No agent names or phones.",
    "version": "0.1",
    "x-build-id": "P4EUpRhAJxUaAvj9s"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datahamster~idealista-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datahamster-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/datahamster~idealista-scraper/runs": {
      "post": {
        "operationId": "runs-sync-datahamster-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/datahamster~idealista-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-datahamster-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": {
          "locations": {
            "title": "Places",
            "type": "array",
            "description": "Places on the idealista site chosen in Country, one per line. A bare name finds a town only when its province has the same name (\"Madrid\", \"Valencia\", \"Milano\", \"Roma\") or, in Portugal, the town itself (\"Lisboa\", \"Cascais\"); other towns need idealista's <town>-<province> slug as in its URLs (\"marbella-malaga\"), provinces \"madrid-provincia\". Each place is one search with the filters below. A place idealista does not know is reported in IDEALISTA_STATS.unknownLocations and returns nothing. For a district or a map area, paste the search URL instead.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "idealista search or listing URLs",
            "type": "array",
            "description": "Optional. Search URLs copied from idealista.com, idealista.it or idealista.pt with any filters set on the site (districts, features, energy class, ...), e.g. https://www.idealista.com/venta-viviendas/madrid/salamanca/con-precio-hasta_500000/, or listing pages like https://www.idealista.com/inmueble/112450146/. Every filter in the URL is kept; the filter fields below apply to Places only.",
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country (for Places)",
            "enum": [
              "es",
              "it",
              "pt"
            ],
            "type": "string",
            "description": "Which idealista site the Places are searched on. Example: es.",
            "default": "es"
          },
          "operation": {
            "title": "Sale or rent",
            "enum": [
              "sale",
              "rent"
            ],
            "type": "string",
            "description": "For Places. Example: rent.",
            "default": "sale"
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "homes",
              "rooms",
              "offices",
              "premises",
              "garages",
              "land",
              "storageRooms",
              "buildings"
            ],
            "type": "string",
            "description": "For Places. Example: homes.",
            "default": "homes"
          },
          "minPrice": {
            "title": "Min price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Sale price, or monthly rent for rentals. Example: 100000."
          },
          "maxPrice": {
            "title": "Max price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Example: 400000."
          },
          "minSize": {
            "title": "Min size (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Example: 60."
          },
          "maxSize": {
            "title": "Max size (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Example: 120."
          },
          "bedrooms": {
            "title": "Bedrooms",
            "type": "array",
            "description": "Any of the ticked counts. On idealista.it the site counts rooms (locali): a studio is a monolocale, 1 bedroom a bilocale, and so on. Example: [\"2\", \"3\"].",
            "items": {
              "type": "string",
              "enum": [
                "0",
                "1",
                "2",
                "3",
                "4+"
              ],
              "enumTitles": [
                "Studio",
                "1",
                "2",
                "3",
                "4 or more"
              ]
            },
            "default": []
          },
          "bathrooms": {
            "title": "Bathrooms",
            "type": "array",
            "description": "Example: [\"2\"].",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3+"
              ],
              "enumTitles": [
                "1",
                "2",
                "3 or more"
              ]
            },
            "default": []
          },
          "features": {
            "title": "Must have",
            "type": "array",
            "description": "Every ticked feature is required (idealista's own filters). Example: [\"lift\", \"terrace\"].",
            "items": {
              "type": "string",
              "enum": [
                "lift",
                "terrace",
                "parking",
                "pool",
                "exterior",
                "airConditioning",
                "garden",
                "storageRoom",
                "balcony"
              ],
              "enumTitles": [
                "Lift",
                "Terrace",
                "Parking space",
                "Swimming pool",
                "Exterior (Spain only)",
                "Air conditioning",
                "Garden",
                "Storage room",
                "Balcony"
              ]
            },
            "default": []
          },
          "condition": {
            "title": "Condition",
            "type": "array",
            "description": "Example: [\"toRenovate\"].",
            "items": {
              "type": "string",
              "enum": [
                "new",
                "good",
                "toRenovate"
              ],
              "enumTitles": [
                "New build",
                "Good condition",
                "To renovate"
              ]
            },
            "default": []
          },
          "publishedWithin": {
            "title": "Published within",
            "enum": [
              "any",
              "24h",
              "48h",
              "week",
              "month"
            ],
            "type": "string",
            "description": "idealista's own publication-date filter. Example: week.",
            "default": "any"
          },
          "privateOnly": {
            "title": "Private sellers only",
            "type": "boolean",
            "description": "true = only adverts idealista marks as private (no agency). idealista has no such filter in its search, so the actor reads the normal search and skips agency adverts without charging them: expect many pages per private listing. Owners are never named. Example: false.",
            "default": false
          },
          "onlyPriceReduced": {
            "title": "Only price-reduced listings",
            "type": "boolean",
            "description": "true = only listings idealista shows with a price cut (previousPrice and priceDropPercent). Ignored in monitor mode. Example: false.",
            "default": false
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "newest",
              "price_asc",
              "price_desc",
              "biggest_drop"
            ],
            "type": "string",
            "description": "Monitor mode always reads newest first. Example: newest.",
            "default": "relevance"
          },
          "maxPagesPerSearch": {
            "title": "Max pages per search",
            "minimum": 1,
            "maximum": 80,
            "type": "integer",
            "description": "30 listings per page; idealista shows at most about 2,500 listings of one search. In monitor mode every run reads this depth newest first. Example: 5.",
            "default": 5
          },
          "includeDetails": {
            "title": "Open each listing page",
            "type": "boolean",
            "description": "true = also read every listing's own page: approximate map coordinates (when idealista shows an area), bathrooms, feature lists, energy class, year built, the full description and all photos. Each page read costs $0.004 (the detail event) plus about $0.0017-0.0020 of platform usage and takes 5-60 s, so a row with details costs about $0.0068 in total. In monitor mode only new listings are opened. Example: false.",
            "default": false
          },
          "priceChangeAlerts": {
            "title": "Monitor: price changes to report",
            "enum": [
              "drops",
              "any",
              "off"
            ],
            "type": "string",
            "description": "Monitor mode only. Example: drops.",
            "default": "drops"
          },
          "minPriceDropPercent": {
            "title": "Monitor: minimum price drop (%)",
            "minimum": 0,
            "maximum": 90,
            "type": "number",
            "description": "Monitor mode only: report a drop only when the price fell at least this much since the last price reported. Smaller cuts add up. Example: 5.",
            "default": 0
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many results (you are charged only for pushed items)",
            "default": 100
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "scrape",
              "monitor"
            ],
            "type": "string",
            "description": "scrape = full results; monitor = only new/changed items since the previous run of this task",
            "default": "scrape"
          },
          "monitorStateId": {
            "title": "Monitor state id",
            "type": "string",
            "description": "Optional state id when not running as a saved task (monitor mode)"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POST a change summary here in monitor mode"
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Optional: bot token for monitor-mode change summaries"
          },
          "telegramChatId": {
            "title": "Telegram chat id",
            "type": "string",
            "description": "Optional: chat id that receives monitor-mode summaries"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}