{
  "openapi": "3.0.1",
  "info": {
    "title": "Idealista Scraper - Spain Italy Portugal Property",
    "description": "Scrape Idealista.com / .it / .pt across homes, new builds, rooms, garages, commercial, land, and business transfers by location or URL. Extract prices, rooms, living space, agencies, and photos as an Idealista API alternative.",
    "version": "0.3",
    "x-build-id": "5tCeuAc0hICUYnCIc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lentic_clockss~idealista-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lentic_clockss-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/lentic_clockss~idealista-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lentic_clockss-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/lentic_clockss~idealista-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lentic_clockss-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": {
          "country": {
            "title": "Country / market",
            "enum": [
              "ES",
              "IT",
              "PT"
            ],
            "type": "string",
            "description": "Idealista market: ES (idealista.com), IT (idealista.it), PT (idealista.pt). When startUrls are set, country is inferred from the URL host.",
            "default": "ES"
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Idealista search (SRP) or detail (LDP) URLs for .com / .it / .pt. When provided, these override location/channel URL building and infer the country.",
            "default": [
              {
                "url": "https://www.idealista.com/venta-viviendas/madrid-madrid/"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "location": {
            "title": "Location path",
            "type": "string",
            "description": "Idealista location path segment. Examples: madrid-madrid (ES), roma-roma (IT), lisboa (PT). Empty uses the market default. Ignored when startUrls contain search URLs.",
            "default": "madrid-madrid"
          },
          "channel": {
            "title": "Channel",
            "enum": [
              "BUY",
              "RENT"
            ],
            "type": "string",
            "description": "BUY/RENT mapped per market: ES venta/alquiler, IT vendita/affitto, PT comprar/arrendar.",
            "default": "BUY"
          },
          "propertyType": {
            "title": "Property type",
            "type": "string",
            "description": "Idealista top-nav category path or logical alias. Aliases: homes, new_homes, rooms, garages, storage, offices, commercial, land, buildings, holiday, business_transfer. ES paths: obranueva, viviendas, habitacion, garajes, trasteros, oficinas, locales, terrenos, edificios, vacacional, traspasos. IT: nuove_costruzioni, case, stanze, garage, cantine, uffici, negozi, terreni, edifici, case_vacanze, cessione-attivita. PT: empreendimentos, casas, quarto, garagens, arrecadacoes, escritorios, lojas_ou_armazens, terrenos, predios, trespasse. Room types are rent-only; transfer types use /traspasos|/cessione-attivita|/trespasse/ without buy/rent prefix. startUrls override this when set.",
            "default": "homes"
          },
          "maxItems": {
            "title": "Max listings (max 300; free users also capped at 1,000/run policy)",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Maximum property records to save (1–300). Free Apify plan users: also limited to 10 total runs of this Actor (Actor developer policy).",
            "default": 1
          },
          "maxPages": {
            "title": "Max search pages",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Maximum SRP pages to fetch. Idealista typically renders about 30 cards per page.",
            "default": 1
          },
          "scrapeDetails": {
            "title": "Scrape detail pages",
            "type": "boolean",
            "description": "When true, open each listing detail page and extract config, adDetail, adMultimediasInfo, details, advertiser, media, and lead/contact fields (phones via click-reveal, address, agency, geo). Default true so outreach-ready records (phone/email/门牌/person/org) are emitted; set false for lighter/faster SRP-only runs. Prefer 4096 MB memory for detail-heavy runs.",
            "default": true
          },
          "includeRawPayloads": {
            "title": "Include raw/bulky payloads",
            "type": "boolean",
            "description": "When true, keep bulky fields such as rawCardText, map, mapConfig, and detailSections on each dataset item. Default false to reduce memory and dataset size.",
            "default": false
          },
          "requestDelayMillis": {
            "title": "Delay between navigations (ms)",
            "minimum": 0,
            "maximum": 30000,
            "type": "integer",
            "description": "Politeness delay before browser navigations. Keep non-zero for DataDome-protected pages.",
            "default": 3000
          },
          "workerBaseUrl": {
            "title": "Worker base URL (optional)",
            "type": "string",
            "description": "Override worker origin for this run. Default: Actor env WORKER_BASE_URL. Production migrations should update WORKER_BASE_URL in Actor settings (no code change)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}