openapi: 3.0.3
info:
  title: Parlament Österreich – Open-Data Filter-API (Anfragen, Regierungsvorlagen, Anträge)
  version: "2026-11-16 (beobachtet)"
  description: |
    Inoffizielle, aus Beobachtung erstellte Beschreibung der Open-Data-Schnittstelle des
    österreichischen Parlaments für schriftliche Anfragen, Regierungsvorlagen, Anträge und
    Gesetzesanträge des Bundesrats. Ein Endpunkt, der Datensatz wird über `VHG` gewählt.
    Nicht vom Parlament. Verbindlich ist nur die Doku auf parlament.gv.at.
    Grundlage: Datensatzdokumentation auf parlament.gv.at und Abruf der Schnittstelle am 16.11.2026.
    Wo Doku und Realität abweichen, gilt hier die Beobachtung (siehe x-doku-abweichung).
    Lizenz der Daten: CC BY 4.0. Titel, Kurzbeschreibung, Dokumente/Volltexte und Porträts sind
    nicht zur Weiterverwendung freigegeben.
  license:
    name: CC BY 4.0 (Daten)
    url: https://creativecommons.org/licenses/by/4.0/deed.de
servers:
  - url: https://www.parlament.gv.at
paths:
  /Filter/api/filter/data/101:
    post:
      summary: Ergebnisliste der Filtersuche (alle Datensätze, Auswahl über VHG)
      description: |
        Liefert alle Anfragen, die zu den Filtern passen. Dimensionen werden mit UND verknüpft,
        Ausprägungen innerhalb einer Dimension mit ODER. Mit `showAll=true` kommt alles in einer
        Antwort (`pages` = 1). Die Zeilen sind positionsbasiert, die Spaltennamen stehen in `header`.
      operationId: filterAnfragen
      parameters:
        - name: js
          in: query
          required: true
          schema: { type: string, enum: [eval] }
        - name: showAll
          in: query
          required: true
          schema: { type: boolean, enum: [true] }
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FilterBody'
            examples:
              nr_oevp_xxvi:
                summary: NR, ÖVP, XXVI. GP
                value: { GP_CODE: [XXVI], VHG: [J_JPR_M], DOKTYP: [J], FRAK_CODE: [V] }
              br_xxviii:
                summary: BR, XXVIII. GP
                value: { NRBR: [BR], GP_CODE: [XXVIII], VHG: [J_JPR_M-BR] }
              regierungsvorlagen_xxviii:
                summary: Regierungsvorlagen, XXVIII. GP
                value: { NRBR: [NR], GP_CODE: [XXVIII], VHG: [RV] }
              antraege_nr:
                summary: Anträge NR, XXVIII. GP
                value: { NRBR: [NR], GP_CODE: [XXVIII], VHG: [ANTR] }
              antraege_br:
                summary: Anträge BR (VHG ANTR-BR, nicht ANTR)
                value: { NRBR: [BR], VHG: [ANTR-BR] }
              ausschussberichte_nr:
                summary: Ausschussberichte NR, XXVIII. GP
                value: { NRBR: [NR], GP_CODE: [XXVIII], VHG: [AUB] }
              ausschussberichte_br:
                summary: Ausschussberichte BR (VHG AUB-BR)
                value: { NRBR: [BR], VHG: [AUB-BR] }
              beschluesse:
                summary: Beschlüsse NR, XXVII. GP
                value: { NRBR: [NR], GP_CODE: [XXVII], VHG: [BNR] }
              eu_mitteilungen_br:
                summary: EU-Mitteilungen BR (VHG2 MT-BR, nicht MTEU-BR)
                value: { NRBR: [BR], VHG: [EU], VHG2: [MT-BR] }
              eu_stellungnahmen_hauptausschuss:
                summary: EU-Stellungnahmen Hauptausschuss NR
                value: { NRBR: [NR], VHG: [EU], VHG2: [S] }
              buergerinitiativen:
                summary: Bürgerinitiativen, XXVII. GP
                value: { NRBR: [NR], GP_CODE: [XXVII], VHG: [BI] }
              petitionen:
                summary: Petitionen, alle GPs
                value: { VHG: [PET] }
              gesetzesantraege_br:
                summary: Gesetzesanträge des BR (mit NRBR NR)
                value: { NRBR: [NR], VHG: [GABR13] }
      responses:
        '200':
          description: Ergebnisliste
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilterResponse'
  /Filter/api/filter/data/143:
    post:
      summary: Aktuelle Beteiligungen (anderer Endpunkt, 27 Spalten, kein VHG)
      description: Gegenstände mit aktuell möglicher Beteiligung. AKTIV=J muss gesetzt sein. Enthält entgegen der Doku auch Stellungnahmen (SN, SBI, SPET, SNME) und Ministerialentwürfe (MEG).
      parameters:
        - { name: js, in: query, required: true, schema: { type: string, enum: [eval] } }
        - { name: showAll, in: query, required: true, schema: { type: boolean, enum: [true] } }
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                AKTIV: { type: array, items: { type: string, enum: ['J'] } }
                BEGUTTYP: { type: array, items: { type: string, enum: [RGES, BI, PET, SN, ME] } }
                GP_CODE: { type: array, items: { type: string } }
                DOKTYP: { type: array, items: { type: string } }
                THEMEN: { type: array, items: { type: string } }
              required: [AKTIV]
            examples:
              gesetzesinitiativen:
                summary: Aktive Gesetzesinitiativen
                value: { AKTIV: ['J'], BEGUTTYP: [RGES] }
      responses:
        '200':
          description: Ergebnisliste (pages, lastSync, count, header, rows mit 27 Spalten)
          content:
            application/json:
              schema: { type: object }
  /Filter/api/filter/data/211?js=eval&showAll=true:
    post:
      summary: Stenographische Protokolle (16 Spalten)
      description: Sitzungen von NR und BR. NBVS NRSITZ oder BRSITZ, DATUM im Format yyyy-mm-dd (Start, Ende). Ohne GP_CODE alle GPs (I bis XXVIII).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties: { NBVS: { type: array, items: { type: string, enum: [NRSITZ, BRSITZ] } }, GP_CODE: { type: array, items: { type: string } }, DATUM: { type: array, items: { type: string } } }
            example: { GP_CODE: [XXVII], NBVS: [NRSITZ], DATUM: ['2023-02-01', '2023-08-01'] }
      responses:
        '200':
          description: pages, lastSync, count, header, rows (16 Spalten)
          content:
            application/json:
              schema: { type: object }
  /Filter/api/json/post?jsMode=EVAL&FBEZ=WFP_007&listeId=11070&showAll=true:
    post:
      summary: Plenarsitzungen (11 Spalten, kein lastSync)
      description: Sitzungen NR und BR. Bei NRBRBV=NR ohne GP kommt nur XXVII.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties: { NRBRBV: { type: array, items: { type: string, enum: [NR, BR] } }, GP: { type: array, items: { type: string } } }
            example: { NRBRBV: [NR], GP: [XXVII] }
      responses:
        '200':
          description: pages, count, header, rows (11 Spalten)
          content:
            application/json:
              schema: { type: object }
  /Filter/api/filter/data/409?1=1&showAll=true&export=true:
    post:
      summary: Parlamentarier:innen seit 1918 (10 Spalten, Spalte Attribute ist ein Objekt)
      description: Leerer Body liefert alle Personen. Filter-Schlüssel ATTR_JSON.mandate_detail.* haben Punkte im Namen.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties: { GESCHL_CODE: { type: array, items: { type: string, enum: [M, W] } }, PRAES: { type: array, items: { type: string, enum: ['J'] } } }
            example: { GESCHL_CODE: [W] }
      responses:
        '200':
          description: pages, lastSync, count, header, rows (10 Spalten)
          content:
            application/json:
              schema: { type: object }
  /Filter/api/json/post?jsMode=EVAL&FBEZ=WFW_002&listeId=10002&showAll=true:
    post:
      summary: Aktuelle Abgeordnete NR (12 Spalten, kein lastSync)
      description: M und/oder W muss gesetzt sein, sonst Antwort mit errorMsg statt rows.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties: { M: { type: array, items: { type: string, enum: [M] } }, W: { type: array, items: { type: string, enum: [W] } }, FR: { type: array, items: { type: string } }, WK: { type: array, items: { type: string } }, BL: { type: array, items: { type: string } }, FUNK: { type: array, items: { type: string } }, WP: { type: array, items: { type: string } }, PLZ: { type: array, items: { type: string } } }
            example: { M: [M], W: [W] }
      responses:
        '200':
          description: pages, count, header, rows (12 Spalten) oder errorMsg
          content:
            application/json:
              schema: { type: object }
  /Filter/api/json/post?jsMode=EVAL&FBEZ=WFW_005&listeId=10005&showAll=true:
    post:
      summary: Aktuelle Mitglieder des Bundesrats (8 Spalten, kein lastSync)
      description: M und/oder W als Dimension und Wert nötig; leerer Body liefert 0 Zeilen ohne Fehlermeldung.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties: { M: { type: array, items: { type: string } }, W: { type: array, items: { type: string } }, FR: { type: array, items: { type: string } }, BL: { type: array, items: { type: string } }, FUNK: { type: array, items: { type: string } } }
            example: { M: [M], W: [W] }
      responses:
        '200':
          description: pages, count, header, rows
          content:
            application/json:
              schema: { type: object }
  /Filter/api/filter/data/110?js=eval&showAll=true:
    post:
      summary: Parlamentskorrespondenz (15 Spalten)
      description: Ohne showAll nur 20 Zeilen pro Seite.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties: { SACHB: { type: array, items: { type: string } }, THEMEN: { type: array, items: { type: string } }, JAHR: { type: array, items: { type: string } }, STW: { type: array, items: { type: string } } }
            example: { JAHR: ['2026'] }
      responses:
        '200':
          description: pages, lastSync, count, header, rows
          content:
            application/json:
              schema: { type: object }
  /Filter/api/filter/data/600?js=eval&showAll=true:
    post:
      summary: Termine (29 Spalten)
      description: DATERANGE im Format yyyy-mm-dd. Leerer Body liefert alle Termine (über 23.000).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties: { GREMIUM: { type: array, items: { type: string } }, TERMINART: { type: array, items: { type: string } }, ORT: { type: array, items: { type: string } }, DATERANGE: { type: array, items: { type: string } }, FORMAT: { type: array, items: { type: string } }, THEMEN: { type: array, items: { type: string } } }
            example: { GREMIUM: [Nationalrat], DATERANGE: ['2026-01-01', '2026-12-31'] }
      responses:
        '200':
          description: pages, lastSync, count, header, rows
          content:
            application/json:
              schema: { type: object }
  /Filter/api/filter/data/2008?1=1&showAll=true&export=true:
    post:
      summary: Ausschüsse NR und BR (10 Spalten, Header-Labels teils leer)
      description: AUS_ART nur für NR, AKTIV nur für BR. Leerer Body liefert alle.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties: { GREMIUM: { type: array, items: { type: string } }, GP_CODE: { type: array, items: { type: string } }, AUS_ART: { type: array, items: { type: string } }, AKTIV: { type: array, items: { type: string } } }
            example: { GREMIUM: [NR], GP_CODE: [XXVIII] }
      responses:
        '200':
          description: pages, lastSync, count, header, rows
          content:
            application/json:
              schema: { type: object }
  /Filter/api/filter/data/250?js=eval&showAll=true&export=true:
    post:
      summary: Ausschussmitgliedschaften einer Person (15 Spalten)
      description: PAD_INTERN als Zahl oder String.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties: { PAD_INTERN: { type: array, items: { type: integer } } }
            example: { PAD_INTERN: [51879] }
      responses:
        '200':
          description: pages, lastSync, count, header, rows
          content:
            application/json:
              schema: { type: object }
  /gegenstand/{gp}/{ityp}/{inr}:
    get:
      summary: Detailseite (Geschichtsseite) eines Gegenstands als JSON
      description: |
        Mit `?json=true` liefert die Geschichtsseite den Inhalt als JSON. Der Parameter ist in der
        Datensatzdoku nicht dokumentiert (Doku: „Aufrufweg nicht dokumentiert“), funktioniert aber.
        Für den BR lautet der Pfad `/gegenstand/BR/{ityp}/{inr}` (z. B. `/gegenstand/BR/J-BR/4265`).
      operationId: detailAnfrage
      parameters:
        - { name: gp, in: path, required: true, schema: { type: string }, description: 'Römisch (XXVIII) oder BR', example: XXVIII }
        - { name: ityp, in: path, required: true, schema: { type: string }, description: 'z. B. J, JPR, J-BR, M-BR, I (Regierungsvorlagen, Gesetzesanträge), A, AA, UEA, A-BR', example: J }
        - { name: inr, in: path, required: true, schema: { type: integer }, example: 4483 }
        - { name: json, in: query, required: true, schema: { type: boolean, enum: [true] } }
      responses:
        '200':
          description: Geschichtsseite
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Geschichtsseite'
components:
  schemas:
    FilterBody:
      type: object
      description: Schlüssel sind Dimensionscodes, Werte Arrays von Ausprägungen.
      properties:
        NRBR: { type: array, items: { type: string, enum: [NR, BR] }, description: Gremium }
        GP_CODE: { type: array, items: { type: string }, description: 'Gesetzgebungsperiode, römisch (XX … XXVIII)' }
        DATUM_VON: { type: array, items: { type: string }, description: 'Zeitraum, Format dd.mm.yyyy (Start und Ende)' }
        VHG: { type: array, items: { type: string, enum: [J_JPR_M, J_JPR_M-BR, RV, ANTR, ANTR-BR, GABR, GABR13, AUB, AUB-BR, BNR, BI, PET, EU] }, description: 'Gegenstand = Datensatz. Anfragen NR J_JPR_M, Anfragen BR J_JPR_M-BR, Regierungsvorlagen RV, Anträge NR ANTR, Anträge BR ANTR-BR (Doku sagt ANTR, liefert 0 Treffer), Gesetzesanträge des BR GABR und GABR13 (mit NRBR=NR), Ausschussberichte NR AUB und BR AUB-BR, Beschlüsse BNR (NR und BR), Bürgerinitiativen BI, Petitionen PET (beide nur NR), EU-Vorlagen EU (Unterart über VHG2).' }
        DOKTYP: { type: array, items: { type: string }, description: 'Art. Anfragen NR: J, JPR. Regierungsvorlagen: RV, RV-KN, RV-PN. Anträge NR: A, A(E), AA, AEA, AMIN, ARH2, AVB, BUA, UEA sowie undokumentiert UEAM, AAA, ZA, ARH1, GAA, EAA. Anträge BR: A-BR, A(E)-BR, AA-BR, AEA-BR, UEA-BR. Gesetzesanträge: GABR, GABR13. Ausschussberichte: AUB, AUB-KN, AUB-PN, AUB-BR. Beschlüsse: BNR, BS, BSE, BSESM, BS-BR sowie undokumentiert BSW, BSESMP.' }
        VHG2: { type: array, items: { type: string, enum: [JMIN, JPRPR, JRH, JPRAUS, JMIN-BR, JPRPR-BR, M-BR, RV, SELBST, UEA, AA, AUSSELBST, ANTR, ZA, SELBST-BR, UEA-BR, AEA-BR, AA-BR, GABR, GABR13, AUB, AUB-BR, BNRNR, S, SEU, MTEU, S-BR, SB-BR, MT-BR, EUBTG, SINF, SINF-BR, EUD, EUD-BR, SLT-BR, RGEU, RVEU] }, description: 'Unterart (beobachtet). JRH, JPRAUS, M-BR und die Antragsgruppen sind in der Doku nicht beschrieben.' }
        THEMEN: { type: array, items: { type: string }, description: '20 feste Themenbereiche' }
        FRAK_CODE: { type: array, items: { type: string, enum: [T, F, B, G, V, N, L, J, P, S, A] }, description: 'Klub/Fraktion (Codes laut Doku)' }
        PAD_INTERN: { type: array, items: { type: string }, description: 'Personen-ID (Datensatz Parlamentarier:innen seit 1918)' }
        INRNUM: { type: array, items: { type: string }, description: Nummer der Anfrage }
        SW: { type: array, items: { type: string }, description: Schlagwort }
        EUROVOC: { type: array, items: { type: string }, description: EuroVoc-Deskriptor }
    FilterResponse:
      type: object
      properties:
        pages: { type: integer }
        lastSync: { type: string, description: 'Zeitpunkt des letzten Datensync, z. B. 2026-11-16 08:27:22.0' }
        count: { type: integer }
        header:
          type: array
          description: Spaltenbeschreibung, 36 Einträge (Doku nennt 30)
          items:
            type: object
            properties:
              feldId: { type: integer }
              rnr: { type: integer, description: Position 1 bis 36 }
              label: { type: string }
              hidden: { type: boolean }
        rows:
          type: array
          items:
            type: array
            description: Werte in der Reihenfolge von `header`; einzelne Zeilen können kürzer sein
            items: {}
    Geschichtsseite:
      type: object
      properties:
        pagetype: { type: string, enum: [geschichtsseite] }
        meta: { type: object }
        content:
          type: object
          properties:
            zitation: { type: string, example: 4483/J }
            gp_code: { type: string }
            ityp: { type: string }
            inr: { type: string }
            doktyp: { type: string }
            update: { type: string, format: date-time }
            einlangen: { type: string, format: date-time }
            deleted: { type: boolean }
            vhg_fertig: { type: string, enum: [J, N] }
            vhg_fertig_docs: { type: string, enum: [J, N] }
            process: { type: string }
            stages:
              type: array
              items:
                type: object
                properties:
                  date: { type: string, description: dd.mm.yyyy }
                  text: { type: string, description: 'Kann HTML-Links enthalten, z. B. „Einlangen im Nationalrat (Frist: …)“' }
                  priority: { type: integer }
                  fsth: { type: array, items: { type: object } }
            documents: { type: array, items: { type: object }, description: 'Nicht Open Data (Dokumente/Volltexte)' }
            names:
              type: array
              items:
                type: object
                properties:
                  funktext: { type: string, description: '„Eingebracht von“, „Eingebracht an“; bei Rechnungshof-Anfragen abweichend' }
                  name: { type: string }
                  frak_code: { type: string }
                  ltext: { type: string, description: Funktionsbezeichnung (nur Adressat:innen) }
                  url: { type: string, example: /person/64022 }
                  portrait: { type: object, description: Nicht Open Data }
            topics: { type: object, description: 'bubbles mit label und link' }
            headwords: { type: object }
            eurovoc: { type: object }
