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

# Pobieranie wielu rekordów

> Zwraca obwieszczenia z Krajowego Rejestru Zadłużonych dla jednego lub wielu dłużników. Parametr `q` można przekazać wielokrotnie (do 50 dłużników): KRS, NIP, PESEL, UUID lub identyfikator z prefiksem `krs:` / `person:`. Wspiera filtry dat, paginację oraz tryby pełny/lekki (`include_details`). Flaga `append_first_entry` dołącza wszystkie wpisy o tej samej sygnaturze sprawy. Każdy zwrócony rekord = 1 jednostka puli **MSiG i KRZ**.



## OpenAPI

````yaml /openapi.json get /v1/krz/records
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/records:
    get:
      tags:
        - KRZ
      summary: Pobieranie wielu rekordów
      description: >-
        Zwraca obwieszczenia z Krajowego Rejestru Zadłużonych dla jednego lub
        wielu dłużników. Parametr `q` można przekazać wielokrotnie (do 50
        dłużników): KRS, NIP, PESEL, UUID lub identyfikator z prefiksem `krs:` /
        `person:`. Wspiera filtry dat, paginację oraz tryby pełny/lekki
        (`include_details`). Flaga `append_first_entry` dołącza wszystkie wpisy
        o tej samej sygnaturze sprawy. Każdy zwrócony rekord = 1 jednostka puli
        **MSiG i KRZ**.
      operationId: krz-records
      parameters:
        - name: q
          in: query
          required: true
          schema:
            type: array
            items:
              type: string
              minLength: 10
              maxLength: 64
            description: >-
              Debtor identifier or announcement reference (auto-detected by
              format): KRS (10-digit '0…'), NIP (10-digit), PESEL (11-digit),
              UUID (matches announcement id, debtor_person_id, or
              debtor_company_id), case signature (e.g. 'WA1R/GUp/12/2026'),
              announcement number (e.g. '20260529/00559'), or a graph node id
              like 'krs:0000123456' / 'person:<uuid>'.
            title: Q
          description: >-
            Debtor identifier or announcement reference (auto-detected by
            format): KRS (10-digit '0…'), NIP (10-digit), PESEL (11-digit), UUID
            (matches announcement id, debtor_person_id, or debtor_company_id),
            case signature (e.g. 'WA1R/GUp/12/2026'), announcement number (e.g.
            '20260529/00559'), or a graph node id like 'krs:0000123456' /
            'person:<uuid>'.
        - 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: 100
            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
        - name: append_first_entry
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Append First Entry
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/KrzRecordPage'
                  - $ref: '#/components/schemas/KrzLitePage'
                title: Response Krz-Records
        '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

````