{
  "openapi": "3.0.1",
  "info": {
    "title": "KRS Poland Scraper — Polish company register (KRS) data",
    "description": "Company data from the official Polish National Court Register (KRS) API: name, NIP, REGON, address, share capital, PKD codes, status, filings. Look up KRS numbers or get every company changed or newly registered on a date.",
    "version": "0.1",
    "x-build-id": "EP2o1qnkbLJjvZCVI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/eudatalab~krs-pl-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-eudatalab-krs-pl-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/eudatalab~krs-pl-scraper/runs": {
      "post": {
        "operationId": "runs-sync-eudatalab-krs-pl-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/eudatalab~krs-pl-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-eudatalab-krs-pl-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": {
          "krsNumbers": {
            "title": "KRS numbers (direct lookup)",
            "type": "array",
            "description": "Polish KRS numbers to look up, e.g. 0000019193 or 19193 (leading zeros are added). When this list is set, the dates below are ignored; the filters still apply.",
            "items": {
              "type": "string"
            }
          },
          "changedFrom": {
            "title": "Changed from (date)",
            "type": "string",
            "description": "First day of the KRS bulletin to read: every entity that got a register entry that day (new registration, change of address, board, capital, liquidation…). Format YYYY-MM-DD. Leave both dates empty for the latest bulletin."
          },
          "changedTo": {
            "title": "Changed to (date)",
            "type": "string",
            "description": "Last day of the range (inclusive, at most 31 days). Empty = same as 'Changed from'. Days are read newest first."
          },
          "newRegistrationsOnly": {
            "title": "Only new registrations",
            "type": "boolean",
            "description": "Keep only entities registered in KRS on the bulletin day — a daily feed of brand-new Polish companies (about 150–300 per working day). Only used with dates.",
            "default": false
          },
          "registry": {
            "title": "Register",
            "enum": [
              "both",
              "P",
              "S"
            ],
            "type": "string",
            "description": "KRS has two registers. With a KRS list, 'both' tries P first and then S.",
            "default": "both"
          },
          "voivodeships": {
            "title": "Voivodeship (region) of the seat",
            "type": "array",
            "description": "Leave empty for all of Poland.",
            "items": {
              "type": "string",
              "enum": [
                "dolnośląskie",
                "kujawsko-pomorskie",
                "lubelskie",
                "lubuskie",
                "łódzkie",
                "małopolskie",
                "mazowieckie",
                "opolskie",
                "podkarpackie",
                "podlaskie",
                "pomorskie",
                "śląskie",
                "świętokrzyskie",
                "warmińsko-mazurskie",
                "wielkopolskie",
                "zachodniopomorskie"
              ],
              "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"
              ]
            }
          },
          "legalForms": {
            "title": "Legal form",
            "type": "array",
            "description": "Leave empty for all legal forms.",
            "items": {
              "type": "string",
              "enum": [
                "SPÓŁKA Z OGRANICZONĄ ODPOWIEDZIALNOŚCIĄ",
                "SPÓŁKA AKCYJNA",
                "PROSTA SPÓŁKA AKCYJNA",
                "SPÓŁKA JAWNA",
                "SPÓŁKA KOMANDYTOWA",
                "SPÓŁKA KOMANDYTOWO-AKCYJNA",
                "SPÓŁKA PARTNERSKA",
                "SPÓŁDZIELNIA",
                "FUNDACJA",
                "STOWARZYSZENIE",
                "STOWARZYSZENIE KULTURY FIZYCZNEJ",
                "ODDZIAŁ ZAGRANICZNEGO PRZEDSIĘBIORCY",
                "PRZEDSIĘBIORSTWO PAŃSTWOWE"
              ],
              "enumTitles": [
                "Sp. z o.o. (limited liability company)",
                "S.A. (joint-stock company)",
                "P.S.A. (simple joint-stock company)",
                "Sp.j. (general partnership)",
                "Sp.k. (limited partnership)",
                "S.K.A. (limited joint-stock partnership)",
                "Sp.p. (professional partnership)",
                "Cooperative",
                "Foundation",
                "Association",
                "Sports association",
                "Branch of a foreign company",
                "State enterprise"
              ]
            }
          },
          "pkdCodes": {
            "title": "PKD activity codes",
            "type": "array",
            "description": "Polish activity codes (PKD), matched as a prefix against all registered activities, e.g. 62 (IT), 62.01.Z, 4120 or 41.20.Z. An entity matches if ANY of its codes starts with ANY of these.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many saved companies. You pay only for saved results.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed: KRS is an open government API. Leave off.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}