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

# Zużycie per klucz API

> Liczba wywołań i naliczonych jednostek w bieżącym okresie rozliczeniowym dla każdego klucza API, z datą ostatniego wywołania.



## OpenAPI

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

    krdata udostępnia dane z polskich rejestrów gospodarczych (KRS, CRBR, KRZ,
    MSiG, BZP, RDF, KNF, UOKiK, SUDOP,

    biała lista VAT) w postaci jednego, spójnego API.


    Uwierzytelnianie odbywa się przez klucz API w nagłówku `x-api-key`. Płatne
    endpointy zużywają jednostki

    z jednej puli; koszt każdego z nich podany jest w jego opisie, a zasady w
    sekcji Rozliczanie.

    Bieżący stan puli zwraca `GET /v1/usage/api`.
  version: 0.1.0
servers:
  - url: https://api.krdata.pl
    description: Production
security: []
paths:
  /v1/usage/keys:
    get:
      tags:
        - Usage
      summary: Zużycie per klucz API
      description: >-
        Liczba wywołań i naliczonych jednostek w bieżącym okresie rozliczeniowym
        dla każdego klucza API, z datą ostatniego wywołania.
      operationId: usage-keys
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageKeys'
      security:
        - APIKeyHeader: []
components:
  schemas:
    UsageKeys:
      properties:
        period_start:
          type: string
          format: date-time
          title: Period Start
        period_end:
          type: string
          format: date-time
          title: Period End
        keys:
          items:
            $ref: '#/components/schemas/UsageKey'
          type: array
          title: Keys
      type: object
      required:
        - period_start
        - period_end
        - keys
      title: UsageKeys
    UsageKey:
      properties:
        api_key_id:
          type: string
          title: Api Key Id
        requests:
          type: integer
          title: Requests
        units:
          type: integer
          title: Units
        last_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last At
      type: object
      required:
        - api_key_id
        - requests
        - units
        - last_at
      title: UsageKey
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````