{
  "openapi": "3.0.1",
  "info": {
    "title": "German Grid Congestion Monitor (Redispatch)",
    "description": "Track Germany's official redispatch measures: day-level Netzengpass data with MW/MWh, reason, direction and transmission operator, plus a congestion status per operator and month that excludes commissioning tests. Official BNetzA source, from $0.001/measure (PPE).",
    "version": "0.1",
    "x-build-id": "7mrihjwUtbjwyzePc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/codeclouds~de-netzengpass-redispatch-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-codeclouds-de-netzengpass-redispatch-monitor",
        "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/codeclouds~de-netzengpass-redispatch-monitor/runs": {
      "post": {
        "operationId": "runs-sync-codeclouds-de-netzengpass-redispatch-monitor",
        "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/codeclouds~de-netzengpass-redispatch-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-codeclouds-de-netzengpass-redispatch-monitor",
        "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": {
          "anweisenderUENB": {
            "title": "Ordering transmission operator (ÜNB)",
            "type": "array",
            "description": "Only measures ordered by these Übertragungsnetzbetreiber (transmission system operators): \"50Hertz\", \"Amprion\", \"TenneT DE\", \"TransnetBW\". Case is ignored. Empty = all four.",
            "items": {
              "type": "string"
            }
          },
          "grundDerMassnahme": {
            "title": "Reason for the measure",
            "type": "array",
            "description": "Only measures with this official reason. Valid values: \"Strombedingter Redispatch\" (congestion-related redispatch), \"Strombedingter Redispatch kurativ\", \"Strom- und Spannungsbedingter RD\", \"Spannungsbedingter Redispatch\", \"Probefahrt\" (commissioning test), \"Strombedingter Countertrade DE-DK1\", \"Strombedingter Countertrade DE-DK2\". Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "richtung": {
            "title": "Direction",
            "type": "array",
            "description": "\"Wirkleistungseinspeisung reduzieren\" = output cut (the congestion trigger) or \"Wirkleistungseinspeisung erhöhen\" = the offsetting measure. Empty = both.",
            "items": {
              "type": "string"
            }
          },
          "primaerenergieart": {
            "title": "Primary energy carrier",
            "type": "array",
            "description": "Only measures on plants of these energy carriers: \"Konventionell\", \"Erneuerbar\", \"Sonstiges\". Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "betroffeneAnlage": {
            "title": "Affected plant contains",
            "type": "string",
            "description": "Free-text filter on the official plant name, e.g. \"Mehrum\", \"Börse\" or \"Dörpen\". Case is ignored, and German umlauts are folded to their ASCII convention: \"Doerpen\" finds \"Dörpen-West\", and \"dörpen\" does too. (\"Dorpen\" does not — plain \"o\" and \"oe\" are kept distinct.)"
          },
          "nurEngpassursachen": {
            "title": "Only genuine congestion causes",
            "type": "boolean",
            "description": "If true, drop rows whose reason is not a grid-congestion measure. In practice this removes \"Probefahrt\" (commissioning tests of reserve plants), which the source publishes in the same table and which made up about 5.9% of 2026 energy. The monthly congestion status and the summary already exclude these rows regardless of this setting; this field only filters the delivered individual measures.",
            "default": false
          },
          "minLeistungMW": {
            "title": "Min capacity (MW)",
            "type": "number",
            "description": "Only measures whose maximum capacity is at least this many MW."
          },
          "minArbeitMWh": {
            "title": "Min energy (MWh)",
            "type": "number",
            "description": "Only measures whose total energy is at least this many MWh. Useful to strip routine small measures when you only want the significant congestion events."
          },
          "maxMassnahmen": {
            "title": "Max delivered measures",
            "minimum": 1,
            "type": "number",
            "description": "Cap on how many individual measure records are delivered per run (whole number, at least 1). Default 500; set a very high value for the complete set. Without a cap, the first run of a year set would deliver roughly 17,000 records and a later full-snapshot run would bill for all of them. With a cap the most significant measures come first (highest total energy, then highest peak capacity, then most recent). Records that fall outside the cap are NOT added to the change-detection baseline, so a following run detects them again and delivers the next batch: nothing is silently lost, you just receive the set in batches. The free summary always covers the full filtered set and reports abgeschnitten together with anzahlVorAbschneidung and anzahlGeliefert. The cap also applies to a first run, but a first run never charges.",
            "default": 500
          },
          "zeitraum": {
            "title": "Period",
            "enum": [
              "aktuelles_jahr",
              "letzte_30_tage",
              "letzte_7_tage"
            ],
            "type": "string",
            "description": "Which measures to deliver. \"aktuelles_jahr\" (default) = the year-to-date set published by the source. \"letzte_30_tage\" and \"letzte_7_tage\" = only measures that overlap the last 30 or 7 days before the run. The filtering is done in the Actor, because the source ignores the date fields of its own download form.",
            "default": "aktuelles_jahr"
          },
          "liefermonatsprofil": {
            "title": "Deliver monthly profiles",
            "type": "boolean",
            "description": "If true (default), the Actor also delivers one aggregated profile per transmission operator and calendar month. Each profile carries the total energy, the congestion-relevant energy (excluding commissioning tests), the MWh per covered calendar day, the measure and plant counts, the direction split, the main reason and two derived congestion statuses: an absolute one on the month total and a daily-rate one that stays comparable for a partial current month.",
            "default": true
          },
          "nurNeueOderGeaenderte": {
            "title": "Only new or changed measures",
            "type": "boolean",
            "description": "If true (default), only measures that are new or changed since the previous run are delivered and charged. If false, every run delivers the full filtered set (subject to maxMassnahmen), but only new/changed measures are still charged as a congestion alert. Uses a persistent baseline in a named key-value store that all runs of this Actor share — including the pre-publication validation run — so the baseline is actor-wide, not per user. Only a baseline that does not exist yet makes the entire filtered set count as new; the default true setting therefore delivers nothing when the baseline already covers the filtered set.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}