MGBI provides a comprehensive API for retrieving data from public registers and records, including the National Official Register of Economic Entities (REGON). You can find a list of data sources available through this service at:
👉 Public Registers API
This guide covers the API for the National Official Register of Economic Entities (REGON), which we provide as part of the following product:
👉 National Official Register of Economic Entities API (REGON API)
Below, we describe how you can use the API to retrieve a record containing the current REGON registry entry for a specified entity, based on its 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 at
👉 National Official Register of Economic Entities API (REGON API)
Step 2: Call the Get Records endpoint
We make the data available in the REGON registry accessible via the MGBI API in the data model with the identifier pl-regon-bir-record.
The API provides a "Get Records" endpoint for this model, which returns records containing the content of REGON registry entries that meet the specified criteria.
👉 Documentation for the "Get Records" endpoint for the pl-regon-bir-record model
To retrieve a record containing the REGON registry entry for a given entity, you must specify its registration number—REGON, NIP, or KRS—in the Get Records endpoint.
Example of calling the Get Records endpoint with a tax ID number:
GET /v1/models/pl-regon-bir-record/records?identifiers.pl_nip=[NIP number] HTTP/1.1
Host: api.mgbi.pl
Authorization: [authorization key]
The REGON registry also includes local units of entities that have their own 14-digit REGON numbers. Local units do not have a NIP number assigned to them in the REGON registry; therefore, a query for a NIP number returns only the entry for the main unit.
To retrieve a record for a local entity, enter its REGON number in the identifiers.pl_regon parameter. You can find a list of the entity’s local units, along with their REGON numbers, in the parent entity’s record (see step 3 for details).
Example of calling the "Get Records" endpoint with a REGON number:
GET /v1/models/pl-regon-bir-record/records?identifiers.pl_regon=[REGON number] HTTP/1.1
Host: api.mgbi.pl
Authorization: [authorization key]
Step 3: Read the REGON entry from the response
A successful call to the Get Records endpoint returns records containing the REGON registry entry for the specified entity.
{
"count": 1,
"pages": 1,
"results": [
{
"id": "[identyfikator rekordu]",
"identifiers": "[identyfikatory podmiotu]",
"content": "[treść wpisu do rejestru REGON]",
"meta": "[metadane rekordu]"
}
]
}
You can find all the data from the REGON registry entry for the specified entity in the content.extracted_fields dictionary. The data is grouped there according to the reports provided by the Central Statistical Office (GUS). You can always find basic information about the entity in the content.extracted_fields.DaneSzukajPodmioty dictionary.
Sample contents of the content.extracted_fields.DaneSzukajPodmioty dictionary:
{
"Regon": "[numer REGON]",
"Nip": "[numer NIP]",
"StatusNip": "[status NIP]",
"Nazwa": "[nazwa podmiotu]",
"Typ": "[typ podmiotu: P / F / LP / LF]",
"SilosID": "[rodzaj działalności: 1 / 2 / 3 / 4 / 6]",
"Wojewodztwo": "[województwo]",
"Powiat": "[powiat]",
"Gmina": "[gmina]",
"Miejscowosc": "[miejscowość]",
"KodPocztowy": "[kod pocztowy]",
"MiejscowoscPoczty": "[miejscowość poczty]",
"Ulica": "[ulica]",
"NrNieruchomosci": "[numer nieruchomości]",
"NrLokalu": "[numer lokalu]",
"DataZakonczeniaDzialalnosci": "[data zakończenia działalności]"
}
The " Type " field indicates the type of entity:
- P – legal entity,
- F – individual (a natural person conducting business),
- LP – a local unit of a legal entity,
- LF – local unit of a physical unit.
The type of entity determines which other reports you'll find in the content.extracted_fields dictionary.
For example:
- For legal entities: BIR12OsPrawna (detailed entity data), BIR12OsPrawnaPkd (PKD codes), BIR12OsPrawnaListaJednLokalnych (list of local entities) and—in the case of general partnerships— BIR12OsPrawnaSpCywilnaWspolnicy (list of partners),
- For individuals: BIR12OsFizycznaDaneOgolne (general information), a report containing information about business activities, e.g., BIR12OsFizycznaDzialalnoscCeidg, as well as BIR12OsFizycznaPkd (PKD codes) and BIR12OsFizycznaListaJednLokalnych (list of local units).
The type of business to which the entry refers is indicated by the identifiers.pl_regon_silos field (and SilosID in the DaneSzukajPodmioty dictionary):
- 1 – business activity subject to registration with the CEIDG,
- 2 – agricultural activities,
- 3 – other activities,
- 4 – business removed from the REGON registry,
- 6 – Activities of a legal entity.
An individual may be listed in the REGON registry with several types of business activities, such as activities subject to registration in the CEIDG and agricultural activities. Each type of business activity is a separate record; therefore, the response may contain several records that differ in the value of the identifiers.pl_regon_silos field.
Learn more:
👉 Data structure in the pl-regon-bir-record model
👉 Endpoint documentation for the pl-regon-bir-record model