Skip to main content

An API for accessing a Polish REGON database

Project description

litex.regon - a frontend for Polish REGON database

Simple, pythonic wrapper for REGON database (web frontend is reachable at To access its SOAP API, one needs an USER_KEY issued by REGON administrators available at

Usage example below:

>>> from litex.regon import REGONAPI

REGONAPI accepts one argument: service URL (provided by REGON Administrators).


First, one needs to log in (using provided user key)

>>> api.login(USER_KEY)

After login, one can start querying the database. The search method accepts the following parameters:

  • regon - single REGON number (either 9 or 14 digits long)
  • krs - single 10 digit KRS number
  • nip - single NIP (10 digits string)
  • regons - a collection of REGONs (all of them have to be either 14 or 9 digits long)
  • krss - a collection of KRSs
  • nips - a collection of NIPs

Only one parameter is used in the query. If multiple ones are passed, first from the above list is taken into account.

Additionally, a detailed parameter can be passed: detailed=True causes search method to fetch default detailed report.

>>> entities ='9999999999')

entities is a list of LXML objectify objects wrapping the search results (up to 100). If search was called with detailed=True, the full report is available as the detailed attribute.

If one knows the REGON of a business entity and an detailed report name, a full report can be fetched directly:

>>> detailed_report = api.full_report('99999999', 'PublDaneRaportFizycznaOsoba')

Summary report with a list of REGONs for the given criteria can be fetched by:

>>> summary_report = api.summary_report(

Report names can be found in the documentation provided by REGON admins.



  • more meaningful error messages in search method (thanks @m-ganko)
  • summary reports (also kudos to @m-ganko)


  • reworked REGON cleanup logic (in search function, when fetching detailed report)
  • search method now uses DaneSzukajPodmioty (API version 1.1) call instead of DaneSzukaj (thanks to @kicaj for pull request)


  • migration from nose to py.test
  • tox configuration for Python 2 and 3 testing
  • improved handling of detailed reports (thanks to @miloszsobiczewski for logging an issue)


  • Python 3.6 compatibility (thanks to Mariusz Witek)


  • CAPTCHA removal -- no longer needed in current API


  • detailed report fetching logic reworked


  • initial release

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for litex.regon, version 1.0.6
Filename, size File type Python version Upload date Hashes
Filename, size litex.regon-1.0.6-py3-none-any.whl (7.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size litex.regon-1.0.6.tar.gz (8.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page