{
  "openapi": "3.0.1",
  "info": {
    "title": "Imovirtual Scraper with Rental Yield & Deal Score – Portugal",
    "description": "Rental yield by freguesia and typology in Lisbon and Porto, plus deal score, estimated rent and yield for every flat for sale on Imovirtual. All sale and rent listings, price filter.",
    "version": "0.0",
    "x-build-id": "KZhkBUAbtJNhTyAES"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-nest~imovirtual-rental-yield/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-nest-imovirtual-rental-yield",
        "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/data-nest~imovirtual-rental-yield/runs": {
      "post": {
        "operationId": "runs-sync-data-nest-imovirtual-rental-yield",
        "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/data-nest~imovirtual-rental-yield/run-sync": {
      "post": {
        "operationId": "run-sync-data-nest-imovirtual-rental-yield",
        "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": {
          "cities": {
            "title": "Cities",
            "minItems": 1,
            "type": "array",
            "description": "Cities to analyse. Each city fetches apartments for sale and for long-term rent: Lisbon (/lisboa/lisboa) and Porto (/porto/porto).",
            "items": {
              "type": "string",
              "enum": [
                "lisboa",
                "porto"
              ],
              "enumTitles": [
                "Lisbon",
                "Porto"
              ]
            },
            "default": [
              "lisboa",
              "porto"
            ]
          },
          "mode": {
            "title": "What to return",
            "enum": [
              "both",
              "yieldReport",
              "scoreListings",
              "listings"
            ],
            "type": "string",
            "description": "yieldReport: gross rental yield per freguesia and typology. scoreListings: a 0–100 deal score for every listing for sale. both: yield report and scored listings. listings: every apartment for sale and for rent, one row each, with deal score and estimated rent and yield on the sale rows; no yield rows, and maximum scored listings is ignored.",
            "default": "both"
          },
          "typology": {
            "title": "Typology",
            "minItems": 1,
            "type": "array",
            "description": "Portuguese typology counts bedrooms: T1 ≈ one bedroom + living room. T0 is a studio; \"T4+\" means four or more bedrooms.",
            "items": {
              "type": "string",
              "enum": [
                "T0",
                "T1",
                "T2",
                "T3",
                "T4+"
              ],
              "enumTitles": [
                "T0 (studio)",
                "T1",
                "T2",
                "T3",
                "T4 or more"
              ]
            },
            "default": [
              "T0",
              "T1",
              "T2",
              "T3",
              "T4+"
            ]
          },
          "areaMin": {
            "title": "Minimum area",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Smallest flat size to include.",
            "default": 15
          },
          "areaMax": {
            "title": "Maximum area",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Largest flat size to include.",
            "default": 250
          },
          "minScore": {
            "title": "Minimum deal score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Return only listings with a deal score at or above this value (50 = priced at the median of comparable flats). In mode listings it applies to sale rows only.",
            "default": 0
          },
          "maxScoredListings": {
            "title": "Maximum scored listings",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Return at most this many listings, best deals first. 0 = all. Ignored in mode listings.",
            "default": 1000
          },
          "includePrimaryMarket": {
            "title": "Include primary market (new builds)",
            "type": "boolean",
            "description": "On (default): resales and new builds are compared together; isPrimaryMarket is then always null, because the portal does not mark new builds on listings. Off: the portal is asked for resales only on the sale side (rents are not split by market); isPrimaryMarket is then false.",
            "default": true
          },
          "minSalePrice": {
            "title": "Minimum sale price",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Return only listings for sale asking at least this much. Filters returned rows only; scores compare with the whole market. Modes listings, scoreListings and both."
          },
          "maxSalePrice": {
            "title": "Maximum sale price",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Return only listings for sale asking at most this much. Filters returned rows only; scores compare with the whole market. Modes listings, scoreListings and both."
          },
          "minMonthlyRent": {
            "title": "Minimum monthly rent",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Return only rentals asking at least this much per month. Filters returned rows only; estimates use the whole market. Mode listings only."
          },
          "maxMonthlyRent": {
            "title": "Maximum monthly rent",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Return only rentals asking at most this much per month. Filters returned rows only; estimates use the whole market. Mode listings only."
          },
          "maxListingsPerSide": {
            "title": "Listings per city and side",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Listings for sale and, separately, for rent per city. 0 = all pages (the full market of the city).",
            "default": 0
          },
          "minSaleSample": {
            "title": "Minimum sale listings per group",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Fewer listings for sale than this in a freguesia and typology group: the group falls back to the city level.",
            "default": 15
          },
          "minRentSample": {
            "title": "Minimum rent listings per group",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Fewer listings for rent than this in a freguesia and typology group: the rent estimate falls back to the city level.",
            "default": 10
          },
          "onlyNewOrChanged": {
            "title": "Only new or cheaper listings",
            "type": "boolean",
            "description": "Return only listings that are new or at least 1% cheaper since the last run with the same watchlist name.",
            "default": false
          },
          "watchlistName": {
            "title": "Watchlist name",
            "type": "string",
            "description": "Name of the monitoring memory. Use a different name for each watchlist; letters, digits, '.', '_' and '-'.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy used to reach the listing portal. The default is Apify Proxy's residential group with addresses in Portugal. You can pass your own proxyConfiguration instead.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "PT"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}