{
  "openapi": "3.0.1",
  "info": {
    "title": "New Polish Companies Leads from KRS (Daily)",
    "description": "Daily list of newly registered companies in Poland from the official KRS register: name, NIP, REGON, address, email, website, PKD codes, share capital, board and shareholders. Filter by voivodeship, city, PKD and legal form. Fresh B2B leads every day.",
    "version": "0.1",
    "x-build-id": "bNvFaCiuXma0ijRZa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/donzely~krs-new-companies-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-donzely-krs-new-companies-leads",
        "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/donzely~krs-new-companies-leads/runs": {
      "post": {
        "operationId": "runs-sync-donzely-krs-new-companies-leads",
        "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/donzely~krs-new-companies-leads/run-sync": {
      "post": {
        "operationId": "run-sync-donzely-krs-new-companies-leads",
        "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": {
          "lastDays": {
            "title": "Last days",
            "minimum": 1,
            "maximum": 366,
            "type": "integer",
            "description": "Scan register entries from the last N calendar days, including today. Ignored when 'Date from' is set.",
            "default": 5
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Start of the registration date range (YYYY-MM-DD)."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "End of the range (YYYY-MM-DD). Defaults to today."
          },
          "onlyNewRegistrations": {
            "title": "Only new registrations",
            "type": "boolean",
            "description": "Output only companies registered in the date range. Turn off to get every company with any register change (address, board, capital...) in the range.",
            "default": true
          },
          "voivodeships": {
            "title": "Voivodeships",
            "type": "array",
            "description": "Keep only companies seated in these voivodeships.",
            "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"
              ]
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Keep only companies in these cities, e.g. Warszawa, Kraków.",
            "items": {
              "type": "string"
            }
          },
          "pkdPrefixes": {
            "title": "PKD codes",
            "type": "array",
            "description": "Keep companies with any PKD code starting with these prefixes, e.g. \"62\" (IT), \"43.21\" (electrical installation), \"68\" (real estate). New KRS entries use PKD 2025 codes (e.g. software development is 62.10.B). A 2-digit prefix such as \"62\" matches the whole division. Dots are optional.",
            "items": {
              "type": "string"
            }
          },
          "legalForms": {
            "title": "Legal forms",
            "type": "array",
            "description": "Keep only these legal forms.",
            "items": {
              "type": "string",
              "enum": [
                "SP_ZOO",
                "PSA",
                "SA",
                "JAWNA",
                "KOMANDYTOWA",
                "KOMANDYTOWO_AKCYJNA",
                "PARTNERSKA",
                "FUNDACJA",
                "STOWARZYSZENIE",
                "SPOLDZIELNIA"
              ],
              "enumTitles": [
                "Sp. z o.o. (LLC)",
                "Prosta spółka akcyjna",
                "Spółka akcyjna (JSC)",
                "Spółka jawna",
                "Spółka komandytowa",
                "Spółka komandytowo-akcyjna",
                "Spółka partnerska",
                "Fundacja",
                "Stowarzyszenie",
                "Spółdzielnia"
              ]
            }
          },
          "requireEmail": {
            "title": "Only with email",
            "type": "boolean",
            "description": "Keep only companies that published an email address in KRS.",
            "default": false
          },
          "requireWebsite": {
            "title": "Only with website",
            "type": "boolean",
            "description": "Keep only companies that published a website in KRS.",
            "default": false
          },
          "maxItems": {
            "title": "Max companies",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of companies to output.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel requests to the KRS API.",
            "default": 8
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed for the official API. Optional.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}