{
  "openapi": "3.0.1",
  "info": {
    "title": "Predimed Portugal Scraper - Property Listings",
    "description": "Scrape every property listing from Predimed Imobiliária (predimed.pt), a Portuguese agency network. Get price, typology, useful, gross and land areas, district, municipality, parish, coordinates, description, photos, energy certificate, features and agent. No login required.",
    "version": "0.1",
    "x-build-id": "qWImcdT4j1rj7i6sg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/studio-amba~predimed-pt-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-studio-amba-predimed-pt-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/studio-amba~predimed-pt-scraper/runs": {
      "post": {
        "operationId": "runs-sync-studio-amba-predimed-pt-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/studio-amba~predimed-pt-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-studio-amba-predimed-pt-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": {
          "transactionType": {
            "title": "Transaction type",
            "enum": [
              "all",
              "sale",
              "rent"
            ],
            "type": "string",
            "description": "Sale (comprar), rent (arrendar) or both.",
            "default": "all"
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "A Portuguese district (distrito), municipality (concelho) or parish (freguesia), e.g. \"Lisboa\", \"Sintra\", \"Cedofeita\". Accents are optional. Leave empty for all of Portugal. A name the site does not know fails the run with examples, it never silently widens to the whole country."
          },
          "propertyTypes": {
            "title": "Property types",
            "maxItems": 11,
            "type": "array",
            "description": "Only these property types. Leave empty for all types. These are the site's own categories (Apartamentos, Moradias, Terrenos, ...).",
            "items": {
              "type": "string",
              "enum": [
                "apartment",
                "house",
                "land",
                "farm",
                "shop",
                "office",
                "warehouse",
                "garage",
                "building",
                "business",
                "room"
              ],
              "enumTitles": [
                "Apartment (Apartamentos)",
                "House (Moradias)",
                "Land (Terrenos)",
                "Farm / estate (Quintas e Herdades)",
                "Shop (Lojas)",
                "Office (Escritórios)",
                "Warehouse (Armazéns)",
                "Garage (Garagens)",
                "Building (Prédios)",
                "Business for sale (Imóveis com Negócio)",
                "Room (Quartos)"
              ]
            }
          },
          "typologies": {
            "title": "Typology (T0, T1, T2 ...)",
            "maxItems": 11,
            "type": "array",
            "description": "Only these typologies (number of bedrooms). Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "T0",
                "T1",
                "T2",
                "T3",
                "T4",
                "T5",
                "T6",
                "T7",
                "T8",
                "T9",
                "T10"
              ]
            }
          },
          "minPrice": {
            "title": "Minimum price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum asking price, or minimum monthly rent for rentals."
          },
          "maxPrice": {
            "title": "Maximum price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum asking price, or maximum monthly rent for rentals."
          },
          "minArea": {
            "title": "Minimum area (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum area in square metres."
          },
          "availability": {
            "title": "Availability",
            "enum": [
              "available",
              "all",
              "sold",
              "reserved",
              "rented"
            ],
            "type": "string",
            "description": "Predimed keeps sold, reserved and rented properties in its catalogue. Default \"available\" returns only listings that are still on the market. Choose \"all\" for the complete catalogue, as the site lists it.",
            "default": "available"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "newest",
              "oldest",
              "updated",
              "price_desc",
              "price_asc"
            ],
            "type": "string",
            "description": "Order of the results. With a low max items this decides which listings you get.",
            "default": "newest"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum number of listings to return. Hard cap 20,000 (the full Predimed catalogue is about 8,500 including sold listings).",
            "default": 100
          },
          "includeDetails": {
            "title": "Include listing details",
            "type": "boolean",
            "description": "ON by default and load-bearing: the description, district, municipality, coordinates, gross and land areas, construction year, condition, features, all photos and the agent come from each listing page. Turn it OFF only for a fast price/status check: rows then carry only the list data (price, typology, useful area, parish, status, one photo, dates).",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "Listing pages fetched in parallel.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "predimed.pt has no anti-bot protection (see recon), so Apify's automatic proxy is enough. Residential is not needed.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}