MGBI provides a comprehensive API for retrieving data from public registries and records, including the Central Register and Information on Economic Activity (CEIDG).
You can find a list of data sources available through this service at:
👉 Public Registers API
This guide covers the API for the Central Register and Information on Economic Activity (CEIDG), which we provide as part of the following product:
👉 Central Register and Information on Economic Activity API (CEIDG API)
Below, we describe how you can use the API to retrieve a record containing the current CEIDG entry for a specific business, based on its registration numbers.
Step 1: Obtain an API authorization key
To obtain the authorization key required to call the endpoints available in the MGBI API, please contact us using the contact form on the product page:
👉 Central Register and Information on Economic Activity API (CEIDG API)
Step 2: Call the Get Records endpoint
We make the data available in CEIDG accessible via the MGBI API in the data model with the identifier pl-ceidg-hd-record.
The API provides a "Get Records" endpoint for this model, which returns records containing CEIDG entries that meet the specified criteria.
👉 Documentation for the "Get Records" endpoint for the pl-ceidg-hd-record model
To retrieve a record containing the CEIDG entry details for a specific business, you must provide its registration number—either the NIP or REGON—in the Get Records endpoint.
Example of calling the Get Records endpoint with a tax ID number:
GET /v1/models/pl-ceidg-hd-record/records?identifiers.pl_nip=[NIP number] HTTP/1.1
Host: api.mgbi.pl
Authorization: [authorization key]
You can also search for entries for business owners associated with the specified entity, such as partners in a general partnership. Simply enter the NIP, REGON, or KRS number of the associated entity in the parameter relations.identifiers.pl_nip, relations.identifiers.pl_regon, or relations.identifiers.pl_krs.
Example of calling the "Get Records" endpoint with the tax identification number (NIP) of a civil law partnership:
GET /v1/models/pl-ceidg-hd-record/records?relations.identifiers.pl_nip=[NIP number of the civil law partnership] HTTP/1.1
Host: api.mgbi.pl
Authorization: [authorization key]
Step 3: Read the content of the CEIDG entry from the response
A successful call to the Get Records endpoint returns records containing the CEIDG entries for the specified business. Each entry is a separate record in the results list.
{
"count": 1,
"pages": 1,
"results": [
{
"id": "[identyfikator rekordu]",
"identifiers": "[identyfikatory przedsiębiorcy]",
"content": "[treść wpisu do CEIDG]",
"relations": "[identyfikatory podmiotów powiązanych]",
"meta": "[metadane rekordu]"
}
]
}
You can find all the data from the CEIDG entry for the specified business owner in the content.raw_result dictionary.
Sample contents of the content.raw_result dictionary:
{
"id": "[identyfikator wpisu w CEIDG]",
"nazwa": "[pełna nazwa firmy przedsiębiorcy]",
"status": "[status działalności, np. AKTYWNY / ZAWIESZONY / WYKREŚLONY]",
"dataRozpoczecia": "[data rozpoczęcia działalności]",
"dataZawieszenia": "[data zawieszenia działalności]",
"dataWznowienia": "[data wznowienia działalności]",
"dataZakonczenia": "[data zakończenia działalności]",
"dataWykreslenia": "[data wykreślenia z rejestru]",
"wlasciciel": {
"imie": "[imię przedsiębiorcy]",
"nazwisko": "[nazwisko przedsiębiorcy]",
"nip": "[NIP przedsiębiorcy]",
"regon": "[REGON przedsiębiorcy]"
},
"adresDzialalnosci": "[adres działalności]",
"adresKorespondencyjny": "[adres korespondencyjny]",
"adresyDzialalnosciDodatkowe": "[dodatkowe adresy działalności]",
"pkdGlowny": {
"kod": "[kod przeważającej działalności PKD]",
"nazwa": "[nazwa przeważającej działalności PKD]"
},
"pkd": "[lista kodów PKD wykonywanej działalności]",
"spolki": [
{
"nip": "[NIP spółki cywilnej]",
"regon": "[REGON spółki cywilnej]",
"dataZawieszenia": "[data zawieszenia działalności w spółce]"
}
],
"telefon": "[numer telefonu]",
"email": "[adres e-mail]",
"www": "[adres strony internetowej]",
"adresDoreczenElektronicznych": "[adres do doręczeń elektronicznych]",
"wspolnoscMajatkowa": "[informacja o małżeńskiej wspólności majątkowej]",
"zarzadcaSukcesyjny": "[dane zarządcy sukcesyjnego]",
"upadlosci": "[informacje dotyczące upadłości]",
"zakazy": "[lista zakazów]",
"uprawnienia": "[lista uprawnień]",
"ograniczenia": "[lista ograniczeń]",
"kwalifikacjeZawodowe": "[lista kwalifikacji zawodowych]",
"link": "[adres wpisu w CEIDG]"
}
You can find the current status of the business in the "Status" field.
How do you select the current record when the result contains multiple records?
A single business owner may have more than one entry in the CEIDG. Each entry has its own identifier (content.raw_result.id), and the NIP number belongs to the business owner, not to the entry.
Therefore, a query for a single NIP may return several records—for example, when a business owner has closed a previous business and opened a new one, or when several entries that have not been deleted are displayed simultaneously in the CEIDG.
The order of the records in the response does not depend on their status.
The registry does not explicitly indicate which entry is current. To select it, we recommend the following rule:
- Exclude entries with the status " DELETED."
- From the remaining entries, select the one with the latest business start date (startDate).
- If all entries have been deleted, the last entry is the one with the latest deletion date (deletionDate) or start date (startDate).
If, after excluding the deleted entries, there are still more than one entry remaining, this indicates an ambiguity in the source data. In this case, you can check the details of the entries directly in CEIDG at the address provided in the `content.raw_result.link` field.
Please note that the fields in the metadata dictionary describe an update to a record in the MGBI API, not changes to an entry in CEIDG—so they are not intended for selecting the current entry.
Learn more:
👉 Data structure in the pl-ceidg-hd-record model
👉 Endpoint documentation for the pl-ceidg-hd-record model