DEV Community

Cover image for MSiG Scraper: Polish Court Gazette Since 2001
Peter
Peter

Posted on • Originally published at apify.com

MSiG Scraper: Polish Court Gazette Since 2001

TL;DR

  • MSiG (Monitor Sadowy i Gospodarczy) is Poland's official court and economic gazette, published daily since 2001
  • It contains every bankruptcy filing, liquidation, restructuring announcement, and KRS change for over 20 years
  • The government portal has no official API - but an undocumented REST endpoint exists behind the jQuery DataTables frontend
  • I built an Apify actor that queries the API directly and returns structured JSON for $0.01 per result

What Is MSiG and Why It Matters for Business Intelligence

MSiG - Monitor Sadowy i Gospodarczy - is the Polish equivalent of a court gazette or official business journal. Published by the Ministry of Justice since 2001, it is the authoritative legal source for corporate events in Poland. When a court opens bankruptcy proceedings, approves a restructuring plan, orders a liquidation, or registers a change in the KRS (National Court Register) - it is published in MSiG.

This makes MSiG one of the most valuable datasets for anyone in Polish business intelligence. The archive spans over two decades of daily publications, covering hundreds of thousands of announcements. Every bankruptcy in Poland since 2001 is here. Every board change, capital increase, and merger - published.

For anyone in credit risk, debt collection, legal services, or competitive intelligence, monitoring MSiG is essential. But the web portal at wyszukiwarka-msig.ms.gov.pl is designed for manual lookups:

  • Search one company at a time
  • Results displayed in paginated HTML
  • No export function
  • No API documentation

If you need to monitor hundreds or thousands of companies, or analyze historical insolvency trends, the manual approach does not scale.

MSiG Court Gazette Scraper: How the Hidden API Works

The MSiG portal uses jQuery DataTables to display search results. Behind it sits a REST API that accepts JSON search parameters and returns structured data.

Two interesting technical details:

1. Dynamic API URL resolution

The API base URL is not hardcoded - it is fetched at runtime from a dedicated endpoint (home/getapiurl). This means the government can move the API without changing the frontend. The scraper handles this by first resolving the current API URL before making any search requests.

2. Government typos in production

The full-text detail endpoint is /Monitor/Detalis - yes, "Detalis" instead of "Details". This typo has been live in the government API for years. The scraper uses the misspelled URL because that is what works.

The search endpoint at /Monitor/Search accepts date ranges, entity names, KRS/NIP numbers, case signatures, and full-text search in announcement bodies. Results are returned as JSON with metadata (publication dates, monitor numbers, chapter classifications) and optionally the full text of each announcement.

The full-text retrieval is a separate API call per announcement. For large result sets, this means many requests. The actor batches these efficiently and handles rate limiting from the government servers.

MSiG Scraper: How to Use the Actor

JavaScript (Node.js)

import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('minute_contest/msig-scraper').call({
    dateFrom: '2026-01-01',
    dateTo: '2026-03-31',
    searchType: 'A',          // A = announcements, B = KRS entries
    entityName: 'Getin',      // company name search
    fetchDetails: true,        // include full announcement text
    maxResults: 100
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();

for (const entry of items) {
    console.log(`${entry.entityName} | ${entry.chapterName}`);
    console.log(`  Case: ${entry.signatureOfCase}`);
    console.log(`  Published: ${entry.dateOfPublication}`);
    if (entry.textInBody) {
        console.log(`  Content: ${entry.textInBody.substring(0, 200)}...`);
    }
}
Enter fullscreen mode Exit fullscreen mode

Python

from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("minute_contest/msig-scraper").call(
    run_input={
        "dateFrom": "2026-01-01",
        "dateTo": "2026-03-31",
        "searchType": "A",
        "entityName": "Getin",
        "fetchDetails": True,
        "maxResults": 100
    }
)

items = client.dataset(run["defaultDatasetId"]).list_items().items
for entry in items:
    print(f"{entry['entityName']} | {entry.get('chapterName')}")
    print(f"  Published: {entry['dateOfPublication']}")
Enter fullscreen mode Exit fullscreen mode

MSiG Scraper Output: What You Get Back

Field Example
entityName GETIN NOBLE BANK S.A. W UPADLOSCI
krs 0000019193
nip 1080000568
signatureOfCase XVIII GUp 25/23
chapterName Postepowania upadlosciowe
monitorNumber MSiG 48/2026
dateOfPublication 2026-03-11
numberOfNotice 12345
textInPosition Header text of the announcement
textInBody Full text of the court announcement

MSiG Court Gazette Search Modes

searchType What It Covers
A (Announcements) Bankruptcy filings, restructuring, liquidation notices
B (KRS Entries) New registrations, board changes, capital changes, mergers

You can combine filters: date range + entity name + NIP + case signature + full-text search.

Real-World Use Case: Credit Risk Portfolio Monitoring

A factoring company manages a portfolio of 2,000 Polish business clients. Each quarter, their risk team needs to check whether any client has filed for bankruptcy, entered restructuring, or had significant KRS changes.

Without automation, an analyst opens the MSiG portal, types each company name, reviews the results, and documents any findings. At 3-5 minutes per company, screening the full portfolio takes 100-170 hours - roughly a month of work for one person.

With the MSiG court gazette scraper, the same team runs a scheduled job that queries the actor with each client's KRS or NIP number, filtered to the last 90 days. The results are piped into their risk management system. Any new bankruptcy filing or restructuring announcement triggers an automatic review.

This reduces portfolio screening from weeks to minutes. More importantly, it enables continuous monitoring rather than periodic checks - catching issues within days of publication instead of quarters.

Who Needs MSiG Court Gazette Data

  • Bankruptcy monitoring - get alerts when companies in your portfolio file for bankruptcy
  • Debt collection - track proceedings related to your debtors
  • Credit risk - screen new clients against historical insolvency data
  • Legal research - find court announcements by case signature
  • Market analysis - track insolvency trends by sector or region over 20+ years
  • KRS change monitoring - detect board changes, capital increases, mergers

FAQ

Can I search by KRS number or NIP instead of company name?

Yes. The actor accepts entityName, krs, nip, and signatureOfCase as search parameters. You can use any combination. KRS and NIP searches are exact-match and are the most reliable way to find announcements for a specific company, since company names can vary across filings (abbreviations, legal form suffixes, etc.).

What does the fetchDetails parameter do?

When fetchDetails is set to true, the actor makes an additional API call for each result to retrieve the full text of the court announcement (textInBody). Without it, you get metadata only (entity name, dates, chapter, case signature). Enable it when you need the actual content of the announcements - for example, to extract creditor lists or restructuring terms. Disable it for faster results when you only need to know whether an announcement exists.

How far back does the MSiG data go?

The digital archive on wyszukiwarka-msig.ms.gov.pl goes back to 2001. The scraper can query any date range within this period. This gives you access to over 20 years of bankruptcy filings, KRS changes, and other corporate events - a valuable dataset for historical trend analysis or due diligence on long-established companies.

Pricing

Method Cost
Manual search on MSiG portal Free (one at a time, no export)
MGBI MSiG API 200-500 EUR/month subscription
This actor ~$5 per 1,000 results

Free $5 Apify credits on signup = ~900 MSiG results at no cost.

Try it: apify.com/minute_contest/msig-scraper


This is part of the Polish Business Data APIs series covering programmatic access to Polish government registries.

Top comments (0)