{
  "openapi": "3.0.1",
  "info": {
    "title": "German Court Decisions API (BGH, BVerfG) for RAG",
    "description": "Official decisions of Germany's federal courts (BGH, BVerfG, BVerwG, BFH, BAG, BSG, BPatG) as clean JSON or RAG chunks: ECLI, cited norms, headnote, facts and reasons with marginal numbers, lower courts. Filter by court, date, type or keyword, or monitor new case law daily.",
    "version": "1.0",
    "x-build-id": "khf64gPZBvbj7hLQ2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/layerwiselabs~german-court-decisions/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-layerwiselabs-german-court-decisions",
        "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/layerwiselabs~german-court-decisions/runs": {
      "post": {
        "operationId": "runs-sync-layerwiselabs-german-court-decisions",
        "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/layerwiselabs~german-court-decisions/run-sync": {
      "post": {
        "operationId": "run-sync-layerwiselabs-german-court-decisions",
        "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": {
          "courts": {
            "title": "Courts",
            "type": "array",
            "description": "Federal courts to include. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "BVerfG",
                "BGH",
                "BVerwG",
                "BFH",
                "BAG",
                "BSG",
                "BPatG",
                "GmS-OGB"
              ],
              "enumTitles": [
                "Bundesverfassungsgericht (BVerfG)",
                "Bundesgerichtshof (BGH)",
                "Bundesverwaltungsgericht (BVerwG)",
                "Bundesfinanzhof (BFH)",
                "Bundesarbeitsgericht (BAG)",
                "Bundessozialgericht (BSG)",
                "Bundespatentgericht (BPatG)",
                "Gemeinsamer Senat (GmS-OGB)"
              ]
            },
            "default": []
          },
          "dateFrom": {
            "title": "Decided on or after",
            "type": "string",
            "description": "Decision date, YYYY-MM-DD."
          },
          "dateTo": {
            "title": "Decided on or before",
            "type": "string",
            "description": "Decision date, YYYY-MM-DD."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Only return decisions whose full text or cited norms contain these words or phrases, e.g. \"§ 573 BGB\" or \"Eigenbedarf\". Case, extra spaces and umlauts are ignored (\"Kuendigung\" finds \"Kündigung\"). Decisions filtered out are free.",
            "items": {
              "type": "string"
            }
          },
          "keywordMode": {
            "title": "Keyword match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Whether a decision needs at least one or all of the keywords.",
            "default": "any"
          },
          "fileNumbers": {
            "title": "File numbers (Aktenzeichen)",
            "type": "array",
            "description": "Fetch specific decisions, e.g. \"IX ZB 72/08\".",
            "items": {
              "type": "string"
            }
          },
          "decisionTypes": {
            "title": "Decision types",
            "type": "array",
            "description": "Only these kinds of decisions, e.g. \"Urteil\" or \"Beschluss\" (also matches \"Teilurteil\" etc.). Leave empty for all. Decisions filtered out are free.",
            "items": {
              "type": "string"
            }
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "decisions",
              "chunks"
            ],
            "type": "string",
            "description": "One item per decision, or one item per text chunk ready for embedding in a vector database.",
            "default": "decisions"
          },
          "includeFullText": {
            "title": "Include full text (decisions format)",
            "type": "boolean",
            "description": "Add facts (Tatbestand), reasons (Gründe) and the complete decision, as Markdown with marginal numbers.",
            "default": true
          },
          "chunkSize": {
            "title": "Chunk size (characters)",
            "minimum": 300,
            "maximum": 10000,
            "type": "integer",
            "description": "Target maximum length of a chunk. Chunks never cross a section and break between paragraphs.",
            "default": 2000
          },
          "chunkOverlap": {
            "title": "Chunk overlap (paragraphs)",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Paragraphs repeated at the start of the next chunk.",
            "default": 1
          },
          "maxDecisions": {
            "title": "Maximum decisions",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many decisions. Newest decisions come first (in monitoring mode, the oldest change first, so nothing is skipped).",
            "default": 100
          },
          "onlyNew": {
            "title": "Only new or updated since the last run",
            "type": "boolean",
            "description": "For scheduled monitoring: remembers where the last run stopped (separately for every saved task, or for every combination of filters) and only returns decisions the portal added or changed since then. Tip: on the first run set \"Updated since\" to yesterday, otherwise it starts with the oldest changes.",
            "default": false
          },
          "updatedSince": {
            "title": "Updated since",
            "type": "string",
            "description": "Only decisions the portal added or changed after this day (YYYY-MM-DD). Changes made on that day itself are not included."
          },
          "maxConcurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Kept low to be gentle on the public portal; more parallel downloads make it stall.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Usually not needed: on Apify the Actor switches to Apify Proxy by itself if the portal refuses the direct connection. Set a proxy here to always use it.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}