{
  "openapi": "3.0.1",
  "info": {
    "title": "Poland KRS New Company Registrations Feed",
    "description": "Newly registered Polish companies, foundations and associations from the official KRS court register: NIP, address, PKD, capital, email, with filters and change detection.",
    "version": "0.2",
    "x-build-id": "zQr0ShlhqeroDBvRE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datagrit~poland-krs-new-companies/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datagrit-poland-krs-new-companies",
        "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/datagrit~poland-krs-new-companies/runs": {
      "post": {
        "operationId": "runs-sync-datagrit-poland-krs-new-companies",
        "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/datagrit~poland-krs-new-companies/run-sync": {
      "post": {
        "operationId": "run-sync-datagrit-poland-krs-new-companies",
        "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": [
              "newRegistrations",
              "allChanges"
            ],
            "type": "string",
            "description": "\"New registrations\" returns entities first entered in KRS inside the date window. \"All changes\" returns every entity that had any entry in the window (new registrations plus changes to existing entities).",
            "default": "newRegistrations"
          },
          "daysBack": {
            "title": "Working days back",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "How many working days to look back (Monday to Friday, Polish public holidays excluded), counting today when it is a working day. The window runs from the earliest of those days to today, so weekend and holiday entries in between are included. 2 = today and the previous working day; on a Sunday that is Thursday to Sunday, on a Monday Friday to Monday. Maximum 15. Ignored when \"From date\" is set.",
            "default": 2
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "First day of the window, YYYY-MM-DD. The KRS API serves bulletins from January 2020 onwards. Leave empty to use \"Working days back\"."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Last day of the window, YYYY-MM-DD (inclusive). Defaults to today. This Actor accepts windows of at most 31 days; split longer periods into several runs."
          },
          "registers": {
            "title": "Registers",
            "type": "array",
            "description": "\"P\" is the register of entrepreneurs (companies, partnerships, cooperatives). \"S\" is the register of associations, foundations and other social organisations. Use [\"P\",\"S\"] for both.",
            "default": [
              "P"
            ],
            "items": {
              "type": "string"
            }
          },
          "scanDepth": {
            "title": "Scan depth",
            "enum": [
              "complete",
              "recent"
            ],
            "type": "string",
            "description": "\"Complete\" reads every entity with an entry in the window whose KRS number is among the newest 100,000 numbers in that window's bulletins (in \"All changes\" mode: every entity with an entry). New registrations get numbers close to the newest ones: on the fully read days 2026-09-25 and 2026-09-29, 575 of the 576 entities with a registration date on that day were within the newest 16,431 numbers; the exception was an entity with a number more than 500,000 below the newest and 21 register entries. \"Recent\" reads only the newest 3,000 numbers: much faster, and it returned 261 of the 267 registrations of 2026-09-29.",
            "default": "complete"
          },
          "legalForms": {
            "title": "Legal forms",
            "type": "array",
            "description": "Keep only these legal forms. Allowed: llc, joint-stock, simple-joint-stock, general-partnership, limited-partnership, limited-joint-stock-partnership, professional-partnership, foundation, association, cooperative, other.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "voivodeships": {
            "title": "Voivodeships",
            "type": "array",
            "description": "Keep only entities with the registered seat in these voivodeships, for example MAZOWIECKIE or Łódzkie (case and Polish letters do not matter).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Keep only entities whose address is in one of these cities, for example Warszawa or Kraków.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "pkdPrefixes": {
            "title": "PKD activity codes",
            "type": "array",
            "description": "Keep only entities whose activity code starts with one of these prefixes, for example 62 (IT), 62.01 or 47.91.Z. Which codes are checked depends on \"PKD scope\".",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "pkdScope": {
            "title": "PKD scope",
            "enum": [
              "main",
              "any"
            ],
            "type": "string",
            "description": "\"Main\" matches only the predominant activity. \"Any\" also matches the additional activities listed in the register.",
            "default": "main"
          },
          "nameKeywords": {
            "title": "Name keywords",
            "type": "array",
            "description": "Keep only entities whose name contains at least one of these words, for example software or transport. Case and Polish letters do not matter.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minShareCapital": {
            "title": "Minimum share capital (PLN)",
            "type": "number",
            "description": "Keep only entities with a share capital of at least this amount. Entities without a capital (associations, partnerships) are dropped when this is set."
          },
          "maxShareCapital": {
            "title": "Maximum share capital (PLN)",
            "type": "number",
            "description": "Keep only entities with a share capital of at most this amount. Entities without a capital are dropped when this is set."
          },
          "onlyWithEmail": {
            "title": "Only with email",
            "type": "boolean",
            "description": "Return only entities that published an email address in the register.",
            "default": false
          },
          "onlyWithWebsite": {
            "title": "Only with website",
            "type": "boolean",
            "description": "Return only entities that published a website address in the register.",
            "default": false
          },
          "sinceLastRun": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "Skip entities that earlier runs with the same settings already returned. The state is kept per combination of mode, registers, scan depth and all filters (the date window and \"Maximum companies\" do not count), in a key-value store named krs-feed-state in your account, for 45 days (35 in \"All changes\" mode). Only entities actually returned to you are remembered. Runs with other filters, and manual test runs with other settings, do not affect it.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum companies",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many entities. Also caps what the run can cost: you pay per entity returned.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "The official KRS API is public and needs no proxy. Enable one only if your runs are blocked.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}