API Dokumentation

All data on Open Parliament TV can be requested via our Open Data API. Recently we are overrun by automated traffic from AI tools and bots, sometimes millions of requests per day of people wanting to scrape our entire dataset. To keep the service usable for all users, anonymous requests are now rate-limited. If you need unlimited requests, please get in touch so we can issue you an API key.
Scraping our entire dataset via the API is completely unnecessary, as all raw speech data is published as JSON files in GitHub repositories: OpenParliamentTV/OpenParliamentTV-Data-DE.
Entity URIs are based on the respective platform URL and can be formed by simply adding /api/v1 before the entity part.

Beispiel:
https://de.openparliament.tv/person/Q567
https://de.openparliament.tv/api/v1/person/Q567

GET Redebeitrag

Media IDs contain info about the parliament, electoral period and session. You should however not try to guess those IDs (eg. based on the order of speeches). This might work in some cases, it will not in many others.

Endpoint: /api/v1/media/ID
Beispiel: Redebeitrag
URI

GET Person

Person IDs are always a Wikidata ID.

Endpoint: /api/v1/person/ID
Beispiel: Angela Merkel (Wikidata ID Q567)
URI

GET Organisation

Organisation IDs are always a Wikidata ID.

Endpoint: /api/v1/organisation/ID
Beispiel: Fraktion/Gruppe BÜNDNIS 90/DIE GRÜNEN (Wikidata ID Q1007353)
URI

GET Dokument

Dokument IDs are internal incremental IDs and contain no reference to the document numbers (like "Drucksache 19/1234"). The rationale for this is that documents can be official documents as well as law texts and potentially other types of documents, sometimes applying to a specific parliament, sometimes generic, sometimes having a Wikidata ID, sometimes not. If you want to get a document by its official document number, you can use the document search.

Endpoint: /api/v1/document/ID
Beispiel: Drucksache 19/1184
URI

GET Begriff

Begriff IDs are always a Wikidata ID.

Endpoint: /api/v1/term/ID
URI

GET Wahlperiode

Wahlperiode IDs can safely be referenced by the parliament shortcode plus the respective number.

Endpoint: /api/v1/electoralPeriod/ID
Beispiel: Wahlperiode 19 of the German Bundestag (ID: "DE-019")
URI

GET Sitzung

Sitzung IDs can safely be referenced by the parliament shortcode plus the respective numbers.

Endpoint: /api/v1/session/ID
Beispiel: Sitzung 61 in Wahlperiode 19 of the German Bundestag (ID: "DE-0190061")
URI

GET Tagesordnungspunkt

Tagesordnungspunkt IDs are built of the parliament shortcode and an incremental ID. You should not try to guess those IDs (eg. based on the order of agenda items). This might work in some cases, it will not in many others.

Endpoint: /api/v1/agendaItem/ID
Beispiel: Tagesordnungspunkt "Gesetzliche Rentenversicherung" in Sitzung 61 in Wahlperiode 19 of the German Bundestag (ID: "DE-454")
URI

IIIF (International Image Interoperability Framework)

IIIF (International Image Interoperability Framework, Presentation API 3.0) describes speeches and sessions as Manifests and Collections that open directly in viewers like Mirador or Universal Viewer. Resources are served as JSON-LD (application/ld+json), CORS-enabled.

IIIF Manifest - Redebeitrag

IIIF Presentation 3.0 Manifest for a single speech (video, transcript annotations, named-entity annotations with time codes). Request via the format=iiif query parameter (or an Accept: application/ld+json header) on the media endpoint.

Endpoint: /api/v1/media/ID?format=iiif

IIIF Manifest - Sitzung

IIIF Manifest for a whole session: one Canvas per public speech, grouped into Ranges by agenda item.

Endpoint: /api/v1/session/ID?format=iiif

IIIF Collection - Parliament / Wahlperiode

IIIF Collection for a whole parliament (its electoral periods as sub-collections), or for a single electoral period (its sessions as Manifest references).

Endpoint: /api/v1/iiif/collection/PARLIAMENT and /api/v1/iiif/collection/PARLIAMENT/ELECTORALPERIOD

IIIF Collection - Suchen

A IIIF Collection built from a media search: its items are Manifest references to the matching speeches. Accepts the same query parameters as /api/v1/search/media (see the Search tab).

Endpoint: /api/v1/iiif/search?PARAMETERS

Akoma Ntoso

Akoma Ntoso (OASIS LegalDocML 1.0) is the XML standard for legislative and parliamentary documents, used by parliaments and legal information systems to exchange debate records.

Redebeitrag / Sitzung

Akoma Ntoso 1.0 <debate> document, requested via the format=akn query parameter (or an Accept: application/akn+xml header) on the media or session endpoint. A speech is returned as a debate record holding the one <debateSection> of its agenda item, a session as the whole sitting with one <debateSection> per agenda item. Every <speech> references its speaker and faction as TLC references (Wikidata QIDs) and carries absolute startTime/endTime attributes; interjections and other comments become <scene> elements. FRBR metadata in <meta> identifies work, expression and manifestation.

Audio/video synchronisation: Akoma Ntoso has no timeline or synchronisation mechanism, so the sentence-level alignment between transcript and video that underlies our data cannot be expressed in it. As a substitute, each <speech> carries absolute startTime/endTime timestamps and refersTo a W3C Media Fragment URI (video.mp4#t=start,end) that deep-links its exact clip segment — precise to the speech, but not to the sentence. For sentence-level alignment use the ParlaMint, IIIF or WebVTT representation below.

Endpoint: /api/v1/media/ID?format=akn and /api/v1/session/ID?format=akn
Redebeitrag Ergebnis anzeigen

ParlaMint (TEI)

ParlaMint (TEI following the ParlaMint conventions, a Parla-CLARIN specialisation) is the exchange format of the parliamentary corpus-linguistics community, used by comparable corpora of dozens of European parliaments. Unlike Akoma Ntoso it can express the full sentence-level audio/video alignment of our data, via a TEI <timeline>.

Redebeitrag / Sitzung

TEI document following the ParlaMint conventions, requested via the format=parlamint query parameter (or an Accept: application/tei+xml header) on the media or session endpoint. Speeches become <u> utterances with @who (Wikidata QID) and @ana (#chair / #regular), one <seg> per paragraph, comments as <incident>, <kinesic> and <vocal>; the <teiHeader> carries the speakers and factions as <listPerson>/<listOrg>. The AV recording is declared in <recordingStmt> and aligned sentence by sentence to a TEI <timeline>.

Endpoint: /api/v1/media/ID?format=parlamint and /api/v1/session/ID?format=parlamint
Redebeitrag Ergebnis anzeigen

WebVTT

WebVTT is the W3C standard for timed text: cue-by-cue transcripts that any HTML5 <track> element or media player can display as subtitles, and the simplest way to consume our transcript timings.

Redebeitrag

Timed transcript of a speech as a WebVTT file (text/vtt).

Endpoint: /api/v1/media/ID/transcript.vtt

Transcript Selection

Speeches often carry several transcripts. The WebVTT, Akoma Ntoso and ParlaMint endpoints all accept the same two optional parameters to pick one; without them the best available transcript is used.

Parameter Description Beispiel
type Transcript type proceedings, generated
lang Transcript language (BCP 47) de, en
Statistics endpoints provide aggregated insights into parliamentary data, including speaker activity, word frequency analysis, entity relationships, and political discourse patterns.

Endpoint

/api/v1/statistics/general

Beispiel Request

(General statistics showing speeches, speakers, speaking time, and vocabulary across all parliaments)
URI

Parameters

Parameter Validation Description Type
parliament Optional, defaults to "de" Parliament code for multi-parliament support String
For person entities, this endpoint automatically includes speaker vocabulary statistics (total words, unique words, and top words with usage frequency).

Endpoint

/api/v1/statistics/entity

Beispiel Request

(Statistics for person Angela Merkel, showing associations, trends, and vocabulary)
URI

Parameters

Parameter Validation Description Type
entityType Required: person, organisation, document, term Type of entity to analyze String
entityID Required: Wikidata ID RegEx or internal ID ID of specific entity to analyze String

Endpoint

/api/v1/statistics/entity-counts

Beispiel Request

(Get counts of all entity types in the database)
URI

Parameters

Parameter Validation Description Type
The API structure is based on the JSON:API Specification.
A machine-readable OpenAPI 3.0 description of the API is available at https://de.openparliament.tv/api/openapi.yaml. Browse it rendered in an external viewer: Redoc or Swagger Editor.

Paths

API Dokumentation
/api

API Endpoint Base URL
/api/v1


API Responses

Responses MUST include the following properties for any request (GET and POST):

{
  "meta": {
	"api": {
	  "version": "1.0",
	  "documentation": "https://de.openparliament.tv/api",
	  "license": {
		"label": "ODC Open Database License (ODbL) v1.0",
		"link": "https://opendatacommons.org/licenses/odbl/1-0/"
	  }
	},
	"requestStatus": "success" // OR "error"
  },
  "data": [], // {} OR []
  "errors": [], // EITHER "data" OR "errors"
  "links": {
	"self": "https://de.openparliament.tv/api/v1/search/media?q=Rente" // request URL
  }
}

Successful requests MUST include the following properties:

{
  "meta": {
	"api": {
	  "version": "1.0",
	  "documentation": "https://de.openparliament.tv/api",
	  "license": {
		"label": "ODC Open Database License (ODbL) v1.0",
		"link": "https://opendatacommons.org/licenses/odbl/1-0/"
	  }
	},
	"requestStatus": "success"
  },
  "data": {},
  "links": {
	"self": "https://de.openparliament.tv/api/v1/search/media?q=Rente" // request URL
  }
}

Errors MUST include the following properties:

{
  "meta": {
	"api": {
	  "version": "1.0",
	  "documentation": "https://de.openparliament.tv/api",
	  "license": {
		"label": "ODC Open Database License (ODbL) v1.0",
		"link": "https://opendatacommons.org/licenses/odbl/1-0/"
	  }
	},
	"requestStatus": "error"
  },
  "errors": [
	{
	  "meta": {
		"domSelector": "" // optional
	  },
	  "status": "422", // HTTP Status   
	  "code": "3", 
	  "title":  "Invalid Attribute",
	  "detail": "First name must contain at least three characters."
	}
  ],
  "links": {
	"self": "https://de.openparliament.tv/api/v1/search/media?q=Rente" // request URL
  }
}

Data Objects

Data Objects MUST always include the properties:

  • id
  • type
  • attributes (data item specific properties)

Additionally Data Objects CAN include the properties:

  • links ("self" = link to the respective API request URL)
  • relationships (properties derived from other data items)

Depending on the context, the attributes object can only include a subset of all properties. The full set can then be retrieved via an API request to links > self.

This principle SHOULD be applied on all levels of the data structure.


Examples

Example for an Entity Response:

{
  "meta": {
	"api": {
	  "version": "1.0",
	  "documentation": "https://de.openparliament.tv/api",
	  "license": {
		"label": "ODC Open Database License (ODbL) v1.0",
		"link": "https://opendatacommons.org/licenses/odbl/1-0/"
	  }
	},
	"requestStatus": "success"
  },
  "data": {
	"type": "media",
	"id": "DE-198765837",
	"attributes": {},
	"relationships": {
	  "documents": {
		"data": [
		  {
			"type": "document",
			"id": "201",
			"attributes": {},
			"links": {
			  "self": "https://de.openparliament.tv/api/v1/document/201"
			}
		  }
		],
		"links": {
		  "self": "https://de.openparliament.tv/api/v1/searchAnnotations?mediaID=DE-198765837&type=document"
		}
	  }
	},
	"links": {
	  "self": "https://de.openparliament.tv/api/v1/media/DE-198765837"
	}
  }
}

Example for a Search Response:

{
  "meta": {
	"api": {
	  "version": "1.0",
	  "documentation": "https://de.openparliament.tv/api",
	  "license": {
		"label": "ODC Open Database License (ODbL) v1.0",
		"link": "https://opendatacommons.org/licenses/odbl/1-0/"
	  }
	},
	"requestStatus": "success",
	"results": {
	  "count": 25,
	  "total": 128,
	  "rangeStart": 51,
	  "rangeEnd": 75,
	  "maxScore": 4.7654785 /* float or null */
	}
  },
  "data": [],
  "links": {
	"self": "https://de.openparliament.tv/api/v1/search/people?party=CDU&page[number]=3&page[size]=25",
	"first": "https://de.openparliament.tv/api/v1/search/people?party=CDU&page[number]=1&page[size]=25",
	"prev": "https://de.openparliament.tv/api/v1/search/people?party=CDU&page[number]=2&page[size]=25",
	"next": "https://de.openparliament.tv/api/v1/search/people?party=CDU&page[number]=4&page[size]=25",
	"last": "https://de.openparliament.tv/api/v1/search/people?party=CDU&page[number]=13&page[size]=25"
  }
}