circle

Read our latest report on bankruptcies and restructuring in the construction industry. Download »

Public Registers API

MGBI provides a comprehensive API for retrieving data from public registers and records, including the National Court Register (KRS). You can find a list of data sources available through this service at:
👉 Public Registers API

This guide covers the API for the KRS entity search tool, which we provide as part of the following product:
👉 National Court Register API (KRS API) - Entity Search Tool

Below, we describe how you can use the API to retrieve a current list of connections between a specific entity listed in the National Court Register (KRS) and other entities and individuals, based on its KRS number.

Step 1: Obtain an API authorization key

To obtain the authorization key required to call endpoints available in the MGBI API, please contact us using the contact form on the product page:
👉 National Court Register API (KRS API) - Entity Search

Step 2: Call the Get Records endpoint

We make the data available in the KRS entity search engine accessible via the MGBI API in a data model with the identifier pl-krs-wp-record.

The API provides a Get Records endpoint for this model, which returns records containing the content of the current and full extracts from the National Court Register (KRS) for entities that meet the specified criteria.
👉 Documentation for the Get Records endpoint for the pl-krs-wp-record model

To retrieve data for a single entity from the National Court Register (KRS), you must provide its registration number—KRS, NIP, or REGON—in the Get Records endpoint.

Example of calling the Get Records endpoint using a KRS number:

{
    "count": 1,
    "pages": 1,
    "results": [
        {
            "id": [identyfikator rekordu],
            "identifiers": [identyfikatory podmiotu i powiązanych osób],
            "content": [treść odpisu aktualnego i pełnego],
            "files": [pliki odpisów w formacie PDF],
            "relations": [relacje podmiotu z innymi podmiotami i osobami],
            "meta": [metadane rekordu]
        }
    ]
}

Step 3: Extract the relationship data from the responses

A successful call to the Get Records endpoint returns a list of records that meet the specified criteria.

In the example above, the endpoint should return a list of results containing a single record:

{
    "count": 1,
    "pages": 1,
    "results": [
        {
            "id": [identyfikator rekordu],
            "identifiers": [identyfikatory podmiotu i powiązanych osób],
            "content": [treść odpisu aktualnego i pełnego],
            "files": [pliki odpisów w formacie PDF],
            "relations": [relacje podmiotu z innymi podmiotami i osobami],
            "meta": [metadane rekordu]
        }
    ]
}

You can find the current list of this entity's relationships with other entities and individuals in the " relations" field.

Each entry in the dictionary displayed in this field contains a list of relationships of a specific type, along with data on the related entities and individuals, as well as additional information.

Sample contents of the `relations` dictionary:

{
    "dzial2_reprezentacja_sklad": [lista powiązań z członkami organów reprezentacji],
    "dzial2_prokurenci": [lista powiązań z prokurentami],
    "dzial2_organNadzoru_sklad": [lista powiązań z członkami organów nadzoru]
}

The data structure in list items matches the data structure in the fields of the full excerpt available in the content.full_excerpt.dane dictionary.

Each item in the list of links also includes the following fields:

  • KRS entry number – the KRS entry number of the entity entering the relationship,
  • dataWpisuWprow - the date of entry into the National Court Register (KRS) establishing the relationship.

The following fields are also available for historical relationships:

  • EntryNo - the KRS entry number for the entry removing the relevant link,
  • deletion_date - the date of entry in the National Court Register (KRS) removing the relevant link.

Learn more:
👉 Data structure in the pl-krs-wp-record model
👉 Endpoint documentation for the pl-krs-wp-record model

A demo is worth more than a thousand words

Get in touch with us
arrow_forward