Scraping German Government Data: What Breaks and Why
Scrapers for government sites rarely break on the page layout. They break on the legal situation behind the number: the consolidated text is not the promulgated one, corrections change values after publication, some values have no ordinance at all, and a value without a valid-from date is right on one day only. Example: the insolvency benefit levy in 2021 was 0.12 percent, yet it appears in no ordinance, only in an amending act.
What breaks when you scrape government data
It breaks in five places, and the page layout is only one of them. The other four concern content: which version you read, whether the value was corrected afterwards, whether an ordinance exists for it at all, and which day the value applies to. A parser that returns the right number today can return a wrong one tomorrow at any of these points, and no test turns red.
We ran into this while checking our own datasets. The weekly check reads every figure again in the statute text, in the Federal Law Gazette (Bundesgesetzblatt) or in the notice in the Federal Gazette (Bundesanzeiger). The errors that check found serve as examples below, with the API responses so you can verify them.
Five failure points and what helps
| Failure point | Example | Effect in a scraper | Remedy |
|---|---|---|---|
| Consolidated instead of promulgated text | Gesetze im Internet shows unofficial consolidated texts | The number is right, the legal basis is not | Store the Federal Law Gazette promulgation as evidence |
| Correction after promulgation | Garnishment thresholds 2024: No. 160 and No. 165a | The value from the first version stays in your data | Keep the reference of the correction, re-read regularly |
| Value without an ordinance | Insolvency levy 2021 sits in an amending act | The search for the ordinance finds nothing | Store the legal basis per value, not per source |
| Format and address change | HTML page, PDF notice, table in GENESIS-Online | One parser per source | Use structured interfaces where they exist |
| No valid-from date | Number without an effective date in the database | Retroactive runs and prior-year values are wrong | Every value with valid-from and valid-to |
Consolidated or promulgated text: which one does your scraper read?
Gesetze im Internet shows consolidated versions, and by the portal's own account they are not official. The official text is the promulgation in the Bundesgesetzblatt, which has been issued electronically on the federal promulgation platform since 1 January 2023. For amending acts it contains only the amending instruction, which publishers and online providers work into the base text.
That has two consequences for a scraper. First, it usually reads the right number from the portal but does not know the promulgation it would have to cite. Second, the update time depends on the portal: it points out that consolidating large amendments can take some time and that the wording changes only when the amendment enters into force. If you need a deadline or a contribution rate on a given date, you read the old or the new text depending on the day.
This hits values that apply in several steps. The dataset social insurance contribution rates therefore carries every rate with its legal basis, source, valid-from and valid-to. The promulgation serves as evidence.
Corrections: the same value promulgated twice
Even a promulgated figure can be wrong and corrected later. The 2024 garnishment threshold notice dated 10 May 2024 is in the Federal Law Gazette (BGBl. 2024 I No. 160). The issue of 24 May 2024 (No. 165a) brought a correction: the increment for the first person entitled to maintenance is 561.43 euros, not 560.90 euros. The portal lists both references in its full citation.
A scraper that ran between the two dates and has since looked only for new notices holds the value from the first version. It does not notice, because the page stays unchanged. The difference is 53 cents per month, but the value feeds into every calculation of the garnishable amount.
At Quellenkontor the corrected value is in the dataset, and the legal basis names both references. The response below shows them for one day in July 2024, and the garnishment thresholds dataset page lists every step since 2015.
First promulgation and correction compared
Compare
What a scraper reads before and after the correction
Garnishment thresholds from 1 July 2024, increment for the first person entitled to maintenance.
- Garnishment threshold notice 2024 of 10 May 2024, BGBl. 2024 I No. 160.
- The increment for the first person was printed there as 560.90 euros.
- Anyone who read only this version calculates with a value the correction replaced.
Read correctly, but no longer valid.
Value, legal basis and validity in one response
When there is no ordinance: the insolvency levy in 2021
Some values have no ordinance of their own, and anyone searching for one finds nothing. Under § 360 SGB III the statutory insolvency benefit levy is 0.15 percent. An ordinance under § 361 SGB III may deviate from it, and the Federal Ministry of Labour and Social Affairs has used that power repeatedly. For 2021 there is no such ordinance. The rate of 0.12 percent sits in § 360 SGB III as amended by the Employment Security Act of 3 December 2020, valid until 31 December 2021.
In our own check this was a finding against us: the legal basis first read § 361 SGB III in our dataset. The value was right, the legal basis was not. We corrected it on 23 September 2026. A scraper would have made the same mistake, because today's § 360 states 0.15 percent and its footnote points only to the ordinances for 2022 to 2024.
For 2022 an ordinance applies again: the Insolvency Benefit Levy Ordinance 2022 sets 0.09 percent. The source thus alternates between statute and ordinance: in 2021 the statute applies, in 2022 an ordinance again. A parser with a fixed search pattern breaks in such years.
Which route fits your source?
Self-check
Scrape, open interface or ready-made API?
Orientation for connecting official values, not legal advice.
Does the authority offer the data in a structured format such as XML or JSON?
Gesetze im Internet offers XML with a DTD, Destatis a RESTful/JSON interface for GENESIS-Online.
What official interfaces already solve
Open, machine-readable access exists, and whoever uses it does not need to scrape. Gesetze im Internet also provides the full texts of statutes and ordinances as XML, expressly for automated processing. The data structure is described by a publicly available DTD, and a daily table of contents is available as XML at gii-toc.xml. The portal's robots.txt blocks nothing.
Statistics have their own access. The Federal Statistical Office offers a RESTful/JSON interface for GENESIS-Online, and the user documentation is available as version 5.1 dated 1 June 2026. According to Destatis, GENESIS-Online can be used free of charge under the Data Licence Germany Attribution 2.0. The licensing questions are covered in the article on official works and copyright.
These routes deliver texts and tables, but not a value with a legal basis and validity per effective date. You have to take the step from statute text to a verified number with a valid-from date yourself, and this step is where this article's examples fail.
What every stored government value should carry
- Legal basis with the reference of the promulgation, not only the URL of the page you read it on.
- Valid-from and valid-to as separate fields, so retroactive runs find the value of the right day.
- Retrieval date and date of the last check against the primary source.
- A note when the value was corrected, with the reference of the correction.
- License or legal status of the source, so passing the data on to customers is clear.
When building it yourself still makes sense
- You need exactly one source with a stable, structured format, such as one GENESIS table for one indicator.
- Your team reviews the values professionally anyway, for example in payroll, and can classify deviations at once.
- You need data no dataset provider carries and accept the upkeep knowingly.
- You want the data only once as a snapshot, without following later corrections.
Quiz on the failure points
Test yourself
Four questions on official values
The answers are in the article and the linked sources.
Question 1 of 4
Are the texts on Gesetze im Internet the official version?
Valid from, valid to: why the effective date belongs to the number
A number without an effective date is right on one day only. According to the dataset the garnishment thresholds from 1 July 2024 apply until June 30, 2025, after which the 2025 notice replaces them. Anyone who stores only the latest value can no longer recalculate a payroll run for June 2024.
That is why Quellenkontor responses carry valid-from and valid-to in every answer, as the example above shows. How you correct a payroll run with the values of the right day is described in the article on retroactive payroll corrections.
For checking, the dataset has a weekly run that reads every figure against the primary source. How that run works and which corrections it has found so far is on the page how we verify the values.
Checklist for your government data connection
To take along
Connecting official values robustly
Your progress stays saved in this browser.
This article classifies the technical and legal situation in general terms and is not legal advice. Which value applies in an individual case follows from the promulgated text and the effective date.
Frequently asked questions
May I retrieve Gesetze im Internet automatically?
The portal expressly offers the norms as XML for automated processing, with a public DTD and a daily table of contents. Its robots.txt blocks no paths. Still follow the portal's notes and do not retrieve more often than needed.
How do I recognise a correction in the Federal Law Gazette?
By a separate reference to the original promulgation, for the 2024 garnishment notice No. 165a to No. 160. The full citation in the portal names both numbers.
Why is the URL of the source not enough as evidence?
The page can change, and consolidated texts are unofficial. A value is evidenced by the promulgation with its date and reference.
Can I combine Quellenkontor with my own connection?
Yes. The response contains legal basis, source and date of check per value, so you can compare it with your own sources.
Sources
- Gesetze im Internet: notes on consolidated versions, XML and deep links
- Gesetze im Internet: daily table of contents as XML
- Garnishment threshold notice 2024 (full citation with No. 160 and No. 165a)
- § 360 SGB III: levy rate of the insolvency benefit levy
- § 361 SGB III: ordinance authorisation for the levy rate
- § 243 SGB V: reduced contribution rate
- Insolvency Benefit Levy Ordinance 2022 (Insolvenzgeldumlagesatzverordnung 2022)
- Employment Security Act of 3 December 2020 (BGBl. I p. 2691)
- Federal Statistical Office: GENESIS-Online, API/web services and web interface
- Federal Statistical Office: GENESIS web services, introduction version 5.1 (dated 01.06.2026)
- IWW: garnishment thresholds, correction of the 2024 notice (value change only)