> ## Documentation Index
> Fetch the complete documentation index at: https://docs.krdata.pl/llms.txt
> Use this file to discover all available pages before exploring further.

# Strumień rekordów

> Globalny strumień obwieszczeń KRZ bez filtrowania po dłużniku. Wspiera filtry: rodzaj sprawy (U/R/B/Z/I), zakres dat oraz wyszukiwanie pełnotekstowe (`text`, min. 3 znaki) w treści i nazwie dłużnika. Paginacja `limit` do 1000, `offset`. Domyślnie zwraca pełne obwieszczenie (`KrzAnnouncement` z `tresc_text` i wszystkimi polami) — do masowej integracji. `include_details=false` zwraca lekką wersję. Każdy zwrócony rekord = 1 jednostka puli **MSiG i KRZ**.



## OpenAPI

````yaml /openapi.json get /v1/krz/stream
openapi: 3.1.0
info:
  title: krdata API
  description: >

    krdata udostępnia dane z polskich rejestrów gospodarczych (KRS, CRBR, KRZ,
    MSiG, biała lista VAT)

    w postaci jednego, spójnego API.


    Uwierzytelnianie odbywa się przez klucz API przekazywany w nagłówku
    `x-api-key`.

    Limity zapytań oraz dzienne pule (PDF, WPV, raporty) wynikają z wybranego
    abonamentu —

    szczegóły zwraca endpoint `GET /v1/usage/summary`.
  version: 0.1.0
servers:
  - url: https://api.krdata.pl
    description: Production
security: []
paths:
  /v1/krz/stream:
    get:
      tags:
        - KRZ
      summary: Strumień rekordów
      description: >-
        Globalny strumień obwieszczeń KRZ bez filtrowania po dłużniku. Wspiera
        filtry: rodzaj sprawy (U/R/B/Z/I), zakres dat oraz wyszukiwanie
        pełnotekstowe (`text`, min. 3 znaki) w treści i nazwie dłużnika.
        Paginacja `limit` do 1000, `offset`. Domyślnie zwraca pełne
        obwieszczenie (`KrzAnnouncement` z `tresc_text` i wszystkimi polami) —
        do masowej integracji. `include_details=false` zwraca lekką wersję.
        Każdy zwrócony rekord = 1 jednostka puli **MSiG i KRZ**.
      operationId: krz-stream
      parameters:
        - name: rodzaj_sprawy
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 1
                maxLength: 1
              - type: 'null'
            title: Rodzaj Sprawy
        - name: from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            title: From
        - name: to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            title: To
        - name: text
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 3
                maxLength: 200
              - type: 'null'
            title: Text
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            default: 20
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
        - name: include_details
          in: query
          required: false
          schema:
            type: boolean
            default: true
            title: Include Details
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/KrzRecordPage'
                  - $ref: '#/components/schemas/KrzLitePage'
                title: Response Krz-Stream
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    KrzRecordPage:
      properties:
        items:
          items:
            $ref: '#/components/schemas/KrzAnnouncement'
          type: array
          title: Items
        limit:
          type: integer
          title: Limit
        offset:
          type: integer
          title: Offset
        has_more:
          type: boolean
          title: Has More
      type: object
      required:
        - items
        - limit
        - offset
        - has_more
      title: KrzRecordPage
    KrzLitePage:
      properties:
        items:
          items:
            $ref: '#/components/schemas/KrzLiteRow'
          type: array
          title: Items
        limit:
          type: integer
          title: Limit
        offset:
          type: integer
          title: Offset
        has_more:
          type: boolean
          title: Has More
      type: object
      required:
        - items
        - limit
        - offset
        - has_more
      title: KrzLitePage
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    KrzAnnouncement:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        announcement_date:
          type: string
          format: date
          title: Announcement Date
        signature:
          anyOf:
            - type: string
            - type: 'null'
          title: Signature
        number:
          anyOf:
            - type: string
            - type: 'null'
          title: Number
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        court:
          anyOf:
            - type: string
            - type: 'null'
          title: Court
        court_division:
          anyOf:
            - type: string
            - type: 'null'
          title: Court Division
        rodzaj_sprawy:
          anyOf:
            - type: string
            - type: 'null'
          title: Rodzaj Sprawy
        rodzaj_sprawy_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Rodzaj Sprawy Label
        subcategory:
          anyOf:
            - type: string
            - type: 'null'
          title: Subcategory
        debtor:
          $ref: '#/components/schemas/KrzDebtor'
        advisors:
          anyOf:
            - items:
                $ref: '#/components/schemas/KrzAdvisor'
              type: array
            - type: 'null'
          title: Advisors
        attributes:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Attributes
        tresc_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Tresc Text
        metadata:
          $ref: '#/components/schemas/Metadata'
      type: object
      required:
        - id
        - announcement_date
        - debtor
        - metadata
      title: KrzAnnouncement
    KrzLiteRow:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        announcement_date:
          type: string
          format: date
          title: Announcement Date
        signature:
          anyOf:
            - type: string
            - type: 'null'
          title: Signature
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        rodzaj_sprawy:
          anyOf:
            - type: string
            - type: 'null'
          title: Rodzaj Sprawy
        rodzaj_sprawy_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Rodzaj Sprawy Label
        subcategory:
          anyOf:
            - type: string
            - type: 'null'
          title: Subcategory
        debtor_kind:
          anyOf:
            - type: string
            - type: 'null'
          title: Debtor Kind
        debtor_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Debtor Name
        debtor_krs:
          anyOf:
            - type: string
            - type: 'null'
          title: Debtor Krs
        debtor_nip:
          anyOf:
            - type: string
            - type: 'null'
          title: Debtor Nip
        debtor_company_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Debtor Company Id
      type: object
      required:
        - id
        - announcement_date
      title: KrzLiteRow
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    KrzDebtor:
      properties:
        kind:
          anyOf:
            - type: string
            - type: 'null'
          title: Kind
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        pesel:
          anyOf:
            - type: string
            - type: 'null'
          title: Pesel
        birth_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Birth Date
        krs:
          anyOf:
            - type: string
            - type: 'null'
          title: Krs
        nip:
          anyOf:
            - type: string
            - type: 'null'
          title: Nip
        legal_form:
          anyOf:
            - type: string
            - type: 'null'
          title: Legal Form
        miejscowosc:
          anyOf:
            - type: string
            - type: 'null'
          title: Miejscowosc
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
        linked_person_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Linked Person Id
        linked_company_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Linked Company Id
      type: object
      title: KrzDebtor
    KrzAdvisor:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        role:
          anyOf:
            - type: string
            - type: 'null'
          title: Role
        event_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Event Code
        krs:
          anyOf:
            - type: string
            - type: 'null'
          title: Krs
        nip:
          anyOf:
            - type: string
            - type: 'null'
          title: Nip
        company_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Company Id
      type: object
      title: KrzAdvisor
    Metadata:
      properties:
        first_seen:
          type: string
          format: date-time
          title: First Seen
        last_updated:
          type: string
          format: date-time
          title: Last Updated
        source_updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Source Updated At
      type: object
      required:
        - first_seen
        - last_updated
      title: Metadata
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````