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

> Zwraca aktualne dane spółki z Krajowego Rejestru Sądowego wraz z podsumowaniem powiązań (członkowie zarządu, wspólnicy, prokurenci, podmioty zależne) oraz licznikami wzmianek w KRZ i MSiG. Wymagany co najmniej jeden identyfikator: `id` (UUID), `krs`, `nip`, `regon` lub `pesel`. Dla PESEL zwraca listę spółek powiązanych z osobą (limit 50). Każdy zwrócony rekord = 1 jednostka puli **Rejestr firm i osób**.



## OpenAPI

````yaml /openapi.json get /v1/krs/record
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/record:
    get:
      tags:
        - KRS
      summary: Pobieranie rekordu
      description: >-
        Zwraca aktualne dane spółki z Krajowego Rejestru Sądowego wraz z
        podsumowaniem powiązań (członkowie zarządu, wspólnicy, prokurenci,
        podmioty zależne) oraz licznikami wzmianek w KRZ i MSiG. Wymagany co
        najmniej jeden identyfikator: `id` (UUID), `krs`, `nip`, `regon` lub
        `pesel`. Dla PESEL zwraca listę spółek powiązanych z osobą (limit 50).
        Każdy zwrócony rekord = 1 jednostka puli **Rejestr firm i osób**.
      operationId: krs-record
      parameters:
        - name: id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Id
        - name: krs
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 10
                maxLength: 10
                pattern: ^\d{10}$
              - type: 'null'
            title: Krs
        - name: nip
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 10
                maxLength: 10
                pattern: ^\d{10}$
              - type: 'null'
            title: Nip
        - name: regon
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                pattern: ^\d{9}(\d{5})?$
              - type: 'null'
            title: Regon
        - name: pesel
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                pattern: ^\d{11}$
              - type: 'null'
            title: Pesel
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/KrsRecord'
                title: Response Krs-Record
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    KrsRecord:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        identifiers:
          $ref: '#/components/schemas/Identifiers'
        name:
          type: string
          title: Name
        name_normalized:
          type: string
          title: Name Normalized
        legal_form:
          anyOf:
            - type: string
            - type: 'null'
          title: Legal Form
        registered_at:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Registered At
        relations_summary:
          $ref: '#/components/schemas/RelationsSummary'
        krz_records_count:
          type: integer
          title: Krz Records Count
        msig_records_count:
          type: integer
          title: Msig Records Count
        crbr_available:
          type: boolean
          title: Crbr Available
        current_excerpt:
          anyOf:
            - additionalProperties: true
              type: object
            - items: {}
              type: array
            - type: 'null'
          title: Current Excerpt
        metadata:
          $ref: '#/components/schemas/Metadata'
      type: object
      required:
        - id
        - identifiers
        - name
        - name_normalized
        - relations_summary
        - krz_records_count
        - msig_records_count
        - crbr_available
        - metadata
      title: KrsRecord
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
    RelationsSummary:
      properties:
        officers:
          type: integer
          title: Officers
        shareholders:
          type: integer
          title: Shareholders
        proxies:
          type: integer
          title: Proxies
        owned_subsidiaries:
          type: integer
          title: Owned Subsidiaries
      type: object
      required:
        - officers
        - shareholders
        - proxies
        - owned_subsidiaries
      title: RelationsSummary
    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
    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

````