> ## 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ń zmian

> Globalny strumień zmian w odpisach KRS ze wszystkich spółek, posortowany po dacie wykrycia (`changed_on` malejąco). Każdy element to pojedyncza atomowa zmiana (firma, kategoria, operacja, etykieta pola, wartość przed/po) — format zorientowany na masową integrację. Wspiera filtr `category`, zakres dat (`from`, `to`) i paginację (`limit` do 1000, `offset`). `include_details=false` pomija wartości `old_value`/`new_value`. Każde rozpoczęte 10 zwróconych zmian = 1 jednostka puli **Rejestr firm i osób** (0,1 / zmianę).



## OpenAPI

````yaml /openapi.json get /v1/krs/changes/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/krs/changes/stream:
    get:
      tags:
        - KRS
      summary: Strumień zmian
      description: >-
        Globalny strumień zmian w odpisach KRS ze wszystkich spółek, posortowany
        po dacie wykrycia (`changed_on` malejąco). Każdy element to pojedyncza
        atomowa zmiana (firma, kategoria, operacja, etykieta pola, wartość
        przed/po) — format zorientowany na masową integrację. Wspiera filtr
        `category`, zakres dat (`from`, `to`) i paginację (`limit` do 1000,
        `offset`). `include_details=false` pomija wartości
        `old_value`/`new_value`. Każde rozpoczęte 10 zwróconych zmian = 1
        jednostka puli **Rejestr firm i osób** (0,1 / zmianę).
      operationId: krs-changes-stream
      parameters:
        - name: category
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Category
        - 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: 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:
                $ref: '#/components/schemas/KrsChangeStreamPage'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    KrsChangeStreamPage:
      properties:
        items:
          items:
            $ref: '#/components/schemas/KrsChangeStreamItem'
          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: KrsChangeStreamPage
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    KrsChangeStreamItem:
      properties:
        id:
          type: integer
          title: Id
        krs:
          type: string
          title: Krs
        company_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Company Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        changed_on:
          type: string
          format: date
          title: Changed On
        category:
          type: string
          title: Category
        change_type:
          type: string
          title: Change Type
        operation:
          type: string
          title: Operation
        label:
          type: string
          title: Label
        entity_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Entity Label
        old_value:
          anyOf:
            - {}
            - type: 'null'
          title: Old Value
        new_value:
          anyOf:
            - {}
            - type: 'null'
          title: New Value
      type: object
      required:
        - id
        - krs
        - changed_on
        - category
        - change_type
        - operation
        - label
      title: KrsChangeStreamItem
    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
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````