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

> Lista wpisów CEIDG posortowana po dacie rozpoczęcia działalności (`started_at` malejąco). Wspiera filtry zakresu dat (`from`, `to`) i paginację (`limit` do 1000, `offset`). Domyślnie zwraca pełny rekord (`CeidgRecord` z wszystkimi polami) — do masowej integracji. `include_details=false` zwraca lekką wersję. Każdy zwrócony rekord = 1 jednostka puli **Rejestr firm i osób**.



## OpenAPI

````yaml /openapi.json get /v1/ceidg/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/ceidg/stream:
    get:
      tags:
        - CEIDG
      summary: Strumień rekordów
      description: >-
        Lista wpisów CEIDG posortowana po dacie rozpoczęcia działalności
        (`started_at` malejąco). Wspiera filtry zakresu dat (`from`, `to`) i
        paginację (`limit` do 1000, `offset`). Domyślnie zwraca pełny rekord
        (`CeidgRecord` z wszystkimi polami) — do masowej integracji.
        `include_details=false` zwraca lekką wersję. Każdy zwrócony rekord = 1
        jednostka puli **Rejestr firm i osób**.
      operationId: ceidg-stream
      parameters:
        - 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:
                anyOf:
                  - $ref: '#/components/schemas/CeidgRecordPage'
                  - $ref: '#/components/schemas/CeidgStreamPage'
                title: Response Ceidg-Stream
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    CeidgRecordPage:
      properties:
        items:
          items:
            $ref: '#/components/schemas/CeidgRecord'
          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: CeidgRecordPage
    CeidgStreamPage:
      properties:
        items:
          items:
            $ref: '#/components/schemas/CeidgStreamItem'
          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: CeidgStreamPage
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CeidgRecord:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        identifiers:
          $ref: '#/components/schemas/Identifiers'
        name:
          type: string
          title: Name
        name_normalized:
          anyOf:
            - type: string
            - type: 'null'
          title: Name Normalized
        owner_first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Owner First Name
        owner_last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Owner Last Name
        owner_name_normalized:
          anyOf:
            - type: string
            - type: 'null'
          title: Owner Name Normalized
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        www:
          anyOf:
            - type: string
            - type: 'null'
          title: Www
        postal_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Postal Code
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        wojewodztwo:
          anyOf:
            - type: string
            - type: 'null'
          title: Wojewodztwo
        powiat:
          anyOf:
            - type: string
            - type: 'null'
          title: Powiat
        gmina:
          anyOf:
            - type: string
            - type: 'null'
          title: Gmina
        street:
          anyOf:
            - type: string
            - type: 'null'
          title: Street
        building:
          anyOf:
            - type: string
            - type: 'null'
          title: Building
        premises:
          anyOf:
            - type: string
            - type: 'null'
          title: Premises
        pkd_main:
          anyOf:
            - $ref: '#/components/schemas/PkdCode'
            - type: 'null'
        pkd_other:
          anyOf:
            - items:
                $ref: '#/components/schemas/PkdCode'
              type: array
            - type: 'null'
          title: Pkd Other
        pkd_year:
          anyOf:
            - type: integer
            - type: 'null'
          title: Pkd Year
        started_at:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Started At
        suspended_at:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Suspended At
        resumed_at:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Resumed At
        ended_at:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Ended At
        krz_records_count:
          type: integer
          title: Krz Records Count
          default: 0
      type: object
      required:
        - id
        - identifiers
        - name
      title: CeidgRecord
    CeidgStreamItem:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        identifiers:
          $ref: '#/components/schemas/Identifiers'
        name:
          type: string
          title: Name
        owner_first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Owner First Name
        owner_last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Owner Last Name
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        wojewodztwo:
          anyOf:
            - type: string
            - type: 'null'
          title: Wojewodztwo
        pkd_main:
          anyOf:
            - $ref: '#/components/schemas/PkdCode'
            - type: 'null'
        started_at:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Started At
      type: object
      required:
        - id
        - identifiers
        - name
      title: CeidgStreamItem
    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
    Identifiers:
      properties:
        krs:
          anyOf:
            - type: string
            - type: 'null'
          title: Krs
        nip:
          anyOf:
            - type: string
            - type: 'null'
          title: Nip
        regon:
          anyOf:
            - type: string
            - type: 'null'
          title: Regon
        registry_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Registry Type
      type: object
      title: Identifiers
    PkdCode:
      properties:
        code:
          type: string
          title: Code
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
      type: object
      required:
        - code
      title: PkdCode
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````