A .NET client library for the Polish REGON (GUS BIR1) SOAP API — query company data from the National Business Registry by NIP or KRS number.
- Look up companies by NIP (tax identification number) or KRS (National Court Register number)
- Built-in dependency injection support via
IServiceCollection - Strongly-typed response model with address, legal form, activity codes (PKD), and more
- Automatic detection of legal form (sole proprietorship, LLC, joint-stock company, etc.)
- Active/suspended status resolution
- Handles the underlying SOAP/WCF communication so you don't have to
- .NET 6.0 or later
- A GUS API key — register at api.stat.gov.pl/Home/RegonApi to obtain one
dotnet add package REGONservices.AddRegonClient("<YOUR-API-KEY>");public class CompanyService
{
private readonly IRegonClient _regonClient;
public CompanyService(IRegonClient regonClient)
{
_regonClient = regonClient;
}
public async Task<Company> GetCompany(string nip)
{
return await _regonClient.GetCompanyDataByNip(nip);
}
}| Method | Description |
|---|---|
GetCompanyDataByNip(string nip) |
Fetch company data by NIP (tax ID) |
GetCompanyDataByKrs(string krs) |
Fetch company data by KRS (court register number) |
Both methods return Task<Company>.
| Property | Type | Description |
|---|---|---|
Nip |
string |
Tax identification number |
Krs |
string |
National Court Register number |
Name |
string |
Company name |
REGON |
string |
REGON statistical number |
Street |
string |
Street name |
BuildingNumber |
string |
Building number |
FlatNumber |
string |
Flat/apartment number |
City |
string |
City |
PostCode |
string |
Postal code |
Commune |
string |
Commune (gmina) |
District |
string |
District (powiat) |
Voivodeship |
string |
Voivodeship (province) |
LegalForm |
LegalForm |
Legal form enum (see below) |
MainPkd |
string |
Main PKD activity code |
Pkds |
List<Pkd> |
All registered PKD activity codes |
StartDate |
DateTime |
Registration date |
EndDate |
DateTime? |
Deregistration date (null if active) |
IsActive |
bool |
Whether the company is currently active |
IsSuspended |
bool |
Whether the company is suspended |
PhoneNumber |
string |
Phone number |
Email |
string |
Email address |
WebsiteUrl |
string |
Website URL |
| Value | Name | Description |
|---|---|---|
| 1 | JDG |
Sole proprietorship (jednoosobowa działalność gospodarcza) |
| 2 | SPZOO |
Limited liability company (spółka z o.o.) |
| 3 | SA |
Joint-stock company (spółka akcyjna) |
| 4 | SC |
Civil partnership (spółka cywilna) |
| 5 | SJ |
General partnership (spółka jawna) |
| 6 | SK |
Limited partnership (spółka komandytowa) |
| 7 | SPZOOSK |
Ltd. limited partnership (sp. z o.o. sp.k.) |
| 8 | SKA |
Limited joint-stock partnership (spółka komandytowo-akcyjna) |
{
"Nip": "7010790303",
"Krs": "",
"Name": "RK RECOVERY SPÓŁKA AKCYJNA",
"Street": "Plac Konesera",
"City": "Warszawa",
"BuildingNumber": "10 A",
"FlatNumber": "",
"PostCode": "03-736",
"REGON": "369010805",
"Commune": "Praga-Północ",
"District": "Warszawa",
"Voivodeship": "MAZOWIECKIE",
"LegalForm": 3,
"MainPkd": "6920Z",
"StartDate": "2017-12-15T00:00:00",
"EndDate": null,
"IsSuspended": false,
"IsActive": true,
"PhoneNumber": null,
"Email": null,
"WebsiteUrl": null,
"Pkds": [
{
"Value": "6920Z",
"Name": "DZIAŁALNOŚĆ RACHUNKOWO-KSIĘGOWA; DORADZTWO PODATKOWE"
},
{
"Value": "6910Z",
"Name": "DZIAŁALNOŚĆ PRAWNICZA"
}
]
}dotnet testContributions are welcome! Here's how to get started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Commit your changes (
git commit -m 'Add my feature') - Push to the branch (
git push origin feature/my-feature) - Open a Pull Request
Please make sure all existing tests pass before submitting a PR.
This project is licensed under the MIT License — see the LICENSE file for details.
Created by Jarosław Armatys — armatys.me