Compabase Financials API

Financial statements, original filings and financial statistics of one company.

GitHub OpenAPI

Operations 3

GET /companies/krs/{krs}/financial-statements Financial statements #
GET /companies/krs/{krs}/statistics Peer statistics & rankings #
GET /companies/krs/{krs}/financial-documents Financial document inventory #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/compabase:compabase-financials-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

compabase-financials-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Compabase Financials API
  version: 1.0.0
  description: 'Operations tagged Financials across 2 of this provider''s published API definitions: compabase-openapi.yaml, compabase-openapi.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://compabase.com/api/v1
  description: Full URL
tags:
- name: Financials
  description: Financial statements, original filings and financial statistics of one company.
paths:
  /companies/krs/{krs}/financial-statements:
    get:
      tags:
      - Financials
      summary: Financial statements
      description: 'Returns financial metrics only (without company profile or document files),

        grouped by statement year. Values include PLN/USD/EUR columns from

        `entity_financial_metrics` and structured `esf_statement_lines` when extracted.

        XML files are on the documents endpoint.'
      security:
      - ApiKeyAuth: []
      - BearerAuth: []
      parameters:
      - name: krs
        in: path
        required: true
        schema:
          type: string
        description: KRS input is normalized by stripping non-digits and left-padding to 10 digits. After normalization, KRS must contain exactly 10 digits; otherwise request fails with `400 INVALID_KRS`.
        example: 0000028860
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          description: Financial metrics grouped by year.
          content:
            application/json:
              schema:
                type: object
              example:
                financials:
                  years:
                  - '2024'
                  - '2023'
                  byYear:
                    '2024':
                    - sf_period_from: '2024-01-01'
                      sf_period_to: '2024-12-31'
                      currency: PLN
                      ebit: 2484000000
                      ebitda: 0
                      roa: 0.5415713793427525
                      net_margin: 0.4538198626668145
                      asset_turnover: 1.1930547288618778
                      revenue_operating: 303192000000
                      revenue_total: 304668000000
                      operating_costs_total: 301809000000
                      financial_income: 1476000000
                      financial_costs: 1908000000
                      profit_gross: 1571000000
                      income_tax: null
                      revenue_total_usd: 76338762214.98372
                      revenue_total_eur: 70672233820.45929
                      revenue_operating_usd: 75969071685.3297
                      revenue_operating_eur: 70329936094.86815
                      operating_costs_total_usd: 75622400400.90202
                      operating_costs_total_eur: 70009128857.56822
                      profit_net: 1383000000
                      profit_net_usd: 346529691.80656475
                      profit_net_eur: 320807237.2999304
                      financial_income_usd: 369869938.4584869
                      financial_income_eur: 342297725.591141
                      financial_costs_usd: 478544714.9568987
                      financial_costs_eur: 442881221.5274784
                      total_assets: 255368000000
                      total_assets_usd: 63985968428.96517
                      total_assets_eur: 59236372071.44514
                      fixed_assets_eur: 43321967061.00673
                      current_assets_eur: 15914405010.438414
                      equity_eur: 34026675945.25632
                      liabilities_and_provisions_eur: 25209696126.18882
                    '2023':
                    - sf_period_from: '2023-01-01'
                      sf_period_to: '2023-12-31'
                      currency: PLN
                      roa: 7.845846361165577
                      asset_turnover: 1.4862592645867558
                      revenue_operating: 389584000000
                      revenue_total: 392637000000
                      operating_costs_total: 362463000000
                      profit_gross: 26365000000
                      income_tax: null
                      revenue_total_usd: 93438280859.57022
                      revenue_total_eur: 86430615479.43999
                      revenue_operating_usd: 92711915658.9751
                      revenue_operating_eur: 85758485784.99783
                      operating_costs_total_usd: 86223593016.49176
                      operating_costs_total_eur: 79759037499.87363
                      profit_net: 20727000000
                      profit_net_usd: 4932533733.133433
                      profit_net_eur: 4562604561.063662
                      total_assets: 264178000000
                      total_assets_usd: 62868089764.64149
                      total_assets_eur: 58153121422.91098
                      fixed_assets_eur: 37596856564.23351
                      current_assets_eur: 20556264858.677467
                      equity_eur: 33719292066.566875
                      liabilities_and_provisions_eur: 24433829356.344105
        '404':
          $ref: '#/components/responses/NotFound'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      operationId: getCompaniesKrsByKrsFinancialStatements
      x-operation-id-source: derived
    servers:
    - url: https://compabase.com/api/v1
      description: Full URL
  /companies/krs/{krs}/statistics:
    get:
      tags:
      - Financials
      summary: Peer statistics & rankings
      description: 'Industry / region / country peer benchmarks and the company''s rank positions.

        Use when `hasStatistics` on the full profile is `true`.


        Response shape:

        - `company` – latest indexed figures (PLN/EUR/USD) for the company

        - `scopes` – rank in each peer group (`pkd_full`, `pkd_division`, `pkd_section`, `region`, `country`)

        - `benchmarks` – peer distribution per scope key (`median`, `p25`/`p75`/`p90`, `n_companies`, …)'
      security:
      - ApiKeyAuth: []
      - BearerAuth: []
      parameters:
      - name: krs
        in: path
        required: true
        schema:
          type: string
        example: 0001088645
      - name: locale
        in: query
        required: false
        schema:
          type: string
          default: en
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          description: 'Rankings (`scopes`) plus peer distributions (`benchmarks` keyed by

            `scope_type::scope_key`). Company figures are the latest indexed snapshot.

            '
          content:
            application/json:
              schema:
                type: object
              example:
                hasData: true
                company:
                  registry_number: 0001088645
                  primary_pkd: 73.11.Z
                  region: wielkopolskie
                  period_to: '2025-12-31'
                scopes:
                - scope_type: pkd_full
                  scope_key: 73.11.Z
                  label: Advertising agencies
                  rank_position: 2811
                benchmarks:
                  pkd_full::73.11.Z:
                    label: Advertising agencies
                    metrics:
                      revenue_total:
                        PLN:
                          n_companies: 6859
                          median: 437040.24
                          mean: 4143982.87
                          winsor_mean: 2544201.61
                        EUR:
                          n_companies: 6857
                          median: 101158.92
                          mean: 963908.02
                          winsor_mean: 590328.7
                      profit_net:
                        PLN:
                          n_companies: 6859
                          median: 15200.4
                          mean: 288817.1
                          winsor_mean: 160485.18
                      total_assets:
                        PLN:
                          n_companies: 6811
                          median: 230483.3
                          mean: 2547678.84
                          winsor_mean: 1277411.54
                  country::PL:
                    label: Polska
                    metrics:
                      revenue_total:
                        PLN:
                          n_companies: 479837
                          median: 695181.35
                          mean: 15874161.59
                          winsor_mean: 6549627.07
        '404':
          $ref: '#/components/responses/NotFound'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      operationId: getCompaniesKrsByKrsStatistics
      x-operation-id-source: derived
    servers:
    - url: https://compabase.com/api/v1
      description: Full URL
  /companies/krs/{krs}/financial-documents:
    get:
      tags:
      - Financials
      summary: Financial document inventory
      description: 'Metadata list of financial documents for the company (periods, types, names).

        Returns metadata only. Structured metrics and `esf_statement_lines` are on the

        profile and financial-statements endpoints.'
      security:
      - ApiKeyAuth: []
      - BearerAuth: []
      parameters:
      - name: krs
        in: path
        required: true
        schema:
          type: string
        example: 0000028860
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 25
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          default: 0
      responses:
        '200':
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          description: Document metadata page.
          content:
            application/json:
              schema:
                type: object
              example:
                krs: 0000028860
                entity_id: ad2ae683-ccbd-49c6-a85c-648024435cb5
                documents:
                - id: b20af05c-b310-46d8-a68c-827209257fed
                  document_type_ui: Dokument RDF PDF (rodzaj 9)
                  period_from: '2025-01-01'
                  period_to: '2025-12-31'
                  extracted_at: '2026-10-12T09:04:04.965Z'
                - id: fbb530f9-4c6a-4331-af77-073d20146d70
                  document_type_ui: Dokument RDF (rodzaj 22)
                  period_from: '2025-01-01'
                  period_to: '2025-12-31'
                  extracted_at: '2026-08-17T15:14:26.060Z'
                pagination:
                  docsLimit: 25
                  docsOffset: 0
                  hasMore: true
        '404':
          $ref: '#/components/responses/NotFound'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      operationId: getCompaniesKrsByKrsFinancialDocuments
      x-operation-id-source: derived
    servers:
    - url: https://compabase.com/api/v1
      description: Full URL
components:
  responses:
    Unauthorized:
      description: Missing, invalid, or revoked API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            statusCode: 401
            statusMessage: Unauthorized
            message: Unauthorized
            data:
              message: Missing or invalid API key.
    BadRequest:
      description: Invalid request parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            invalidKrs:
              summary: Invalid KRS value
              value:
                statusCode: 400
                statusMessage: Invalid krs
                message: Invalid krs
                data:
                  error:
                    code: INVALID_KRS
                    message: After normalization, KRS must contain exactly 10 digits.
                    details:
                      parameter: krs
            invalidCursor:
              summary: Invalid cursor format
              value:
                statusCode: 400
                statusMessage: Invalid cursor
                message: Invalid cursor
                data:
                  error:
                    code: INVALID_CURSOR
                    message: Cursor must be a valid UUID.
                    details:
                      parameter: cursor
            invalidRange:
              summary: Invalid numeric range
              value:
                statusCode: 400
                statusMessage: Invalid range
                message: Invalid range
                data:
                  error:
                    code: INVALID_RANGE
                    message: revenue_min cannot be greater than revenue_max.
                    details:
                      parameter: revenue_min,revenue_max
    TooManyRequests:
      description: 'Rate limit (120 requests per minute per key) or monthly quota exceeded.

        `Retry-After` says how many seconds to wait before retrying.

        '
      headers:
        Retry-After:
          $ref: '#/components/headers/Retry-After'
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            statusCode: 429
            statusMessage: Too Many Requests
            message: Too Many Requests
            data:
              error:
                code: QUOTA_EXCEEDED
                message: Monthly quota exceeded for this API key.
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            statusCode: 404
            statusMessage: Not Found
            message: Not Found
            data:
              error:
                code: NOT_FOUND
                message: Company not found.
  headers:
    X-RateLimit-Remaining:
      description: Requests left in the current one-minute window.
      schema:
        type: integer
      example: 117
    Retry-After:
      description: Seconds to wait before retrying.
      schema:
        type: integer
      example: 30
    X-RateLimit-Limit:
      description: Requests allowed per minute for this API key.
      schema:
        type: integer
      example: 120
    X-RateLimit-Reset:
      description: Seconds until the current one-minute window resets.
      schema:
        type: integer
      example: 42
  schemas:
    ErrorResponse:
      type: object
      required:
      - statusCode
      - statusMessage
      - message
      properties:
        statusCode:
          type: integer
          description: HTTP status code.
        statusMessage:
          type: string
          description: HTTP status text.
        message:
          type: string
          description: Short error summary (same as statusMessage for most errors).
        data:
          type: object
          description: Domain error payload set by the handler.
          properties:
            message:
              type: string
              description: Human-readable message (used by 401 responses).
            error:
              type: object
              description: Structured domain error (used by 400/404/429 responses).
              properties:
                code:
                  type: string
                  description: Machine-readable domain error code.
                  enum:
                  - INVALID_KRS
                  - INVALID_NIP
                  - INVALID_CURSOR
                  - INVALID_RANGE
                  - INVALID_PARAMETER
                  - CONFLICTING_PARAMETERS
                  - INVALID_BOOLEAN
                  - INVALID_KEYWORDS
                  - INVALID_API_KEY
                  - UNAUTHORIZED
                  - NOT_FOUND
                  - QUOTA_EXCEEDED
                message:
                  type: string
                details:
                  type: object
                  additionalProperties: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer
x-refined-from:
- compabase-openapi.yaml
- compabase-openapi.yaml