{
  "openapi": "3.0.1",
  "info": {
    "title": "Poland New Companies (KRS daily registrations)",
    "description": "Companies newly registered in the Polish KRS every day, from the official Open API KRS: NIP, REGON, address, capital, PKD. Filter by legal form, voivodeship, PKD. No persons.",
    "version": "0.1",
    "x-build-id": "MijfAofU9WZfhGo6V"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/delfielectronics~poland-new-companies/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-delfielectronics-poland-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/delfielectronics~poland-new-companies/runs": {
      "post": {
        "operationId": "runs-sync-delfielectronics-poland-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/delfielectronics~poland-new-companies/run-sync": {
      "post": {
        "operationId": "run-sync-delfielectronics-poland-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": {
          "dateFrom": {
            "title": "Bulletin day from",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "First KRS bulletin day to read (YYYY-MM-DD, Polish time, from 2021-12-09). Empty = yesterday. A window holds at most 31 days."
          },
          "dateTo": {
            "title": "Bulletin day to",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Last KRS bulletin day to read (YYYY-MM-DD, not after today). Empty = yesterday."
          },
          "mode": {
            "title": "What to return",
            "enum": [
              "new",
              "changed"
            ],
            "type": "string",
            "description": "new = entities registered in KRS at most 'Registered within N days' before the bulletin day they appear on; changed = every entity with any KRS entry on those days.",
            "default": "new"
          },
          "newWithinDays": {
            "title": "Registered within N days",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "In 'new' mode: keep entities registered at most this many days before the bulletin day (0 = registered that day). New entities appear in the bulletin on 1-4 days after registration.",
            "default": 7
          },
          "registers": {
            "title": "Registers",
            "type": "array",
            "description": "P = register of businesses (companies, partnerships, cooperatives, foundations doing business); S = associations, foundations and other organisations. Both = P tried first.",
            "items": {
              "type": "string",
              "enum": [
                "P",
                "S"
              ],
              "enumTitles": [
                "Businesses (P)",
                "Associations and foundations (S)"
              ]
            },
            "default": [
              "P"
            ]
          },
          "legalForms": {
            "title": "Legal forms",
            "type": "array",
            "description": "Keep these legal forms (as KRS publishes them). Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "SPÓŁKA Z OGRANICZONĄ ODPOWIEDZIALNOŚCIĄ",
                "PROSTA SPÓŁKA AKCYJNA",
                "SPÓŁKA AKCYJNA",
                "SPÓŁKA KOMANDYTOWA",
                "SPÓŁKA JAWNA",
                "SPÓŁKA PARTNERSKA",
                "SPÓŁKA KOMANDYTOWO-AKCYJNA",
                "SPÓŁDZIELNIA",
                "FUNDACJA",
                "STOWARZYSZENIE",
                "STOWARZYSZENIE KULTURY FIZYCZNEJ",
                "ODDZIAŁ ZAGRANICZNEGO PRZEDSIĘBIORCY",
                "SAMODZIELNY PUBLICZNY ZAKŁAD OPIEKI ZDROWOTNEJ",
                "PRZEDSIĘBIORSTWO PAŃSTWOWE",
                "INSTYTUT BADAWCZY",
                "INSTYTUT BADAWCZY / INSTYTUT DZIAŁAJĄCY W RAMACH SIECI BADAWCZEJ ŁUKASIEWICZ",
                "IZBA RZEMIEŚLNICZA",
                "TOWARZYSTWO UBEZPIECZEŃ WZAJEMNYCH",
                "SPÓŁKA EUROPEJSKA",
                "EUROPEJSKIE ZGRUPOWANIE INTERESÓW GOSPODARCZYCH"
              ]
            },
            "default": []
          },
          "voivodeships": {
            "title": "Voivodeships",
            "type": "array",
            "description": "Registered seat voivodeship, e.g. mazowieckie, Śląskie or slaskie (case and Polish letters ignored). Empty = all of Poland.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "pkdPrefixes": {
            "title": "PKD codes",
            "type": "array",
            "description": "Activity codes (PKD 2025) or their start: 62, 62.1, 62.10, 62.10.B or 6210B. Matched on the main activity unless 'Also match other activities' is on. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "pkdIncludeOther": {
            "title": "Also match other activities",
            "type": "boolean",
            "description": "Match 'PKD codes' on the other registered activities too, not only on the main one.",
            "default": false
          },
          "onlyNew": {
            "title": "Only entities not returned before",
            "type": "boolean",
            "description": "Return only entities this actor has not returned to you before under the same memory name and filters (memory kept 60 days). A new company is listed on several bulletin days, so keep this on for a daily feed.",
            "default": true
          },
          "stateKey": {
            "title": "Memory name",
            "pattern": "^[A-Za-z0-9_-]{1,50}$",
            "type": "string",
            "description": "Name of the 'Only entities not returned before' memory (1-50 letters, digits, - or _). Use different names for separate feeds.",
            "default": "default"
          },
          "maxItems": {
            "title": "Max companies",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after saving this many companies; no further extract is read or charged (the bulletin days of the window are read and charged first). The form starts at 100 for a cheap first run; the API default is 1000.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}