{
  "openapi": "3.0.1",
  "info": {
    "title": "Idealista Scraper",
    "description": "Scrape Idealista search results and listing detail pages from Spain, Italy, and Portugal using request-only HTTP with browser TLS impersonation. Supports pagination, optional detail enrichment, price-range splitting, search monitoring, and coverage reports.",
    "version": "0.1",
    "x-build-id": "HedGlE4VFWIYcfcRF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/trakk~idealista-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-trakk-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/trakk~idealista-scraper/runs": {
      "post": {
        "operationId": "runs-sync-trakk-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/trakk~idealista-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-trakk-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "SEARCH",
              "DETAIL"
            ],
            "type": "string",
            "description": "SEARCH paginates Idealista search URLs. DETAIL scrapes individual listing pages.",
            "default": "SEARCH"
          },
          "searchUrls": {
            "title": "Search URLs",
            "type": "array",
            "description": "Idealista search/listing URLs from idealista.com, idealista.it, or idealista.pt.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "detailUrls": {
            "title": "Detail URLs",
            "type": "array",
            "description": "Individual property URLs. Used in DETAIL mode.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Mixed Idealista URLs. Search URLs are used in SEARCH mode; detail URLs are used in DETAIL mode.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "listingIds": {
            "title": "Listing IDs",
            "type": "array",
            "description": "Raw Idealista listing IDs for DETAIL mode.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Input Dataset",
            "type": "string",
            "description": "Optional dataset with propertyId/adId/url/detailUrl fields. Used in DETAIL mode."
          },
          "country": {
            "title": "Country for built URLs",
            "enum": [
              "ES",
              "IT",
              "PT"
            ],
            "type": "string",
            "description": "Used only when building search/detail URLs from locationSlug or listingIds.",
            "default": "ES"
          },
          "operation": {
            "title": "Operation for built search URLs",
            "enum": [
              "SALE",
              "RENT",
              "NEW_DEVELOPMENT"
            ],
            "type": "string",
            "description": "Used only with locationSlug/locationSlugs.",
            "default": "SALE"
          },
          "locationSlug": {
            "title": "Location slug",
            "type": "string",
            "description": "Optional Idealista location slug, e.g. madrid-madrid, milano-milano, lisboa. Prefer searchUrls for exact filters."
          },
          "locationSlugs": {
            "title": "Location slugs",
            "type": "array",
            "description": "Optional list of location slugs for generated search URLs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "language": {
            "title": "Language path",
            "type": "string",
            "description": "Language path used for generated URLs. Use en for English output where Idealista supports it.",
            "default": "en"
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Optional price filter. Replaces existing price filters on search URLs."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Optional price filter. Replaces existing price filters on search URLs."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Global cap on pushed property rows. Set 0 for no cap.",
            "default": 100
          },
          "maxPagesPerSearch": {
            "title": "Max pages per search/range",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Pagination cap for each search URL or price range.",
            "default": 3
          },
          "enablePriceSplitting": {
            "title": "Enable price splitting",
            "type": "boolean",
            "description": "Split broad searches into Idealista price ranges to reduce truncation and produce a coverage report.",
            "default": false
          },
          "maxSplitDepth": {
            "title": "Max split depth",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Recursive split depth when a price range still has more pages than maxPagesPerSearch.",
            "default": 1
          },
          "includeDetails": {
            "title": "Fetch detail pages in SEARCH mode",
            "type": "boolean",
            "description": "If enabled, each search result is enriched with its detail page fields and photos.",
            "default": false
          },
          "includeContactPhones": {
            "title": "Try contact phones",
            "type": "boolean",
            "description": "Try Idealista's contact-phone AJAX endpoint from detail pages. This endpoint is stricter and may return a DataDome challenge.",
            "default": false
          },
          "rawOutput": {
            "title": "Include raw config snippets",
            "type": "boolean",
            "description": "Include parsed raw JS config fields in detail output.",
            "default": false
          },
          "monitoring": {
            "title": "Enable monitoring",
            "type": "boolean",
            "description": "Compare current search results with a named key-value store and mark new/unchanged/price_changed/removed listings.",
            "default": false
          },
          "monitoringStoreName": {
            "title": "Monitoring store name",
            "type": "string",
            "description": "Named key-value store used for monitoring snapshots.",
            "default": "idealista-monitoring"
          },
          "maxDetailUrls": {
            "title": "Max detail URLs",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Optional cap for DETAIL mode URLs collected from inputs/datasets. Set 0 for no cap.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Parallel detail requests.",
            "default": 5
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 15,
            "type": "integer",
            "description": "General retry budget per request.",
            "default": 4
          },
          "maxProxyRetries": {
            "title": "Max proxy retries",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Dedicated retry budget for proxy/transport failures.",
            "default": 4
          },
          "maxBlockRetries": {
            "title": "Max DataDome retries",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Dedicated retry budget for DataDome challenge pages.",
            "default": 4
          },
          "failOnSearchError": {
            "title": "Fail on search error",
            "type": "boolean",
            "description": "Fail the whole run when one search URL fails. Disabled by default so large URL batches can continue and store per-URL error rows.",
            "default": false
          },
          "requestTimeoutSecs": {
            "title": "Request timeout seconds",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout for each HTTP request.",
            "default": 30
          },
          "impersonateProfile": {
            "title": "TLS impersonation profile",
            "type": "string",
            "description": "curl_cffi browser impersonation profile. Safari currently works best for Idealista HTML pages.",
            "default": "safari"
          },
          "acceptLanguage": {
            "title": "Accept-Language header",
            "type": "string",
            "description": "HTTP Accept-Language header.",
            "default": "en-US,en;q=0.9"
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy configuration. Residential proxies are recommended on Apify if datacenter IPs are challenged.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}