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 search for entities in the National Court Register (KRS) associated with a specific person based on their PESEL 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 from the National Court Register (KRS) on entities associated with a specific person, you must enter that person’s PESEL number in the identifiers.pl_pesel.full parameter.

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

GET /v1/models/pl-krs-wp-record/records?identifiers.pl_pesel.full=[PESEL number] HTTP/1.1
Host: api.mgbi.pl
Authorization: [authorization key]

If you are only interested in entities with which the specified person currently has a business relationship, you can alternatively use the parameter identifiers.pl_pesel.current.

Step 3: Extract the entity 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 one or more records:

{
    "count": [liczba wyników],
    "pages": [liczba stron wyników],
    "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]
        },
        ...
    ]
}

Each item in the results list contains a record with data on a single entity registered in the National Court Register (KRS) with which the person with the specified PESEL number is or was previously associated.

You can view all the information available in the current or complete extract for that entity.

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