{
  "openapi": "3.0.1",
  "info": {
    "title": "Idealista Scraper",
    "description": "Ultimate Idealista scrape property listings from Spain, Italy and Portugal. Search by place name, URL, ZIP code, coordinates or property codes. Optional add-ons: listing statistics, comments and nearby places.",
    "version": "0.1",
    "x-build-id": "v5SpJSBh28ckx8jRZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/happyendpoint~idealista-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-happyendpoint-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/happyendpoint~idealista-scraper/runs": {
      "post": {
        "operationId": "runs-sync-happyendpoint-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/happyendpoint~idealista-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-happyendpoint-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": [
          "country"
        ],
        "properties": {
          "country": {
            "title": "Country",
            "enum": [
              "es",
              "it",
              "pt"
            ],
            "type": "string",
            "description": "Which Idealista site to search.",
            "default": "es"
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "sale",
              "rent"
            ],
            "type": "string",
            "description": "Look for properties that are for sale or for rent.",
            "default": "sale"
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "homes",
              "newDevelopments",
              "bedrooms",
              "vacationRentals",
              "offices",
              "premises",
              "garages",
              "lands",
              "storageRooms",
              "buildings",
              "transfers"
            ],
            "type": "string",
            "description": "The kind of property to search for. Homes covers flats and houses. Note: Rooms and Vacation rentals only work with For rent, and Business transfers only works with For sale.",
            "default": "homes"
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Type a place name, for example 'Madrid', 'Chamberi, Madrid' or 'Lisboa'. The actor finds the matching area for you. You can also paste an Idealista location ID like 0-EU-ES-28-07-001-079 if you have one."
          },
          "locations": {
            "title": "More locations",
            "type": "array",
            "description": "Optional. Add more places to search in the same run. Same format as Location.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search query (plain words)",
            "type": "string",
            "description": "Optional. Describe what you want in plain words, for example 'penthouse with terrace in Chamberi'. Only used when Location is empty."
          },
          "startUrls": {
            "title": "Idealista URLs",
            "type": "array",
            "description": "Optional. Paste Idealista pages straight from your browser: search result pages or single property pages. Works with idealista.com, idealista.it and idealista.pt. When URLs are set, the location fields are ignored.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "propertyCodes": {
            "title": "Property codes",
            "type": "array",
            "description": "Optional. Idealista property codes to fetch directly, for example 106387165. Each code returns one item with full details.",
            "items": {
              "type": "string"
            }
          },
          "zipCode": {
            "title": "ZIP code",
            "type": "string",
            "description": "Optional. Search by postal code, for example 28001."
          },
          "latitude": {
            "title": "Latitude",
            "type": "string",
            "description": "Optional. Search around a map point. Fill in both Latitude and Longitude, for example 40.4168."
          },
          "longitude": {
            "title": "Longitude",
            "type": "string",
            "description": "Optional. Search around a map point. Fill in both Latitude and Longitude, for example -3.7038."
          },
          "radiusKm": {
            "title": "Radius (km)",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "How far around the map point to search, in kilometers. Between 1 and 15.",
            "default": 3
          },
          "minPrice": {
            "title": "Min price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest price. For rentals this is the monthly rent."
          },
          "maxPrice": {
            "title": "Max price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest price. For rentals this is the monthly rent."
          },
          "minSize": {
            "title": "Min size (m2)",
            "minimum": 0,
            "type": "integer",
            "description": "Smallest built area in square meters."
          },
          "maxSize": {
            "title": "Max size (m2)",
            "minimum": 0,
            "type": "integer",
            "description": "Largest built area in square meters."
          },
          "minRooms": {
            "title": "Min bedrooms",
            "minimum": 0,
            "type": "integer",
            "description": "At least this many bedrooms."
          },
          "minBathrooms": {
            "title": "Min bathrooms",
            "minimum": 0,
            "type": "integer",
            "description": "At least this many bathrooms."
          },
          "hasElevator": {
            "title": "Elevator",
            "type": "boolean",
            "description": "Only buildings with an elevator.",
            "default": false
          },
          "hasParking": {
            "title": "Parking",
            "type": "boolean",
            "description": "Only listings that include a parking space.",
            "default": false
          },
          "hasSwimmingPool": {
            "title": "Swimming pool",
            "type": "boolean",
            "description": "Only listings with a swimming pool.",
            "default": false
          },
          "hasAirConditioning": {
            "title": "Air conditioning",
            "type": "boolean",
            "description": "Only listings with air conditioning.",
            "default": false
          },
          "hasTerrace": {
            "title": "Terrace",
            "type": "boolean",
            "description": "Only listings with a terrace.",
            "default": false
          },
          "hasGarden": {
            "title": "Garden",
            "type": "boolean",
            "description": "Only listings with a garden.",
            "default": false
          },
          "petsAllowed": {
            "title": "Pets allowed",
            "type": "boolean",
            "description": "Only listings where pets are allowed.",
            "default": false
          },
          "hasVirtualTour": {
            "title": "Virtual tour",
            "type": "boolean",
            "description": "Only listings with a virtual tour.",
            "default": false
          },
          "furnishedKitchen": {
            "title": "Furnished kitchen",
            "type": "boolean",
            "description": "Only listings with a furnished kitchen.",
            "default": false
          },
          "advancedFilters": {
            "title": "Advanced filters",
            "type": "object",
            "description": "Optional, for power users. Extra filters as JSON, with values as the text \"true\". Examples: {\"penthouse\": \"true\"} for penthouses only, {\"seaViews\": \"true\"} for sea views, {\"luxury\": \"true\"} for luxury homes, {\"balcony\": \"true\"}, {\"studio\": \"true\"}, {\"newDevelopment\": \"true\"}."
          },
          "addDetails": {
            "title": "Add full details",
            "type": "boolean",
            "description": "Adds the complete property page data to every result (all photos, full description, energy certificate, agent info). Slower, and each detailed property is billed at the detail rate.",
            "default": false
          },
          "addStats": {
            "title": "Add listing statistics",
            "type": "boolean",
            "description": "Adds views, favourites and contact counts to every result. Great for spotting high-demand or stale listings.",
            "default": false
          },
          "addComments": {
            "title": "Add comments",
            "type": "boolean",
            "description": "Adds user comments left on the listing to every result.",
            "default": false
          },
          "addNearbyPois": {
            "title": "Add nearby places",
            "type": "boolean",
            "description": "Adds the closest metro stops, train stations and landmarks with distances to every result.",
            "default": false
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after saving this many results. Use 0 for no limit.",
            "default": 50
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "mostRecent",
              "leastRecent",
              "lowestPrice",
              "highestPrice",
              "biggest",
              "smallest"
            ],
            "type": "string",
            "description": "Order of the results.",
            "default": "relevance"
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "es",
              "it",
              "pt",
              "ca",
              "fr",
              "de",
              "nl",
              "pl",
              "ro",
              "ru",
              "sv",
              "da",
              "fi",
              "no",
              "el",
              "zh",
              "uk"
            ],
            "type": "string",
            "description": "Language for property descriptions.",
            "default": "en"
          },
          "check": {
            "title": "Health check (leave as is)",
            "type": "string",
            "description": "Used by automated platform tests. When no search input is filled in, the actor runs a quick self-test instead of scraping. You can ignore this field."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}