# Bundesgesetzblatt Scraper — German Law Gazette (`studio-amba/bundesgesetzblatt-scraper`) Actor

Scrape the German Federal Law Gazette (Bundesgesetzblatt). Extract laws, regulations, and legal texts from the official NeuRIS API. Search by keyword, get full text, articles, and PDF links. No login needed.

- **URL**: https://apify.com/studio-amba/bundesgesetzblatt-scraper.md
- **Developed by:** [Studio Amba](https://apify.com/studio-amba) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Bundesgesetzblatt Scraper

Extract German federal laws and regulations from the official Bundesgesetzblatt (Federal Law Gazette). This actor uses the official NeuRIS API to access structured legislation data — no cookies, no login required.

The Bundesgesetzblatt is Germany's official publication channel for federal laws (Gesetze) and statutory instruments (Verordnungen). Since January 2023, it is published in purely electronic form.

### How to scrape Bundesgesetzblatt data

1. Go to [this actor's page on Apify Store](https://apify.com/studio.amba/bundesgesetzblatt-scraper)
2. Click **Try for free**
3. Enter a search keyword (e.g. "Datenschutz", "Klimaschutz", "Verkehr") or leave empty to get all laws
4. Set the maximum number of results
5. Click **Start** and wait for the run to finish
6. Download your data in JSON, CSV, or Excel format

### Input parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `searchQuery` | string | Search keyword to filter laws by title. Leave empty to list all. |
| `includeFullText` | boolean | Fetch the complete legal text for each law (slower). Default: false. |
| `includeArticles` | boolean | Fetch the list of articles/paragraphs for each law. Default: false. |
| `maxResults` | integer | Maximum number of laws to return. Default: 50. |
| `proxyConfiguration` | object | Proxy settings. German residential proxy pre-configured. |

### Output data

Each law in the output dataset contains the following fields:

| Field | Type | Description |
|-------|------|-------------|
| `title` | string | Full official title of the law in German |
| `abbreviation` | string | Short abbreviation (e.g. "BDSG", "GG", "StGB") |
| `alternateName` | string | Alternative or common name for the law |
| `eli` | string | European Legislation Identifier (ELI) |
| `bgblPart` | string | Bundesgesetzblatt part: "I" (laws) or "II" (international treaties) |
| `bgblNumber` | string | Sequential publication number within the year |
| `bgblYear` | string | Year of publication |
| `publicationReference` | string | Full publication reference (e.g. "BGBl I, 2026 148") |
| `enactmentDate` | string | Date the law was enacted (Ausfertigungsdatum) |
| `publicationDate` | string | Date published in the Bundesgesetzblatt |
| `legalForce` | string | Current legal force status ("InForce" or other) |
| `articles` | array | List of article/section names (when includeArticles is true) |
| `fullTextHtml` | string | Full legal text as plain text (when includeFullText is true) |
| `htmlUrl` | string | Direct URL to the full text in HTML format |
| `xmlUrl` | string | Direct URL to the full text in XML format |
| `zipUrl` | string | URL to download the complete publication as ZIP |
| `pdfUrl` | string | Direct URL to the PDF version on recht.bund.de |
| `apiUrl` | string | API endpoint for this specific legislation |
| `portalUrl` | string | Link to the law on the official recht.bund.de portal |
| `scrapedAt` | string | ISO timestamp of when the data was extracted |

### Example output

```json
{
    "title": "Gesetz über intelligente Verkehrssysteme im Straßenverkehr",
    "abbreviation": "IVSG",
    "alternateName": "Intelligente-Verkehrssysteme-Gesetz",
    "eli": "eli/bund/bgbl-1/2026/148/2026-05-15/1/deu",
    "bgblPart": "I",
    "bgblNumber": "148",
    "bgblYear": "2026",
    "publicationReference": "BGBl I, 2026 148",
    "enactmentDate": "2026-05-15",
    "publicationDate": "2026-05-20",
    "legalForce": "InForce",
    "articles": [],
    "fullTextHtml": null,
    "htmlUrl": "https://testphase.rechtsinformationen.bund.de/v1/legislation/eli/bund/bgbl-1/2026/148/...",
    "xmlUrl": "https://testphase.rechtsinformationen.bund.de/v1/legislation/eli/bund/bgbl-1/2026/148/...",
    "zipUrl": "https://testphase.rechtsinformationen.bund.de/v1/legislation/eli/bund/bgbl-1/2026/148/...",
    "pdfUrl": "https://www.recht.bund.de/eli/bund/BGBl-1/2026/148/regelungstext.pdf?__blob=publicationFile",
    "apiUrl": "https://testphase.rechtsinformationen.bund.de/v1/legislation/eli/bund/bgbl-1/2026/148/...",
    "portalUrl": "https://www.recht.bund.de/bgbl/1/2026/148/VO.html",
    "scrapedAt": "2026-05-23T10:30:00.000Z"
}
````

### Use cases

- **Legal research** — Search and download German federal laws by topic
- **Regulatory compliance** — Monitor new laws and amendments in specific areas
- **Legal tech** — Build applications that need structured access to German legislation
- **Academic research** — Analyze legislative trends, publication patterns, and legal language
- **Government affairs** — Track new statutory instruments and ordinances
- **Data journalism** — Analyze legislative output and policy areas

### Data source

This actor retrieves data from the official NeuRIS API (`testphase.rechtsinformationen.bund.de`), which is provided by the German Federal Ministry of Justice and the DigitalService. The data covers federal laws published since January 2023.

For historical Bundesgesetzblatt data (pre-2023), consider using alternative sources like OffeneGesetze.de.

### How often is the data updated?

The Bundesgesetzblatt is updated continuously as new laws are enacted. The underlying API reflects publications within days of their official promulgation. As of May 2026, the database contains over 2,400 legislation items.

### Is it legal to scrape the Bundesgesetzblatt?

German federal laws are public domain. The NeuRIS API is explicitly designed for programmatic access to legal information. This actor uses the official API, respects rate limits, and does not require authentication.

### Pricing

This actor runs on the Apify platform. You can start with a free trial. Runs are fast because the data comes from a structured API rather than HTML scraping.

### Limitations

- Only covers laws published from January 2023 onward (when BGBl went digital)
- The NeuRIS API is in trial phase and may occasionally be unavailable
- Full text retrieval significantly increases run time and compute usage
- Maximum practical dataset size is around 2,500 laws (the full BGBl corpus since 2023)

# Actor input Schema

## `searchQuery` (type: `string`):

Search for laws by keyword. Example: 'Umweltschutz', 'Datenschutz', 'Klimaschutz', 'Verkehr'.

## `includeFullText` (type: `boolean`):

Fetch the full HTML text of each law. Slower but gives you the complete legal text, not just metadata.

## `includeArticles` (type: `boolean`):

Fetch the list of articles/sections (Paragraphen) for each law from the detail endpoint.

## `maxResults` (type: `integer`):

Maximum number of laws to return.

## `proxyConfiguration` (type: `object`):

Select proxies to use for the scraper.

## Actor input object example

```json
{
  "searchQuery": "Klimaschutz",
  "includeFullText": false,
  "includeArticles": false,
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "DE"
  }
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQuery": "Klimaschutz",
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "DE"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("studio-amba/bundesgesetzblatt-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchQuery": "Klimaschutz",
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "DE",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("studio-amba/bundesgesetzblatt-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQuery": "Klimaschutz",
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "DE"
  }
}' |
apify call studio-amba/bundesgesetzblatt-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=studio-amba/bundesgesetzblatt-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Bundesgesetzblatt Scraper — German Law Gazette",
        "description": "Scrape the German Federal Law Gazette (Bundesgesetzblatt). Extract laws, regulations, and legal texts from the official NeuRIS API. Search by keyword, get full text, articles, and PDF links. No login needed.",
        "version": "0.0",
        "x-build-id": "y1AXLOBOx6kF9gwNA"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/studio-amba~bundesgesetzblatt-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-studio-amba-bundesgesetzblatt-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/studio-amba~bundesgesetzblatt-scraper/runs": {
            "post": {
                "operationId": "runs-sync-studio-amba-bundesgesetzblatt-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/studio-amba~bundesgesetzblatt-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-studio-amba-bundesgesetzblatt-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "searchQuery": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Search for laws by keyword. Example: 'Umweltschutz', 'Datenschutz', 'Klimaschutz', 'Verkehr'."
                    },
                    "includeFullText": {
                        "title": "Include Full Text",
                        "type": "boolean",
                        "description": "Fetch the full HTML text of each law. Slower but gives you the complete legal text, not just metadata.",
                        "default": false
                    },
                    "includeArticles": {
                        "title": "Include Article List",
                        "type": "boolean",
                        "description": "Fetch the list of articles/sections (Paragraphen) for each law from the detail endpoint.",
                        "default": false
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum number of laws to return.",
                        "default": 50
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Select proxies to use for the scraper.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ],
                            "apifyProxyCountry": "DE"
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
