{
  "openapi": "3.0.1",
  "info": {
    "title": "Imovirtual Scraper 💰 $1/1K – Portugal Homes for Sale & Rent",
    "description": "Scrape Imovirtual.com listings across Portugal: apartments, houses, rooms, land, shops and new developments for sale or rent. Price, €/m², area, rooms, description, GPS, parish, agency and phone numbers. Search by place, URL or map. No result cap.",
    "version": "0.0",
    "x-build-id": "2WgO42ziur3bw9CSF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lukass~imovirtual-mp-actor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lukass-imovirtual-mp-actor",
        "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/lukass~imovirtual-mp-actor/runs": {
      "post": {
        "operationId": "runs-sync-lukass-imovirtual-mp-actor",
        "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/lukass~imovirtual-mp-actor/run-sync": {
      "post": {
        "operationId": "run-sync-lukass-imovirtual-mp-actor",
        "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": "📍 Locations",
            "type": "array",
            "description": "Places in Portugal, one per line: a city or council (Lisboa, Porto, Cascais), a parish or neighbourhood (\"Cascais e Estoril, Cascais, Lisboa\"), or a location id in lowercase (lisboa/cascais; faro = the whole Faro district). A bare name picks Imovirtual's top suggestion (\"Porto\" = the city); add the parent places to pin an exact one. The run log shows what each name resolved to.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🔗 imovirtual.com URLs",
            "type": "array",
            "description": "Search pages (https://www.imovirtual.com/pt/resultados/comprar/apartamento/lisboa/cascais) or single listings (https://www.imovirtual.com/pt/anuncio/...-ID1jfeQ). Operation, property type, location, price, area, rooms and sort are read from a search URL; the filters below fill in the rest.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "mapArea": {
            "title": "🗺️ Map area",
            "type": "string",
            "description": "A rectangle as \"south,west,north,east\" in degrees (e.g. 38.69,-9.23,38.80,-9.09 for central Lisbon), or a GeoJSON Polygon / Feature drawn on geojson.io."
          },
          "wholeCountry": {
            "title": "🇵🇹 Whole of Portugal",
            "type": "boolean",
            "description": "Search all of Portugal (with the filters below). There is no 1,000-result cap: every listing can be reached.",
            "default": false
          },
          "operation": {
            "title": "Buy or rent",
            "enum": [
              "sale",
              "rent"
            ],
            "type": "string",
            "description": "Used for locations, map area and whole country. Pasted URLs keep their own (comprar / arrendar).",
            "default": "sale"
          },
          "propertyTypes": {
            "title": "Property types",
            "type": "array",
            "description": "One search per type. Empty = apartments.",
            "items": {
              "type": "string",
              "enum": [
                "flat",
                "house",
                "room",
                "land",
                "commercial",
                "warehouse",
                "garage",
                "development"
              ],
              "enumTitles": [
                "Apartment (apartamento)",
                "House (moradia)",
                "Room (quarto)",
                "Land (terreno)",
                "Shop / commercial (loja)",
                "Warehouse (armazém)",
                "Garage (garagem)",
                "New development (empreendimento)"
              ]
            },
            "default": [
              "flat"
            ]
          },
          "minPrice": {
            "title": "Minimum price",
            "type": "integer",
            "description": "Asking price, or monthly rent"
          },
          "maxPrice": {
            "title": "Maximum price",
            "type": "integer",
            "description": "Asking price, or monthly rent"
          },
          "minArea": {
            "title": "Minimum area",
            "type": "integer",
            "description": "Usable area in m²"
          },
          "maxArea": {
            "title": "Maximum area",
            "type": "integer",
            "description": "Usable area in m²"
          },
          "rooms": {
            "title": "Rooms",
            "type": "array",
            "description": "Number of rooms (assoalhadas) including the living room: a T1 has 2, a T2 has 3. Leave empty for any.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10"
              ],
              "enumTitles": [
                "1 (T0)",
                "2 (T1)",
                "3 (T2)",
                "4 (T3)",
                "5 (T4)",
                "6",
                "7",
                "8",
                "9",
                "10"
              ]
            }
          },
          "market": {
            "title": "Market",
            "enum": [
              "all",
              "new",
              "resale"
            ],
            "type": "string",
            "description": "New builds (from developers) or resale homes",
            "default": "all"
          },
          "ownerType": {
            "title": "Advertiser",
            "enum": [
              "all",
              "agency",
              "developer",
              "private"
            ],
            "type": "string",
            "description": "Who placed the listing",
            "default": "all"
          },
          "buildingTypes": {
            "title": "House types",
            "type": "array",
            "description": "Houses only. Leave empty for any.",
            "items": {
              "type": "string",
              "enum": [
                "DETACHED",
                "SEMI_DETACHED",
                "RIBBON",
                "TENEMENT",
                "RESIDENCE",
                "FARM"
              ],
              "enumTitles": [
                "Detached (isolada)",
                "Semi-detached (geminada)",
                "Terraced (em banda)",
                "Townhouse",
                "Residence",
                "Farm (quinta / herdade)"
              ]
            }
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Only listings mentioning this text, e.g. piscina"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "newest",
              "relevance",
              "lowestPrice",
              "highestPrice",
              "largest"
            ],
            "type": "string",
            "description": "Order within each search. Lowest price lists listings without a public price first.",
            "default": "newest"
          },
          "fetchDetails": {
            "title": "Fetch listing details",
            "type": "boolean",
            "description": "One extra request per listing for bathrooms, build year, energy certificate, plot area, features (garage, balcony, air conditioning, ...), AI-extracted attributes, deposit, agency licence (AMI), phone and office address.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum listings",
            "type": "integer",
            "description": "Stop after this many listings. Leave empty for everything."
          },
          "proxy": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy (default group) is enough; the API has shown no bot protection.",
            "default": {
              "useApifyProxy": true
            }
          },
          "debugLog": {
            "title": "Debug log",
            "type": "boolean",
            "description": "Log every request the Actor makes",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}