{
  "openapi": "3.0.1",
  "info": {
    "title": "Poland KRS Full Extract & Filing History Lookup",
    "description": "Look up companies, foundations, and associations in Poland's KRS (Krajowy Rejestr Sadowy) by KRS number. Get legal form, REGON/NIP, address, share capital, board members, PKD activity codes, and financial filing history from the official registry.",
    "version": "1.0",
    "x-build-id": "XGCTBUkHeCz0B9Hba"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dataspryva~poland-krs-full-extract-and-filing-history-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dataspryva-poland-krs-full-extract-and-filing-history-lookup",
        "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/dataspryva~poland-krs-full-extract-and-filing-history-lookup/runs": {
      "post": {
        "operationId": "runs-sync-dataspryva-poland-krs-full-extract-and-filing-history-lookup",
        "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/dataspryva~poland-krs-full-extract-and-filing-history-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-dataspryva-poland-krs-full-extract-and-filing-history-lookup",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "byKrsNumber",
              "byNipOrRegon",
              "krsChangesByDate"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "byKrsNumber"
          },
          "krsNumbers": {
            "title": "KRS numbers",
            "type": "array",
            "description": "Polish KRS registry numbers, e.g. `0000006865`. Leading zeros optional. Used by `mode=byKrsNumber`.",
            "default": [
              "0000006865"
            ],
            "items": {
              "type": "string"
            }
          },
          "identifiers": {
            "title": "NIP / REGON identifiers",
            "type": "array",
            "description": "Polish NIP (10 digits) or REGON (9 or 14 digits), with or without dashes, e.g. `5272270874` or `016231431`. Used by `mode=byNipOrRegon`; the actor resolves the KRS number through the official VAT whitelist.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "register": {
            "title": "Register",
            "enum": [
              "P",
              "S",
              "AUTO"
            ],
            "type": "string",
            "description": "Which KRS register the numbers belong to. `AUTO` tries P then S. `byNipOrRegon` and bulletin-detail lookups try the other register automatically when the first misses.",
            "default": "P"
          },
          "extractType": {
            "title": "Extract type",
            "enum": [
              "Aktualny",
              "Pelny"
            ],
            "type": "string",
            "description": "Current state only, or the full historical extract with every past entry and the complete field-change history.",
            "default": "Aktualny"
          },
          "publicBenefitOrgOnly": {
            "title": "Public benefit organizations only",
            "type": "boolean",
            "description": "Only emit entities with official Public Benefit Organization (OPP) status. Mainly relevant for register=S.",
            "default": false
          },
          "enrichWithVatRegistry": {
            "title": "Enrich with VAT whitelist",
            "type": "boolean",
            "description": "For `mode=byKrsNumber`, also fetch the official VAT whitelist record (VAT status, bank accounts, working address, registration/removal dates). Adds one request per company. `byNipOrRegon` always includes it.",
            "default": false
          },
          "includeBankAccounts": {
            "title": "Include bank accounts",
            "type": "boolean",
            "description": "Include the VAT whitelist bank-account list in `taxRegistry.bankAccounts`.",
            "default": true
          },
          "vatDate": {
            "title": "VAT status date",
            "type": "string",
            "description": "Date for the VAT whitelist lookup (YYYY-MM-DD); defaults to today. Cannot be in the future."
          },
          "changeDate": {
            "title": "Change date",
            "type": "string",
            "description": "Date of the KRS change bulletin (YYYY-MM-DD); defaults to yesterday. Available from 2022-03-08 onwards. Used by `mode=krsChangesByDate`."
          },
          "hourFrom": {
            "title": "Hour from (0–23)",
            "minimum": 0,
            "maximum": 23,
            "type": "integer",
            "description": "Start hour for the hourly bulletin. Set both `hourFrom` and `hourTo`, or leave both empty for the full day."
          },
          "hourTo": {
            "title": "Hour to (0–23)",
            "minimum": 0,
            "maximum": 23,
            "type": "integer",
            "description": "End hour for the hourly bulletin; must be greater than `hourFrom`."
          },
          "includeCompanyDetails": {
            "title": "Include company details",
            "type": "boolean",
            "description": "For `mode=krsChangesByDate`, fetch a full company record for every changed KRS number. Off returns lightweight KRS-change rows only (faster and much cheaper for large daily bulletins).",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap on emitted records (and on KRS numbers processed in bulletin mode).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}