{
  "openapi": "3.0.1",
  "info": {
    "title": "Pisos.com Scraper - Spain Properties, Prices & Agents",
    "description": "Scrape Pisos.com property listings for sale and rent across Spain by location or URL. Extract prices, price drops, floor areas, rooms, features, photo galleries, GPS coordinates, energy ratings and agency contacts. Supports search results, agency pages and property links.",
    "version": "0.1",
    "x-build-id": "Qt4sTiwokRQ6ZXNxE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abotapi~pisos-com-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abotapi-pisos-com-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/abotapi~pisos-com-scraper/runs": {
      "post": {
        "operationId": "runs-sync-abotapi-pisos-com-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/abotapi~pisos-com-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-abotapi-pisos-com-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What do you want to scrape?",
            "enum": [
              "search",
              "url"
            ],
            "type": "string",
            "description": "Search runs the places and filters below. URL mode scrapes the pisos.com links you paste (results pages, agency pages or property pages) and ignores the search fields.",
            "default": "search"
          },
          "locations": {
            "title": "Places",
            "type": "array",
            "description": "One place per line: a city, province, district or neighbourhood in Spain (for example Madrid, Barcelona, Madrid Capital, Malaga). The closest matching place is used for each line. Each place is walked page by page, 30 properties per page, until Max items is reached.",
            "default": [
              "Madrid Capital"
            ],
            "items": {
              "type": "string"
            }
          },
          "operation": {
            "title": "Operation",
            "enum": [
              "sale",
              "rent"
            ],
            "type": "string",
            "description": "Properties for sale or for rent.",
            "default": "sale"
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "homes",
              "flats",
              "houses",
              "penthouses",
              "duplex",
              "studios",
              "lofts",
              "rooms",
              "newBuild",
              "garages",
              "storageRooms",
              "land",
              "offices",
              "buildings",
              "commercial",
              "warehouses",
              "all"
            ],
            "type": "string",
            "description": "Kind of property to list.",
            "default": "homes"
          },
          "minPrice": {
            "title": "Minimum price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only properties priced at least this many euros (monthly rent when Operation is For rent). Empty or 0 keeps all."
          },
          "maxPrice": {
            "title": "Maximum price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only properties priced at most this many euros (monthly rent when Operation is For rent). Empty or 0 keeps all."
          },
          "minRooms": {
            "title": "Minimum bedrooms",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only properties with at least this many bedrooms. Empty or 0 keeps all."
          },
          "minBathrooms": {
            "title": "Minimum bathrooms",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only properties with at least this many bathrooms. Empty or 0 keeps all."
          },
          "minArea": {
            "title": "Minimum area (m2)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only properties with at least this many square metres. Empty or 0 keeps all."
          },
          "urls": {
            "title": "pisos.com links",
            "type": "array",
            "description": "pisos.com links, one per line. Accepted: a results page for sale or rent (any city, district or property type, with price filters in the link, the map view or the English version; a page number in the link is where the walk starts), an agency page (its properties are listed) and a property page (/comprar/ or /alquilar/). Tracking and sort parameters are ignored. Other pages carry no properties and are skipped with a warning. Filter fields are ignored in this mode.",
            "default": [
              "https://www.pisos.com/venta/pisos-madrid_capital_zona_urbana/",
              "https://www.pisos.com/venta/pisos-madrid_capital_zona_urbana/2/",
              "https://www.pisos.com/alquiler/pisos-madrid_capital_zona_urbana/",
              "https://www.pisos.com/venta/casas-barcelona/",
              "https://www.pisos.com/venta/locales-madrid/",
              "https://www.pisos.com/venta/pisos-madrid/",
              "https://www.pisos.com/venta/pisos-madrid_capital/",
              "https://www.pisos.com/venta/pisos-madrid_capital_zona_urbana/desde-300000/hasta-500000/",
              "https://www.pisos.com/venta/pisos-madrid_capital_zona_urbana/?utm_source=x&ordenar=precio",
              "https://www.pisos.com/mapa/venta/pisos-madrid_capital_zona_urbana/",
              "https://www.pisos.com/en/venta/pisos-madrid_capital_zona_urbana/",
              "https://www.pisos.com/comprar/piso-carabanchel_san_isidro28019-65077851154_510936/",
              "https://www.pisos.com/alquilar/piso-madrid_capital_zona_urbana-65077851154_510936/",
              "https://www.pisos.com/inmobiliaria-redpiso_estudio_pradera_de_san_isidro/"
            ],
            "items": {
              "type": "string"
            }
          },
          "fetchDetails": {
            "title": "Add property details",
            "type": "boolean",
            "description": "Open each property to add the full description and the last update date. Off returns the listing fields only. Property links always read the property.",
            "default": true
          },
          "maxPages": {
            "title": "Max pages per search",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Result pages to walk per place or link. This does not cap the run by default: empty or 0 means no page limit and it defers to Max items, which is the one default cap (20)."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "The single default cap of the run: maximum properties to return across the whole run (default 20). Max pages has no finite default and defers to this field. 0 means no limit. In incremental mode, unchanged properties count toward this number.",
            "default": 20
          },
          "proxy": {
            "title": "Proxy",
            "type": "object",
            "description": "Proxy settings. The default Apify Proxy works for this site. Residential proxies are recommended for the most reliable results; they are billed by traffic on your account, so they cost more. If the selected connection is refused, the run switches to a backup connection on its own.",
            "default": {
              "useApifyProxy": true
            }
          },
          "resumeFromRunId": {
            "title": "Resume from run ID",
            "type": "string",
            "description": "Run ID (or dataset ID) of a previous run of this Actor. Properties already collected there are skipped, so this run returns only the delta. Leave empty for a normal run. For recurring monitoring of the same search, use Incremental mode instead."
          },
          "incrementalMode": {
            "title": "Incremental changes for scheduled runs",
            "type": "boolean",
            "description": "For recurring monitoring. A property is returned as NEW the first time and as UPDATED when a compared field changes: price, previous price, title, description, area, rooms, bathrooms, floor, features, equipment, images, coordinates, advertiser details, premium and exclusive flags and the listing state. Unchanged properties are not returned or billed. Never compared: rank, total results, collection time, the refresh date and the update date. State is kept per tracked search or link set, or per State key when you set one.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Optional name for a monitoring campaign. Runs sharing a key share their incremental state. Leave empty to scope it automatically to the search or links."
          },
          "baselineDatasetId": {
            "title": "Start from an existing dataset (incremental mode only)",
            "type": "string",
            "description": "Optional. Pick the dataset of an earlier full run of this Actor so the first incremental run returns only properties that changed since then. Pick it unedited. Only used on the first run for a state key and not combined with Resume."
          },
          "emitExpired": {
            "title": "Emit expired products (incremental mode only)",
            "type": "boolean",
            "description": "Off by default. Also returns properties that were tracked before and are no longer found, marked EXPIRED. Only produced after a complete scan, never when Max items, Max pages, a pasted page beyond 1, a property link or Resume limited the run. These synthetic rows are returned and billed, so leave it off unless you need expiry tracking.",
            "default": false
          },
          "changeScope": {
            "title": "What counts as a change (incremental mode only)",
            "enum": [
              "all",
              "priceOnly"
            ],
            "type": "string",
            "description": "All fields (default): any change to a compared field returns an UPDATED row. Price only: only a change of the price, the previous price or the currency returns an UPDATED row; descriptions, images and other details never do.",
            "default": "all"
          },
          "expireAfterMissedScans": {
            "title": "Expire after N missed full scans (incremental mode only)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Only used with Emit expired properties. A property is marked EXPIRED only after it was missing from this many complete scans in a row (default 1). Raise it so a property that briefly drops out of the results is not reported as gone.",
            "default": 1
          },
          "ignoreFieldsForChanges": {
            "title": "Ignore fields when detecting changes (incremental mode only)",
            "type": "array",
            "description": "Extra field names that must not mark a property as UPDATED in incremental mode. Rank, total results, collection time and the refresh and update dates are already ignored. Use a dotted name such as additionalFeatures.value to ignore one key inside every element of a list.",
            "items": {
              "type": "string"
            }
          },
          "mcpConnectors": {
            "title": "Pipe results into your apps (optional)",
            "type": "array",
            "description": "Optionally send the scraped results into the apps you already use, via Model Context Protocol (MCP) connectors. Authorize a connector once under Apify Settings, Integrations, then select it here. The connector receives a condensed summary per item; the full record stays in the dataset. Leave empty to skip."
          },
          "notionParentPageUrl": {
            "title": "Notion parent page (Notion connector only)",
            "type": "string",
            "description": "URL (or id) of the Notion page under which item pages are created. Required to enable the Notion export; ignored by other connectors."
          },
          "maxNotifyListings": {
            "title": "Max items to export per connector",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on items written to each connector per run. Does not affect the dataset.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}