{
  "openapi": "3.0.1",
  "info": {
    "title": "Poland Building Permits API: Construction Leads",
    "description": "Get new Polish building permits (pozwolenia na budowę) issued to companies and public bodies from the official GUNB register: investor, authority, decision date, category and site in English. Construction leads by voivodeship, updated almost daily. No API key; JSON via API/MCP, $4 per 1,000 rows.",
    "version": "0.1",
    "x-build-id": "CUfINMP00G3JluDv5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/japan-open-data~poland-building-permits/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-japan-open-data-poland-building-permits",
        "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/japan-open-data~poland-building-permits/runs": {
      "post": {
        "operationId": "runs-sync-japan-open-data-poland-building-permits",
        "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/japan-open-data~poland-building-permits/run-sync": {
      "post": {
        "operationId": "run-sync-japan-open-data-poland-building-permits",
        "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": [
          "voivodeship"
        ],
        "properties": {
          "voivodeship": {
            "title": "Voivodeship (region)",
            "type": "string",
            "description": "One of Poland's 16 voivodeships: its Polish name (\"mazowieckie\", \"śląskie\", \"małopolskie\"...), English name (\"Masovian\", \"Silesian\", \"Lesser Poland\"...), capital city (\"Warsaw\", \"Kraków\", \"Gdańsk\"...) or TERYT code (\"14\"). Run once per voivodeship.",
            "default": "świętokrzyskie"
          },
          "days": {
            "title": "Last N days",
            "minimum": 1,
            "maximum": 366,
            "type": "integer",
            "description": "Permits decided in the last N days (default 30, up to 366). Ignored when \"dateFrom\" is set.",
            "default": 30
          },
          "dateFrom": {
            "title": "Decided from (optional)",
            "type": "string",
            "description": "First decision date, e.g. \"2026-01-01\" (2016-01-01 or later). Use with \"dateTo\" for a fixed period of up to 366 days."
          },
          "dateTo": {
            "title": "Decided until (optional)",
            "type": "string",
            "description": "Last decision date, e.g. \"2026-06-30\". Default: today."
          },
          "commune": {
            "title": "Town or TERYT code (optional)",
            "type": "string",
            "description": "Only permits in this town (as written in the register, e.g. \"Kielce\", \"Warszawa\") or with this TERYT code: 7 digits for a commune (gmina, e.g. \"2661011\"), 4 digits for a county (powiat, e.g. \"2661\"). Leave empty for the whole voivodeship."
          },
          "permitCategory": {
            "title": "Permit category",
            "enum": [
              "all",
              "housing",
              "commercial and industrial",
              "public and social",
              "infrastructure and energy",
              "agricultural and small buildings",
              "other"
            ],
            "type": "string",
            "description": "Group of building categories: \"all\" (default), \"housing\" (I, XIII), \"commercial and industrial\" (hotels, offices, retail, factories, warehouses, tanks, fuel stations, yards: XIV, XVI-XX, XXII), \"public and social\" (V, VI, IX-XII, XV), \"infrastructure and energy\" (roads, networks, bridges, masts and wind turbines, water: IV, VII, XXI, XXIII-XXX), \"agricultural and small buildings\" (II, III), \"other\" (VIII).",
            "default": "all"
          },
          "buildingCategories": {
            "title": "Building categories (optional)",
            "type": "array",
            "description": "Exact building categories of Polish building law as Roman numerals, e.g. [\"XVII\", \"XVIII\"] for retail/service and industrial/warehouse buildings. Overrides \"permitCategory\". Leave empty for all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "applicantTypes": {
            "title": "Applicant types (optional)",
            "type": "array",
            "description": "Only these investor types, e.g. [\"property developer\", \"energy or utility\"]. Values: municipality or county, state body or agency, religious organisation, school or university, health or social care, housing cooperative or community, property developer, energy or utility, telecom, retailer, forestry or agriculture, non-profit, other company. Leave empty for all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minVolumeM3": {
            "title": "Minimum cubic volume (m³)",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Only permits whose building volume (kubatura) is at least this many cubic metres (0 = no minimum). The register gives a volume for about a third of permits; permits without one are dropped when this is set.",
            "default": 0
          },
          "maxResults": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum number of permit rows (each is charged). Newest decisions come first.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}