{
  "openapi": "3.0.1",
  "info": {
    "title": "Pisos.com Scraper & Property Listings Monitor (Spain)",
    "description": "pisos.com homes for sale and for rent in Spain, newest first: price in EUR, price per m², size, rooms, bathrooms, floor, location, agency or private seller, listing date and photos. Watch mode returns only new listings and price drops since your last check. Export to JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "Uzi6HLkFnJhmS7i0N"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neverempty~pisos-listings-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neverempty-pisos-listings-monitor",
        "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/neverempty~pisos-listings-monitor/runs": {
      "post": {
        "operationId": "runs-sync-neverempty-pisos-listings-monitor",
        "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/neverempty~pisos-listings-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-neverempty-pisos-listings-monitor",
        "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": {
          "locations": {
            "title": "Places (as in pisos.com addresses)",
            "type": "array",
            "description": "Which places to list, one per line: a province or city as pisos.com writes it (Madrid, Barcelona, Sevilla, madrid_capital, malaga_capital, barcelona_capital). If this and the URLs below are both empty, madrid_capital is searched.",
            "items": {
              "type": "string"
            }
          },
          "operation": {
            "title": "Buy or rent",
            "enum": [
              "venta",
              "alquiler"
            ],
            "type": "string",
            "description": "Homes for sale or for rent, for the places above. Pasted URLs keep their own choice. Empty means for sale.",
            "default": "venta"
          },
          "searchUrls": {
            "title": "pisos.com list URLs",
            "type": "array",
            "description": "Or paste the address of a pisos.com list page, such as https://www.pisos.com/venta/pisos-madrid/ or https://www.pisos.com/alquiler/pisos-sevilla/desde-500/ (filters set on pisos.com are kept). Addresses with a ? part are refused; use the filters below instead.",
            "items": {
              "type": "string"
            }
          },
          "maxListings": {
            "title": "Max listings per search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many listings to return for each place or URL, newest first (1 to 1000). Empty means 30. In watch mode this caps what one run returns; the rest comes in later runs."
          },
          "minPrice": {
            "title": "Minimum price (EUR)",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Optional. Only listings at or above this price in euros (for rentals, the monthly rent). Empty means no minimum."
          },
          "maxPrice": {
            "title": "Maximum price (EUR)",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Optional. Only listings at or below this price in euros (for rentals, the monthly rent). Empty means no maximum."
          },
          "minBedrooms": {
            "title": "Minimum bedrooms",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Optional. Only listings with at least this many bedrooms. Empty means no minimum."
          },
          "maxBedrooms": {
            "title": "Maximum bedrooms",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Optional. Only listings with at most this many bedrooms. Empty means no maximum."
          },
          "minBathrooms": {
            "title": "Minimum bathrooms",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Optional. Only listings with at least this many bathrooms. Empty means no minimum."
          },
          "minSizeM2": {
            "title": "Minimum size (m²)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Optional. Only listings of at least this many square metres. Empty means no minimum."
          },
          "maxSizeM2": {
            "title": "Maximum size (m²)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Optional. Only listings of at most this many square metres. Empty means no maximum."
          },
          "sellerType": {
            "title": "Seller",
            "enum": [
              "any",
              "agency",
              "private"
            ],
            "type": "string",
            "description": "Agencies only, private sellers only, or both. Private sellers are never named in the output. Empty means any.",
            "default": "any"
          },
          "requirePrice": {
            "title": "Only listings with a price",
            "type": "boolean",
            "description": "Leave out listings that show no price (\"a consultar\"). Empty means off.",
            "default": false
          },
          "onlyReduced": {
            "title": "Only reduced listings",
            "type": "boolean",
            "description": "Only listings whose price went down, as marked on pisos.com (and, in watch mode, as seen by this watch). Empty means off.",
            "default": false
          },
          "includeDetails": {
            "title": "Open each listing for full details",
            "type": "boolean",
            "description": "Adds listing date, all photos, full description, energy rating, features, condition and agency name from each listing's own page. Turn off for list data only (faster). Empty means on.",
            "default": true
          },
          "monitoringMode": {
            "title": "Watch mode: only new listings and price drops",
            "type": "boolean",
            "description": "Run the same input on a schedule. The first run returns the newest listings and remembers them; later runs return only listings published since then and listings whose price went down. Empty means off (a plain search).",
            "default": false
          },
          "includePriceDrops": {
            "title": "Include price drops (watch mode)",
            "type": "boolean",
            "description": "In watch mode, also return remembered listings whose price went down, with the previous price. Empty means on.",
            "default": true
          },
          "watchPages": {
            "title": "Pages checked per watch (watch mode)",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "In watch mode, how many pages of 30 newest listings each run checks for each search (1 to 20). Empty means 3 (the newest 90). Raise it for busy places so nothing is missed between runs."
          },
          "watchName": {
            "title": "Watch name (watch mode)",
            "type": "string",
            "description": "Optional. Keeps separate memories for separate watches of the same search (letters, digits, dot, dash, underscore). Empty means the default watch."
          },
          "resetMonitoringState": {
            "title": "Start the watch again (watch mode)",
            "type": "boolean",
            "description": "Forget what this watch remembered and treat this run as the first check. Empty means off.",
            "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}