# OParl Council Information Extractor (`datamule/oparl-council-information-extractor`) Actor

Point at ANY German OParl council-information system (Ratsinformationssystem) for flat rows — papers (Drucksachen), meetings, committees, people. One actor, every vendor (STERNBERG, more-rubin, CC e-gov): reads list URLs from the Body, follows links.next paging, skips dead endpoints. Pay per record.

- **URL**: https://apify.com/datamule/oparl-council-information-extractor.md
- **Developed by:** [Datamule](https://apify.com/datamule) (community)
- **Categories:** Developer tools, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## OParl Council Information Extractor

Point at **any German OParl endpoint** and get clean, flat rows for a municipality's papers,
meetings, committees and people — plus the lossless raw JSON of every object. One actor, every
council-information system.

**OParl** ([schema.oparl.org](https://schema.oparl.org)) is the open standard for the German
municipal *Ratsinformationssystem* (council information system) — the REST/JSON API that
publishes a city's or municipality's **papers (Drucksachen), meetings (Sitzungen), committees
(Gremien) and council members**. The entire point of OParl is that the data graph is *identical*
across every vendor implementation:

```
System → Body → { Paper, Meeting, Organization, Person, LegislativeTerm }
```

So this single actor speaks to **every OParl server in Germany** — STERNBERG SD.NET, more-rubin
(gremien.info), CC e-gov / Session, regisafe, ALLRIS and the rest — with no per-city scraper and
no host enumeration. Just point it at any System or Body URL. A live registry of public endpoints
is at [dev.oparl.org/api/endpoints](https://dev.oparl.org/api/endpoints).

### What you can extract

Pick a **mode** and point `sources` at one or more OParl base URLs:

| Mode | What you get (one row per…) |
|------|------------------------------|
| **papers** *(default)* | a Paper / Drucksache — reference, title, date, paperType, main-file URL, consultation count, body, web link + raw JSON |
| **meetings** | a Meeting / Sitzung — name, start, end, cancelled, organization(s), location, body |
| **organizations** | a committee / department — name, shortName, organizationType, classification, start/end date |
| **persons** | a council member — name, family/given name, form of address, gender |
| **discovery** | a census row per Body — the System identity + every object-list URL, to inventory an endpoint first |

### Why one actor covers every vendor

OParl's wire format varies in exactly the ways a naive client trips on — and this runner handles
all of them:

- **Object-list URLs differ by version and vendor.** A v1.1 STERNBERG Body exposes
  `…/webservice/oparl/v1.1/body/1/paper`; a v1.0 CC e-gov Body exposes `…/oi/oparl/1.0/papers.asp?body=1`;
  more-rubin exposes `…/oparl/body/<id>/paper`. The list URL for every mode is **read from the Body
  object's own link field** — never hard-coded — so any layout works.
- **Pagination differs by vendor.** STERNBERG and more-rubin return a `pagination.totalElements`
  block *and* a `links.next` cursor; CC e-gov returns **no** `totalElements`, only a `links.next`
  cursor URL. The paginator **follows `links.next`** (the spec's cursor — works everywhere) and
  falls back to deriving the next page from `pagination` only when a server omits the link. A
  `totalElements`-only client would silently stop after page 1 on every CC e-gov host; this one
  does not.
- **Soft-disabled endpoints return HTTP 200 + an OParl `Error` body** (`"OParl is not active."`).
  Those are detected and skipped with a warning — never emitted as a record.
- **Resilience.** A browser User-Agent is sent, transient failures are retried with backoff, and an
  unreachable source is skipped with a warning. If *every* source is skipped the run fails fast; a
  reachable endpoint with zero public objects yields zero rows and a clean exit. Output is **never
  fabricated**.

### Input

| Field | Description |
|-------|-------------|
| `sources` | One or more OParl base URLs (a System, a Body, or a body-list URL). Leave empty to run against a built-in set of verified endpoints. |
| `mode` | `papers` (default) / `meetings` / `organizations` / `persons` / `discovery`. |
| `body` | Optional — restrict to Bodies whose id/name/shortName contains this text. |
| `modifiedSince` | Optional incremental harvest — only objects modified on/after this ISO 8601 timestamp (sent as OParl `?modified_since=`). |
| `maxRecords` | Global cap on total rows across all sources and pages (default 1000). |
| `bearer` / `extraHeaders` | Optional auth for gated deployments. Never required for public systems; never logged. |

### Output

One flat, fully-typed row per object. Every optional field is nullable, so rows from different
vendors and modes share one stable schema. Provenance columns (`_sourceSystem`, `_vendor`,
`_oparlVersion`, `_body`, `_bodyName`) and the lossless `_raw` JSON are attached to every row.

```json
{
  "_mode": "papers",
  "_vendor": "STERNBERG SD.NET",
  "_oparlVersion": "1.1",
  "_bodyName": "Gemeinde Aarbergen",
  "reference": "VL-22/2013",
  "name": "Voranschlag über die Einnahmen und Ausgaben …",
  "date": "2013-10-10",
  "paperType": "Beschlussvorlage Gemeindevertretung",
  "mainFileUrl": "https://…/files/…/Beschlussvorlage_….pdf",
  "consultationCount": 1,
  "id": "https://…/body/1/paper/93",
  "web": "https://…/vorgang/?__=…"
}
```

### Pricing

Pay-per-event: one **record** charge per emitted row. No subscription — you pay only for what you
harvest.

### Who it's for

Civic-tech and govtech teams, journalists and researchers tracking municipal decisions,
transparency / open-data projects, and anyone building on Germany's council-information
infrastructure without writing a scraper per city.

# Actor input Schema

## `sources` (type: `array`):

One or more OParl base URLs — a System URL, a Body URL, or a body-list URL of ANY conforming German council-information system (Ratsinformationssystem). The actor reads each Body's own paper/meeting/organization/person list URL, so any vendor + version works (STERNBERG SD.NET v1.1, more-rubin v1.0, CC e-gov/Session v1.0, regisafe, ALLRIS …). Leave empty to run against a built-in set of verified endpoints. Examples: https://rim.ekom21.de/aarbergen/webservice/oparl/v1.1/system (STERNBERG), https://emmelshausen.gremien.info/oparl/system (more-rubin), https://www.sitzungsdienst-pankow.de/oi/oparl/1.0/system.asp (CC e-gov). Endpoint registry: https://dev.oparl.org/api/endpoints

## `mode` (type: `string`):

Which OParl object type to extract. papers (default) — one row per Paper/Drucksache (reference, title, date, paperType, main file URL, consultation count). meetings — one row per Meeting/Sitzung (name, start, end, organization, location). organizations — one row per committee/department. persons — one row per council member. discovery — one census row per Body (System identity + every object-list URL), to inventory an endpoint before harvesting.

## `body` (type: `string`):

Restrict the harvest to Bodies whose id, name, or shortName contains this text (case-insensitive). A System can expose several Bodies (e.g. a Verbandsgemeinde with member municipalities); leave empty to harvest all of them.

## `modifiedSince` (type: `string`):

Incremental harvest: only objects modified on/after this timestamp (sent as OParl ?modified\_since=). Use an ISO 8601 UTC timestamp, e.g. 2024-01-01T00:00:00Z. Leave empty to harvest everything. Not every server honors the filter; unsupported servers simply return the full list.

## `maxRecords` (type: `integer`):

A GLOBAL cap on the total rows emitted across all sources, all Bodies and all pages (each emitted row is one billable event). Default 1000. Increase to auto-paginate through a large repository (STERNBERG hosts can hold thousands of papers).

## `bearer` (type: `string`):

Optional bearer token for gated OParl deployments (sent as Authorization: Bearer \*\*\*). Not required for public council systems — anonymous read is the point of OParl. Never logged.

## `extraHeaders` (type: `object`):

Optional extra HTTP headers as a JSON object, e.g. {"x-api-key": "..."} for gated servers. Not required for public endpoints. Header values are never logged.

## Actor input object example

```json
{
  "sources": [
    "https://rim.ekom21.de/aarbergen/webservice/oparl/v1.1/system"
  ],
  "mode": "papers",
  "maxRecords": 1000
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "sources": [
        "https://rim.ekom21.de/aarbergen/webservice/oparl/v1.1/system"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("datamule/oparl-council-information-extractor").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 = { "sources": ["https://rim.ekom21.de/aarbergen/webservice/oparl/v1.1/system"] }

# Run the Actor and wait for it to finish
run = client.actor("datamule/oparl-council-information-extractor").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 '{
  "sources": [
    "https://rim.ekom21.de/aarbergen/webservice/oparl/v1.1/system"
  ]
}' |
apify call datamule/oparl-council-information-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=datamule/oparl-council-information-extractor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/p6CrFwkhtN6uvhGpC/builds/PYlhV59havsXLrKPb/openapi.json
