{
  "openapi": "3.0.1",
  "info": {
    "title": "Poland Building Permits API – Official GUNB RWDZ",
    "description": "Poland building permits and construction notifications from the official GUNB register (RWDZ): project, category, cubature, location, dates, office. Investor, address and plots for companies and public bodies; private persons anonymised. Filter by region, date, category. Export CSV, JSON or Excel.",
    "version": "0.1",
    "x-build-id": "W1ZfWG6BBKb3sCsJE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/enterprising_hamster~polish-building-permits-gunb/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-enterprising_hamster-polish-building-permits-gunb",
        "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/enterprising_hamster~polish-building-permits-gunb/runs": {
      "post": {
        "operationId": "runs-sync-enterprising_hamster-polish-building-permits-gunb",
        "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/enterprising_hamster~polish-building-permits-gunb/run-sync": {
      "post": {
        "operationId": "run-sync-enterprising_hamster-polish-building-permits-gunb",
        "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": {
          "registers": {
            "title": "Registers",
            "type": "array",
            "description": "PERMITS = building permit decisions (pozwolenia na budowę, with the investor where it is an organisation). NOTIFICATIONS = construction notifications without objection (zgłoszenia, whole country, no investor column). Empty = PERMITS.",
            "items": {
              "type": "string",
              "enum": [
                "PERMITS",
                "NOTIFICATIONS"
              ],
              "enumTitles": [
                "Building permits (decisions)",
                "Construction notifications (zgłoszenia)"
              ]
            }
          },
          "voivodeships": {
            "title": "Voivodeships",
            "type": "array",
            "description": "Regions to read. Not set = mazowieckie, so the first run is quick. Choose 'Whole country' for all 16. Ignored when TERYT codes are given.",
            "items": {
              "type": "string",
              "enum": [
                "ALL",
                "02",
                "04",
                "06",
                "08",
                "10",
                "12",
                "14",
                "16",
                "18",
                "20",
                "22",
                "24",
                "26",
                "28",
                "30",
                "32"
              ],
              "enumTitles": [
                "Whole country (all 16)",
                "dolnośląskie",
                "kujawsko-pomorskie",
                "lubelskie",
                "lubuskie",
                "łódzkie",
                "małopolskie",
                "mazowieckie",
                "opolskie",
                "podkarpackie",
                "podlaskie",
                "pomorskie",
                "śląskie",
                "świętokrzyskie",
                "warmińsko-mazurskie",
                "wielkopolskie",
                "zachodniopomorskie"
              ]
            }
          },
          "terytCodes": {
            "title": "Counties or communes (TERYT)",
            "type": "array",
            "description": "TERYT code prefixes: 2 digits for a voivodeship, 4 for a county (1465 = Warsaw, 1261 = Kraków, 3064 = Poznań, 0264 = Wrocław), 6-7 for a commune. When set, these replace the voivodeship list.",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "Earliest decision date (permits) or application date (notifications)."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Latest decision date (permits) or application date (notifications)."
          },
          "daysBack": {
            "title": "Last N days",
            "minimum": 0,
            "maximum": 3660,
            "type": "integer",
            "description": "Only cases from the last N days (0 = no limit). Combined with 'From date', the later date wins."
          },
          "categories": {
            "title": "Building categories",
            "type": "array",
            "description": "Construction Law categories. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "I",
                "II",
                "III",
                "IV",
                "V",
                "VI",
                "VII",
                "VIII",
                "IX",
                "X",
                "XI",
                "XII",
                "XIII",
                "XIV",
                "XV",
                "XVI",
                "XVII",
                "XVIII",
                "XIX",
                "XX",
                "XXI",
                "XXII",
                "XXIII",
                "XXIV",
                "XXV",
                "XXVI",
                "XXVII",
                "XXVIII",
                "XXIX",
                "XXX"
              ],
              "enumTitles": [
                "I single-family houses",
                "II farm buildings",
                "III small buildings: summer houses, outbuildings, garages up to two spaces",
                "IV road and railway elements: junctions, exits, platforms",
                "V open-air sports and recreation facilities",
                "VI cemeteries",
                "VII water navigation structures",
                "VIII other structures",
                "IX culture, science and education buildings",
                "X religious buildings",
                "XI healthcare and social care buildings",
                "XII public administration buildings",
                "XIII other residential buildings (multi-family)",
                "XIV hotels and tourist accommodation",
                "XV sports halls and indoor pools",
                "XVI office and conference buildings",
                "XVII retail, food service and service buildings",
                "XVIII industrial and warehouse buildings",
                "XIX industrial tanks and silos",
                "XX fuel stations",
                "XXI ports, marinas and other water transport structures",
                "XXII storage yards, car parks, landfills",
                "XXIII airport structures",
                "XXIV water management structures: reservoirs, fish ponds",
                "XXV roads and railways",
                "XXVI networks: power, telecom, gas, heat, water, sewage, pipelines",
                "XXVII dams, weirs, flood embankments",
                "XXVIII bridges, viaducts, tunnels",
                "XXIX chimneys, masts and wind turbine structures",
                "XXX water intakes, pumping stations, treatment plants"
              ]
            }
          },
          "investmentKinds": {
            "title": "Investment kind",
            "type": "array",
            "description": "Single-family house or anything else. Empty = both.",
            "items": {
              "type": "string",
              "enum": [
                "SINGLE_FAMILY_HOUSE",
                "OTHER"
              ],
              "enumTitles": [
                "Single-family house",
                "Other building or structure"
              ]
            }
          },
          "worksTypes": {
            "title": "Type of works",
            "type": "array",
            "description": "Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "NEW_BUILD",
                "EXTENSION",
                "SUPERSTRUCTURE",
                "RECONSTRUCTION",
                "DEMOLITION",
                "OTHER_WORKS",
                "UNKNOWN"
              ],
              "enumTitles": [
                "New build",
                "Extension",
                "Superstructure (extra storey)",
                "Reconstruction",
                "Demolition",
                "Other works",
                "Not stated"
              ]
            }
          },
          "onlyWithInvestor": {
            "title": "Only cases with a named investor",
            "type": "boolean",
            "description": "Only permits whose investor is a company, public body, church, non-profit or housing community (named, with address and plots). Cases of private individuals are never named.",
            "default": false
          },
          "investorTypes": {
            "title": "Investor type",
            "type": "array",
            "description": "Only permits whose investor is of these types (implies a named investor). Empty = any.",
            "items": {
              "type": "string",
              "enum": [
                "COMPANY",
                "PUBLIC",
                "RELIGIOUS",
                "NON_PROFIT",
                "HOUSING_COMMUNITY"
              ],
              "enumTitles": [
                "Company",
                "Public body (state, local government, public institutions)",
                "Church or religious body",
                "Foundation, association or other non-profit",
                "Housing community or cooperative"
              ]
            }
          },
          "investorContains": {
            "title": "Investor name contains",
            "type": "string",
            "description": "Text in the investor name, e.g. 'Dom Development' or 'Gmina'. Case and Polish letters do not matter. Implies a named investor."
          },
          "keywords": {
            "title": "Keywords in project name",
            "type": "array",
            "description": "Any of these words in the project name, e.g. 'hala', 'magazyn', 'fotowolta'. Case and Polish letters do not matter.",
            "items": {
              "type": "string"
            }
          },
          "minCubature": {
            "title": "Minimum cubature (m³)",
            "minimum": 0,
            "type": "integer",
            "description": "Only projects at least this large (cubature as stated in the register; many entries have none)."
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Newest first. You pay per delivered result.",
            "default": 100
          },
          "onlyNew": {
            "title": "Only new or changed cases",
            "type": "boolean",
            "description": "Skip cases delivered by an earlier run with the same state key and unchanged since. Use with a schedule to get a daily feed of new permits.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Name of the memory used by 'Only new or changed cases'. Use one key per monitored search."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}