{
  "openapi": "3.0.1",
  "info": {
    "title": "Pisos.com Scraper",
    "description": "[💰 $2.2 / 1K] Extract Spanish property listings from pisos.com — sale and rental flats, houses, and new developments. Get price, size, rooms, bathrooms, address, GPS coordinates, energy rating, photos, and agency contact. Filter by location, operation, type, price, rooms, and size.",
    "version": "1.0",
    "x-build-id": "hz4e7TmAyHXvbLc8H"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/solidcode~pisos-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-solidcode-pisos-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/solidcode~pisos-scraper/runs": {
      "post": {
        "operationId": "runs-sync-solidcode-pisos-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/solidcode~pisos-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-solidcode-pisos-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": {
          "searchLocations": {
            "title": "Search Locations",
            "type": "array",
            "description": "Spanish cities, towns, provinces, or neighborhoods to search (e.g. 'Madrid', 'Barcelona', 'Valencia', 'Malaga'). Each entry runs its own search using the filters below. Each single location search returns up to about 3,000 listings (pisos.com's own limit) — to collect more, split a big area into several smaller locations or add price/room/size filters. Leave empty if you are pasting Start URLs instead.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Power-user input. Paste pisos.com search-result URLs (e.g. https://www.pisos.com/venta/pisos-madrid/) or individual listing URLs, copied from your browser after applying filters. When provided, these override the Search Locations and Filters below — any filters in the URL are used as-is.",
            "items": {
              "type": "string"
            }
          },
          "operationType": {
            "title": "Operation",
            "enum": [
              "sale",
              "rent"
            ],
            "type": "string",
            "description": "Buy or rent. Ignored when Start URLs are provided.",
            "default": "sale"
          },
          "propertyType": {
            "title": "Property Type",
            "enum": [
              "all",
              "flats",
              "houses",
              "new-development",
              "offices",
              "commercial",
              "garages",
              "land",
              "storage",
              "buildings"
            ],
            "type": "string",
            "description": "Filter by property category. Choose 'All Types' to include everything.",
            "default": "all"
          },
          "priceMin": {
            "title": "Minimum Price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Only include listings at or above this price in euros (total sale price, or monthly rent for rentals). Leave empty for no minimum."
          },
          "priceMax": {
            "title": "Maximum Price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Only include listings at or below this price in euros. Leave empty for no maximum."
          },
          "minRooms": {
            "title": "Minimum Bedrooms",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Only include properties with at least this many bedrooms (0 = studio / no bedroom filter). Leave empty for no minimum."
          },
          "minBathrooms": {
            "title": "Minimum Bathrooms",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Only include properties with at least this many bathrooms. Leave empty for no minimum."
          },
          "sizeMin": {
            "title": "Minimum Size (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Only include properties with at least this built area in square meters. Leave empty for no minimum."
          },
          "sizeMax": {
            "title": "Maximum Size (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Only include properties with at most this built area in square meters. Leave empty for no maximum."
          },
          "sort": {
            "title": "Sort Order",
            "enum": [
              "relevance",
              "newest",
              "price-asc",
              "price-desc"
            ],
            "type": "string",
            "description": "How pisos.com orders results before we collect them.",
            "default": "relevance"
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of listings to collect across all searches and URLs combined. Set to 0 for unlimited (unlimited is still capped at an internal safety limit of 100,000 listings per run). Results are collected in full pages of about 30, so the final page may overshoot this cap by a few records. A single broad location search tops out near 3,000 results on pisos.com — add price, room, or size filters (or search several locations) to reach more. Tip: start with 10-50 to test, then increase.",
            "default": 100
          },
          "includeDetails": {
            "title": "Include Full Property Details",
            "type": "boolean",
            "description": "Visit each property's own page to add the full description, all photos, energy certificate rating, listing reference, floor, features (lift, terrace, pool, parking), and exact coordinates. Leave off for a faster, cheaper run — the standard fields (price, price per m², size, rooms, baths, address, cover photo, agency) are always included.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}