{
  "openapi": "3.0.1",
  "info": {
    "title": "Poland Healthcare Facilities API – Official RPWDL Register",
    "description": "Polish hospitals, clinics and other healthcare facilities from the official RPWDL register: address, phone, organisation e-mail, website, NIP/REGON, legal form, specialties and beds. Filter by region, city, specialty or ownership. Companies and public bodies only. Export CSV, JSON or Excel.",
    "version": "0.1",
    "x-build-id": "derAZW3kw9fVVbbPA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/enterprising_hamster~polish-healthcare-facilities-rpwdl/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-enterprising_hamster-polish-healthcare-facilities-rpwdl",
        "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-healthcare-facilities-rpwdl/runs": {
      "post": {
        "operationId": "runs-sync-enterprising_hamster-polish-healthcare-facilities-rpwdl",
        "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-healthcare-facilities-rpwdl/run-sync": {
      "post": {
        "operationId": "run-sync-enterprising_hamster-polish-healthcare-facilities-rpwdl",
        "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": {
          "voivodeships": {
            "title": "Voivodeships",
            "type": "array",
            "description": "Only facilities in these voivodeships (regions). Empty = all of Poland.",
            "items": {
              "type": "string",
              "enum": [
                "02",
                "04",
                "06",
                "08",
                "10",
                "12",
                "14",
                "16",
                "18",
                "20",
                "22",
                "24",
                "26",
                "28",
                "30",
                "32"
              ],
              "enumTitles": [
                "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: 4 digits for a county (e.g. 1465 = Warsaw, 1261 = Kraków), 6-7 digits for a commune. Combined with voivodeships: a facility in any listed area matches.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "City or village names as in the address, e.g. Warszawa, Kraków. Case and Polish letters do not matter.",
            "items": {
              "type": "string"
            }
          },
          "facilityKinds": {
            "title": "Facility kind",
            "type": "array",
            "description": "Kind of healthcare establishment. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "HOSPITAL",
                "INPATIENT_OTHER",
                "OUTPATIENT"
              ],
              "enumTitles": [
                "Hospital (24-hour inpatient)",
                "Other 24-hour inpatient (nursing, rehabilitation, spa)",
                "Outpatient (clinics, labs, diagnostics)"
              ]
            }
          },
          "ownership": {
            "title": "Ownership",
            "type": "array",
            "description": "Public (SP ZOZ, budget units, research institutes, companies at least 51% public), private companies, non-profits or church entities. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "PUBLIC",
                "PRIVATE",
                "NON_PROFIT",
                "CHURCH"
              ],
              "enumTitles": [
                "Public",
                "Private company",
                "Non-profit (foundation, association)",
                "Church"
              ]
            }
          },
          "specialtyCodes": {
            "title": "Specialty codes",
            "type": "array",
            "description": "4-digit ministry codes of cells (VIII part of the resort code), e.g. 1800 dental clinic, 4500 general surgery ward, 7210 ultrasound lab. A facility matches if any of its active cells has one.",
            "items": {
              "type": "string"
            }
          },
          "specialtyKeywords": {
            "title": "Specialty keywords (Polish)",
            "type": "array",
            "description": "Words found in specialty or medical field names, in Polish, e.g. stomatolog, kardiolog, rehabilitac, okulist. A facility matches if any word appears.",
            "items": {
              "type": "string"
            }
          },
          "nameContains": {
            "title": "Name contains",
            "type": "string",
            "description": "Text found in the facility, establishment or provider name, e.g. LUX MED or szpital."
          },
          "nips": {
            "title": "Provider NIPs",
            "type": "array",
            "description": "Only facilities of providers with these tax IDs (10 digits).",
            "items": {
              "type": "string"
            }
          },
          "onlyWithEmail": {
            "title": "Only with e-mail",
            "type": "boolean",
            "description": "Only facilities with an organisation e-mail address.",
            "default": false
          },
          "onlyWithPhone": {
            "title": "Only with phone",
            "type": "boolean",
            "description": "Only facilities with a phone number.",
            "default": false
          },
          "onlyWithWebsite": {
            "title": "Only with website",
            "type": "boolean",
            "description": "Only facilities with a website.",
            "default": false
          },
          "minBeds": {
            "title": "Minimum beds",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Only facilities with at least this many beds (0 = no limit).",
            "default": 0
          },
          "maxItems": {
            "title": "Max facilities",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many facilities, and so this many charged events. The whole register is about 24,000 facilities.",
            "default": 100
          },
          "onlyNew": {
            "title": "Only new or changed",
            "type": "boolean",
            "description": "Skip facilities delivered in an earlier run with the same state key and unchanged data. Use it for scheduled runs that report new and changed entries.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Name of the memory used by 'Only new or changed'. Use one key per filter set."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}