{
  "openapi": "3.0.1",
  "info": {
    "title": "Belgium EPC Distress Leads — E/F/G Energy-Sieve Property Feed",
    "description": "Find EPC E, F and G property listings (energy sieves) in Belgium. Runs Immoweb, 2dehands, Immovlan and Zimmo, keeps only energy-sieve listings, attaches a region-specific renovation-obligation urgency flag (Flanders/Wallonia/Brussels), dedupes across portals, and flags private-owner vs agency.",
    "version": "0.1",
    "x-build-id": "KTOa1mlGs0G2euwCh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/studio-amba~belgium-epc-distress-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-studio-amba-belgium-epc-distress-leads",
        "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~belgium-epc-distress-leads/runs": {
      "post": {
        "operationId": "runs-sync-studio-amba-belgium-epc-distress-leads",
        "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~belgium-epc-distress-leads/run-sync": {
      "post": {
        "operationId": "run-sync-studio-amba-belgium-epc-distress-leads",
        "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": [
          "location",
          "postalCode"
        ],
        "properties": {
          "location": {
            "title": "Location (city)",
            "type": "string",
            "description": "Belgian city to search, e.g. 'Gent', 'Antwerpen', 'Charleroi', 'Brussel'. Drives all selected portals."
          },
          "postalCode": {
            "title": "Postal code",
            "type": "string",
            "description": "4-digit Belgian postal code matching the location. Used to scope 2dehands (which needs a postcode + radius) and to resolve the region (Flanders/Wallonia/Brussels) for the renovation-urgency flag."
          },
          "epcGrades": {
            "title": "EPC grades to keep",
            "type": "array",
            "description": "Which EPC grades count as distress. Default E, F and G (the energy sieves under renovation-obligation pressure). Grade G does not occur in Flanders (its scale tops out at F).",
            "items": {
              "type": "string",
              "enum": [
                "A+",
                "A",
                "B",
                "C",
                "D",
                "E",
                "F",
                "G"
              ],
              "enumTitles": [
                "A+",
                "A",
                "B",
                "C",
                "D",
                "E (obligation trigger)",
                "F (obligation trigger)",
                "G (Wallonia/Brussels only)"
              ]
            },
            "default": [
              "E",
              "F",
              "G"
            ]
          },
          "transactionType": {
            "title": "Transaction",
            "enum": [
              "sale",
              "rent"
            ],
            "type": "string",
            "description": "Sale (verkoop) or rent (verhuur).",
            "default": "sale"
          },
          "propertyType": {
            "title": "Property type (optional)",
            "enum": [
              "",
              "apartment",
              "house",
              "land",
              "parking",
              "commercial",
              "room"
            ],
            "type": "string",
            "description": "Restrict to one property type. Leave empty for all types.",
            "default": ""
          },
          "portals": {
            "title": "Portals",
            "type": "array",
            "description": "Which Belgian portals to run and deduplicate across. Only Immoweb and Zimmo expose an EPC field — 2dehands and Immovlan still contribute to cross-portal dedup and the FSBO signal, but never carry an EPC grade themselves.",
            "items": {
              "type": "string",
              "enum": [
                "immoweb",
                "2dehands",
                "immovlan",
                "zimmo"
              ],
              "enumTitles": [
                "Immoweb",
                "2dehands",
                "Immovlan",
                "Zimmo"
              ]
            },
            "default": [
              "immoweb",
              "2dehands",
              "immovlan",
              "zimmo"
            ]
          },
          "sellerFilter": {
            "title": "Seller filter",
            "enum": [
              "all",
              "fsbo_only",
              "agency_only"
            ],
            "type": "string",
            "description": "Return all distress listings, only FSBO (private-owner) ones, or only agency-listed. A private owner of an E/F/G property is the premium lead, but agency-listed distress properties are still valid renovation-lead-gen targets.",
            "default": "all"
          },
          "onlyNew": {
            "title": "Only new listings since last run",
            "type": "boolean",
            "description": "Return only distress properties not seen in a previous run. Backed by a per-account key-value store. Leave off for a full snapshot.",
            "default": false
          },
          "enrichAgencies": {
            "title": "Enrich agencies via KBO/BCE",
            "type": "boolean",
            "description": "Cross-reference agency-listed properties against the Belgian KBO/BCE company registry to attach agency phone and enterprise number. Adds extra lookups, so runs take longer. Off by default.",
            "default": false
          },
          "minPrice": {
            "title": "Min price (EUR)",
            "type": "integer",
            "description": "Lower price bound passed to the portals that support it. Leave empty for no minimum."
          },
          "maxPrice": {
            "title": "Max price (EUR)",
            "type": "integer",
            "description": "Upper price bound passed to the portals that support it. Leave empty for no maximum."
          },
          "maxItemsPerSource": {
            "title": "Max items per portal",
            "type": "integer",
            "description": "Cap on listings pulled from each portal before the EPC filter and dedup. Raise it in areas with fewer E/F/G listings. Immoweb and Zimmo fetch one detail page per item (~10s each), so a high value needs a matching per-portal timeout.",
            "default": 30
          },
          "timeoutPerSourceSecs": {
            "title": "Per-portal timeout (seconds)",
            "type": "integer",
            "description": "How long to wait for each portal run before treating it as failed. Immoweb/Zimmo detail-page fetches take ~10s per item — keep this above maxItemsPerSource x 10s or those two EPC sources will time out and get excluded.",
            "default": 240
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Passed through to the child portal scrapers. Belgian residential proxy is strongly recommended — Immoweb and Zimmo are anti-bot-protected and return 403s on datacenter IPs.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "BE"
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}