{
  "openapi": "3.0.1",
  "info": {
    "title": "Precio Vivienda España | House Prices Scraper",
    "description": "Precios reales de venta y €/m² de compraventas formalizadas ante notario, no precios de anuncio de Idealista. Real sold-price data, not asking prices.",
    "version": "1.0",
    "x-build-id": "sWtJ5pFraE3rr67OD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crabwalker~spain-house-prices-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crabwalker-spain-house-prices-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/crabwalker~spain-house-prices-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crabwalker-spain-house-prices-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/crabwalker~spain-house-prices-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crabwalker-spain-house-prices-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": {
          "postalCodes": {
            "title": "Códigos postales / Postal codes",
            "maxItems": 5000,
            "type": "array",
            "description": "Códigos postales españoles de cinco cifras; se eliminan los duplicados. Five-digit Spanish postal codes; duplicates are removed.",
            "items": {
              "type": "string",
              "pattern": "^[0-9]{5}$"
            },
            "default": [
              "29700"
            ]
          },
          "allPostalCodes": {
            "title": "Todos los códigos postales / All postal codes",
            "type": "boolean",
            "description": "Exporta todos los códigos postales para los filtros elegidos. Export every postcode for the selected filters.",
            "default": false
          },
          "propertyType": {
            "title": "Tipo de vivienda / Property type",
            "enum": [
              "all",
              "apartment",
              "single_family"
            ],
            "type": "string",
            "description": "Elige todas las viviendas, pisos o viviendas unifamiliares. Choose all homes, apartments, or single-family houses.",
            "default": "all"
          },
          "constructionType": {
            "title": "Tipo de construcción / Construction type",
            "enum": [
              "all",
              "new_build",
              "resale"
            ],
            "type": "string",
            "description": "Elige todas las compraventas, obra nueva o segunda mano. Choose all transactions, new builds, or resale homes.",
            "default": "all"
          },
          "includeGeometry": {
            "title": "Incluir límites postales / Include boundaries",
            "type": "boolean",
            "description": "Incluye la geometría poligonal de ArcGIS; aumenta bastante el tamaño. Include ArcGIS polygon geometry; this increases dataset size.",
            "default": false
          },
          "primaryProxyConfiguration": {
            "title": "Proxy principal / Primary proxy",
            "type": "object",
            "description": "Primer intento más económico con proxies de centro de datos de Apify. Cheaper first attempt using Apify datacenter proxies.",
            "default": {
              "useApifyProxy": true
            }
          },
          "residentialFallback": {
            "title": "Respaldo residencial ES / Spanish residential fallback",
            "type": "boolean",
            "description": "Reintenta automáticamente bloqueos y errores mediante un proxy residencial español. Automatically retries blocks and errors through an ES residential proxy.",
            "default": true
          },
          "batchSize": {
            "title": "Códigos por petición / Codes per request",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Mantén el valor predeterminado salvo que el servicio rechace consultas largas. Keep the default unless long queries are rejected.",
            "default": 100
          },
          "requestDelaySecs": {
            "title": "Espera entre peticiones / Request delay",
            "minimum": 0,
            "maximum": 30,
            "type": "number",
            "description": "Pausa prudente entre peticiones a la API. Polite delay between API requests.",
            "default": 0.5
          },
          "maxRequestRetries": {
            "title": "Reintentos máximos / Maximum retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Reintentos por tipo de proxy ante errores temporales. Retries per proxy tier for transient errors.",
            "default": 2
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}