{
  "openapi": "3.0.1",
  "info": {
    "title": "Poland KRS New Companies & Register Changes Feed (daily)",
    "description": "New Polish company registrations plus KRS register events (liquidation, bankruptcy, restructuring, dissolution, deletion, merger, name/capital/address changes) from the official KRS Open API. NIP, REGON, PKD, share capital, city. Filters and 'new since last run' mode.",
    "version": "0.1",
    "x-build-id": "wr9fUwB40EXxArmXb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/moment-data~poland-krs-company-changes-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-moment-data-poland-krs-company-changes-feed",
        "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/moment-data~poland-krs-company-changes-feed/runs": {
      "post": {
        "operationId": "runs-sync-moment-data-poland-krs-company-changes-feed",
        "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/moment-data~poland-krs-company-changes-feed/run-sync": {
      "post": {
        "operationId": "run-sync-moment-data-poland-krs-company-changes-feed",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "window",
              "sinceLastRun"
            ],
            "type": "string",
            "description": "window (default): events on the latest bulletin day(s), no saved state. sinceLastRun: only events not delivered before for this State key, resuming from the last bulletin day; use for daily schedules.",
            "default": "window"
          },
          "eventTypes": {
            "title": "Event types",
            "type": "array",
            "description": "registration = newly registered entities (fast). Other types scan the KRS daily change bulletin (one API call per entity, see Max entities to scan).",
            "items": {
              "type": "string",
              "enum": [
                "registration",
                "deletion",
                "bankruptcy",
                "restructuring",
                "liquidation",
                "dissolution",
                "merger",
                "suspension",
                "debtNotice",
                "nameChange",
                "legalFormChange",
                "capitalChange",
                "addressChange",
                "shareholderChange",
                "managementChange",
                "activityChange",
                "financialStatement",
                "otherChange"
              ],
              "enumTitles": [
                "New registration",
                "Deleted from register",
                "Bankruptcy (upadłość)",
                "Restructuring proceeding",
                "Liquidation opened",
                "Dissolution (incl. without liquidation)",
                "Merger / division / conversion",
                "Business suspended",
                "Debt / enforcement notice (section 4)",
                "Name change",
                "Legal form change",
                "Share capital change",
                "Seat / address change",
                "Shareholder change (no names)",
                "Management / representation change (no names)",
                "Business activity (PKD) change",
                "Financial statement filed",
                "Other change"
              ]
            },
            "default": [
              "registration"
            ]
          },
          "date": {
            "title": "Bulletin date",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Optional YYYY-MM-DD. Default: yesterday (Warsaw time), walking back over empty days."
          },
          "daysBack": {
            "title": "Bulletin days",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of daily bulletins to read, newest first.",
            "default": 1
          },
          "autoWiden": {
            "title": "Auto-widen to earlier days",
            "type": "boolean",
            "description": "Window mode without a fixed date: keep reading earlier days (up to 5) until Max items is reached.",
            "default": true
          },
          "registers": {
            "title": "Registers",
            "type": "array",
            "description": "P = register of entrepreneurs (companies, cooperatives, branches). S = associations, foundations and public health units.",
            "items": {
              "type": "string",
              "enum": [
                "P",
                "S"
              ],
              "enumTitles": [
                "P - entrepreneurs",
                "S - associations & foundations"
              ]
            },
            "default": [
              "P"
            ]
          },
          "legalForms": {
            "title": "Legal forms",
            "type": "array",
            "description": "Aliases: sp. z o.o., S.A., P.S.A., cooperative, foundation, association, branch (sp.j., sp.k., sp.p., S.K.A. need Include partnerships). Or any text contained in the Polish legal form.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includePartnerships": {
            "title": "Include partnerships",
            "type": "boolean",
            "description": "Partnerships (spółka jawna, partnerska, komandytowa, komandytowo-akcyjna) must carry a partner's surname in their name, so they are excluded by default.",
            "default": false
          },
          "voivodeships": {
            "title": "Voivodeships",
            "type": "array",
            "description": "e.g. Mazowieckie, Małopolskie, Śląskie (diacritics optional).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Seat city, e.g. Warszawa, Kraków, Wrocław, Gdańsk.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "pkdPrefixes": {
            "title": "PKD code prefixes",
            "type": "array",
            "description": "Polish activity codes (main or other), e.g. 62 (IT), 70.22, 41 (construction), 68 (real estate).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "nameKeywords": {
            "title": "Name contains",
            "type": "array",
            "description": "Any of these words in the company name, e.g. SOLAR, LOGISTICS, MED.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minShareCapital": {
            "title": "Minimum share capital (PLN)",
            "minimum": 0,
            "type": "integer",
            "description": "Only companies with at least this registered share capital."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum records per run.",
            "default": 30
          },
          "maxScan": {
            "title": "Max entities to scan",
            "minimum": 10,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on KRS extracts read per run (one API call each). A weekday bulletin lists ~3,000-5,000 entities; raise this for complete distress/change coverage (about 4-8 entities per second).",
            "default": 300
          },
          "concurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Polite parallelism towards the public API.",
            "default": 2
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Separate saved state per saved search in sinceLastRun mode.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}