{
  "openapi": "3.0.1",
  "info": {
    "title": "German Bundestag Legislation Tracker (DIP)",
    "description": "Track German federal legislation: bills, status, promulgation, entry into force, printed papers (Drucksachen) and plenary protocols from the official Bundestag/Bundesrat DIP API. Filter by keyword, topic, initiator, date or changes since last run.",
    "version": "1.0",
    "x-build-id": "prGJsQRVOKlwWc8MK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dach-open-data~bundestag-dip-legislation/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dach-open-data-bundestag-dip-legislation",
        "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/dach-open-data~bundestag-dip-legislation/runs": {
      "post": {
        "operationId": "runs-sync-dach-open-data-bundestag-dip-legislation",
        "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/dach-open-data~bundestag-dip-legislation/run-sync": {
      "post": {
        "operationId": "run-sync-dach-open-data-bundestag-dip-legislation",
        "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": {
          "resource": {
            "title": "What to search",
            "enum": [
              "PROCEEDING",
              "PRINTED_PAPER",
              "PLENARY_PROTOCOL"
            ],
            "type": "string",
            "description": "PROCEEDING = legislative and parliamentary procedures (bills, motions, inquiries) with status, promulgation and entry into force. PRINTED_PAPER = Drucksachen (bills, motions, answers) with PDF links. PLENARY_PROTOCOL = plenary session minutes.",
            "default": "PROCEEDING"
          },
          "titleKeywords": {
            "title": "Title keywords",
            "type": "array",
            "description": "Words that must appear in the title (German). Several entries = OR. Example: Wasserstoff, Pflege, Künstliche Intelligenz.",
            "items": {
              "type": "string"
            }
          },
          "descriptors": {
            "title": "Subject descriptors",
            "type": "array",
            "description": "Official thesaurus terms (German), several entries = AND. Example: Klimaschutz, Datenschutz.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "subjectAreas": {
            "title": "Subject areas (Sachgebiete)",
            "type": "array",
            "description": "E.g. Energie, Gesundheit, Wirtschaft, Innere Sicherheit. Several entries = AND.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "procedureTypes": {
            "title": "Procedure types (proceedings only)",
            "type": "array",
            "description": "E.g. Gesetzgebung (legislation), Antrag (motion), Kleine Anfrage (minor interpellation), Große Anfrage, EU-Vorlage. Several = OR.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "statuses": {
            "title": "Status (proceedings only)",
            "type": "array",
            "description": "E.g. Verkündet (promulgated), Überwiesen (referred to committee), Abgeschlossen, Noch nicht beraten. Several = OR.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "documentTypes": {
            "title": "Document types (printed papers only)",
            "type": "array",
            "description": "E.g. Gesetzentwurf (bill), Antrag, Antwort, Beschlussempfehlung und Bericht, Kleine Anfrage.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "initiators": {
            "title": "Initiators / authors",
            "type": "array",
            "description": "E.g. Bundesregierung, Bundesrat, Fraktion der CDU/CSU, Fraktion der SPD. Several = AND.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "electoralPeriods": {
            "title": "Electoral periods",
            "type": "array",
            "description": "Wahlperiode numbers. 21 = current Bundestag (since 2025), 20 = 2021–2025. Empty = all periods.",
            "default": [
              21
            ]
          },
          "chamber": {
            "title": "Chamber",
            "enum": [
              "",
              "BT",
              "BR"
            ],
            "type": "string",
            "description": "BT = Bundestag, BR = Bundesrat, empty = both.",
            "default": ""
          },
          "dateFrom": {
            "title": "Date from (YYYY-MM-DD)",
            "type": "string",
            "description": "Only items dated on or after this day.",
            "default": ""
          },
          "dateTo": {
            "title": "Date to (YYYY-MM-DD)",
            "type": "string",
            "description": "Only items dated on or before this day.",
            "default": ""
          },
          "updatedSince": {
            "title": "Updated since (YYYY-MM-DD)",
            "type": "string",
            "description": "For monitoring: only items changed since this date. Combine with a weekly schedule to get a change feed.",
            "default": ""
          },
          "includeAbstract": {
            "title": "Include abstract",
            "type": "boolean",
            "description": "Official summary of the proceeding (can be long).",
            "default": true
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on records returned and charged in this run.",
            "default": 100
          },
          "apiKey": {
            "title": "Own DIP API key (optional)",
            "type": "string",
            "description": "Not needed – the public key is built in. Only set if the public key expired or you have a personal key from parlamentsdokumentation@bundestag.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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}