{
  "openapi": "3.0.1",
  "info": {
    "title": "Century 21 Portugal Scraper - Real Estate Listings",
    "description": "Scrape property listings from Century 21 Portugal (century21.pt). Price, typology, useful, gross and land area, description, photos, energy certificate, coordinates, district, municipality, parish, agent and agency. Sale, rent and business transfer. No login.",
    "version": "0.1",
    "x-build-id": "UfKSvzzYIqnic0wvx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/studio-amba~century21-pt-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-studio-amba-century21-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~century21-pt-scraper/runs": {
      "post": {
        "operationId": "runs-sync-studio-amba-century21-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~century21-pt-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-studio-amba-century21-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": {
          "transactionTypes": {
            "title": "Transaction type",
            "maxItems": 3,
            "uniqueItems": true,
            "type": "array",
            "description": "Sale (Comprar), rent (Arrendar) or business transfer (Trespasse). Leave empty for all three.",
            "items": {
              "type": "string",
              "enum": [
                "sale",
                "rent",
                "transfer"
              ],
              "enumTitles": [
                "Sale (Comprar)",
                "Rent (Arrendar)",
                "Business transfer (Trespasse)"
              ]
            }
          },
          "propertyTypes": {
            "title": "Property type",
            "maxItems": 22,
            "uniqueItems": true,
            "type": "array",
            "description": "Only these property types. Leave empty for all types.",
            "items": {
              "type": "string",
              "enum": [
                "apartment",
                "house",
                "building",
                "homestead",
                "room",
                "land",
                "urban_land",
                "warehouse",
                "factory",
                "office",
                "hotel",
                "palace",
                "retail_park",
                "mall",
                "store",
                "restaurant",
                "cafe",
                "bar",
                "parking_space",
                "storage",
                "garage",
                "commercial"
              ],
              "enumTitles": [
                "Apartment (Apartamento)",
                "House (Moradia)",
                "Building (Prédio)",
                "Farm / estate (Quinta / Herdade)",
                "Room (Quarto)",
                "Land (Terreno)",
                "Urban land (Terreno urbano)",
                "Warehouse (Armazém)",
                "Factory (Fábrica)",
                "Office (Escritório)",
                "Hotel (Hotel)",
                "Palace (Palácio)",
                "Retail park (Retail park)",
                "Shopping centre (Centro comercial)",
                "Shop (Loja)",
                "Restaurant (Restaurante)",
                "Café (Café)",
                "Bar (Bar)",
                "Parking space (Lugar de estacionamento)",
                "Storage room (Arrecadação)",
                "Garage (Garagem)",
                "Commercial space (Espaço comercial)"
              ]
            }
          },
          "district": {
            "title": "District (distrito)",
            "type": "string",
            "description": "Portuguese district or island, e.g. Lisboa, Porto, Setúbal, Faro, Ilha da Madeira. Accents optional. Leave empty for the whole country."
          },
          "municipality": {
            "title": "Municipality (concelho)",
            "type": "string",
            "description": "Municipality, e.g. Cascais, Sintra, Palmela, Vila Nova de Gaia. Accents optional."
          },
          "parish": {
            "title": "Parish (freguesia)",
            "type": "string",
            "description": "Parish, e.g. Pinhal Novo. Accents optional. Setting the municipality too makes the lookup exact."
          },
          "bedrooms": {
            "title": "Bedrooms (typology)",
            "maxItems": 20,
            "type": "array",
            "description": "Exact numbers of bedrooms as a JSON list, e.g. [2, 3] for T2 and T3. Leave empty for any.",
            "items": {
              "type": "integer"
            }
          },
          "minPrice": {
            "title": "Minimum price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum asking price, or monthly rent, in EUR."
          },
          "maxPrice": {
            "title": "Maximum price (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum asking price, or monthly rent, in EUR."
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "newest",
              "oldest",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "Order in which listings are collected. Only matters when Max items is lower than the number of matching listings. Leave empty for the most reliable full read (by listing id)."
          },
          "includeDetails": {
            "title": "Include detail page data",
            "type": "boolean",
            "description": "On by default, and needed for a complete record: loads each listing's own page for the description, energy certificate, land area, condition, construction year, floor, postal code and district/municipality/parish names. Turn off for a faster, cheaper read with only the search fields (price, typology, areas, photos, coordinates, agent).",
            "default": true
          },
          "language": {
            "title": "Language of title and description",
            "enum": [
              "pt",
              "en",
              "es",
              "fr"
            ],
            "type": "string",
            "description": "century21.pt stores most titles and descriptions in Portuguese, English, Spanish and French. Falls back to Portuguese when a translation is missing.",
            "default": "pt"
          },
          "startUrls": {
            "title": "Listing URLs",
            "maxItems": 500,
            "type": "array",
            "description": "Optional century21.pt listing URLs, e.g. https://century21.pt/comprar/C0545-00137 or https://www.century21.pt/ref/C0545-00137. When set, only these listings are scraped and the filters are ignored. Max 500.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of listings to save. century21.pt has about 15,000 listings in total, so the default reads the whole site.",
            "default": 50000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "century21.pt has no anti-bot wall for this data (see recon), so Apify's automatic proxy is enough.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}