Public Registers API

MGBI provides a comprehensive API for retrieving data from public registers and records, including the Central Register of Contracts of Public Finance Sector Entities (CRU JSFP).

You can find a list of data sources available through this service at:
👉 Public Registers API

This guide covers the API for the Central Contract Registry (CRU JFSP), which we provide as part of the following product:
👉 Central Contract Registry API (CRU API)

Below, we describe how you can use the API to retrieve records containing information about contracts disclosed in the CRU to which a specific entity is a party, based on that entity’s registration numbers.

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:
👉 Central Register of Contracts API (CRU API)

Step 2: Call the Get Records endpoint

We make the data available in the CRU accessible via the MGBI API in the data model with the identifier pl-cru-record.

The API provides a "Get Records" endpoint for this model, which returns records containing information about contracts with CRU that meet the specified criteria.
👉 Documentation for the "Get Records" endpoint for the pl-cru-record model

To retrieve records containing a list of contracts entered into by a given entity, you must specify that entity's registration number—KRS, NIP, or REGON—in the Get Records endpoint.

The entity in question may be any party to the contract. This way, you can download both contracts entered into by a public finance sector entity (JSFP)—such as a municipality or government agency—and contracts in which the entity acts as a counterparty.


Example of calling the Get Records endpoint with a tax ID number:

GET /v1/models/pl-cru-record/records?identifiers.pl_nip=[NIP number] HTTP/1.1
Host: api.mgbi.pl
Authorization: [authorization key]

If you know the number of a specific contract, you can retrieve information about it by specifying that number in the ` identifiers.pl_cru_contract_number` parameter of the Get Records endpoint.

Example of calling the "Get Records" endpoint with a contract number:

GET /v1/models/pl-cru-record/records?identifiers.pl_cru_contract_number=[contract number] HTTP/1.1
Host: api.mgbi.pl
Authorization: [authorization key]

Contract numbers are not unique—different entities may assign the same numbers to contracts (e.g., “1/2025”). Therefore, a query for a contract number may return multiple records. You can identify the correct contract by its pages, which are listed in the ` content.raw_result.stronyUmowy` array.

Step 3: Review the answers to find information about the contracts entered into by the entity

A successful call to the Get Records endpoint returns a list of contracts disclosed in the CRU to which the entity is a party. Each contract is a separate record in the results list.

{
    "count": 1,
    "pages": 1,
    "results": [
        {
            "id": "[identyfikator rekordu]",
            "identifiers": "[identyfikatory wszystkich stron umowy oraz numer umowy]",
            "content": "[informacje o umowie]",
            "meta": "[metadane rekordu]"
        }
    ]
}

You can find all the data about a single contract disclosed in the CRU in the content.raw_result dictionary.

Sample contents of the content.raw_result dictionary:

{
    "idUmowy": "[identyfikator umowy]",
    "podstawoweDane": {
        "statusUmowy": "[status umowy: Aktywna / Nieaktywna]",
        "numerUmowy": "[numer umowy]",
        "brakNumeruUmowy": "[czy umowa nie ma numeru]",
        "dataZawarciaUmowy": "[data zawarcia umowy]",
        "dataZakonczeniaUmowy": "[data zakończenia umowy]"
    },
    "okresObowiazywania": {
        "umowaNaCzasNieoznaczony": "[czy umowa na czas nieoznaczony]",
        "okres": "[okres obowiązywania umowy]"
    },
    "szczegolyUmowy": {
        "przedmiotUmowy": "[przedmiot umowy]",
        "niejawnoscPrzedmiotu": "[informacja o niejawności przedmiotu umowy]",
        "wartoscPrzedmiotu": "[wartość przedmiotu umowy]",
        "niejawnoscWartosciPrzedmiotu": "[informacja o niejawności wartości przedmiotu umowy]",
        "opisWartosciPrzedmiotu": "[opis wartości przedmiotu umowy]"
    },
    "stronyUmowy": [
        {
            "rodzaj": "[rodzaj strony umowy: JSFP / Przedsiębiorca / Osoba fizyczna]",
            "nazwa": "[nazwa strony umowy]",
            "nip": "[NIP strony umowy]",
            "regon": "[REGON strony umowy]",
            "imie": "[imię strony umowy]",
            "nazwisko": "[nazwisko strony umowy]",
            "kraj": "[kraj strony umowy]",
            "czyKonsorcjum": "[czy strona umowy jest konsorcjum]",
            "daneAdresowe": "[dane adresowe strony umowy]",
            "niejawnoscStrony": "[informacja o niejawności strony umowy]"
        }
    ],
    "finansowanaZeSrodkow": "[czy umowa jest finansowana ze środków]",
    "zmianyUmowy": [
        {
            "rodzajZmiany": "[rodzaj zmiany]",
            "dataZmiany": "[data zmiany]",
            "komentarz": "[komentarz]"
        }
    ],
    "dataPublikacji": "[data publikacji umowy]",
    "dataModyfikacji": "[data modyfikacji umowy]"
}

Information about all parties to the contract—both the public finance sector entity (JSFP) and its counterparties—can be found in the content.raw_result.stronyUmowy list.
The “type” field allows you to determine whether a given party is a JSFP, a business, or an individual.


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

A demo is worth more than a thousand words

Contact Us
arrow_forward