{
  "openapi": "3.0.1",
  "info": {
    "title": "Marktstammdatenregister (MaStR) Scraper — German Energy Units",
    "description": "Extract solar, wind, biomass, hydro & storage units from Germany's official MaStR energy registry. Filter by energy source, state, postal code, operator & status. Get operator names, capacity (kW), commissioning date & location for B2B leads and market research.",
    "version": "0.1",
    "x-build-id": "WNwf9sulhPIyr3n7v"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/haketa~marktstammdatenregister-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-haketa-marktstammdatenregister-scraper",
        "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/haketa~marktstammdatenregister-scraper/runs": {
      "post": {
        "operationId": "runs-sync-haketa-marktstammdatenregister-scraper",
        "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/haketa~marktstammdatenregister-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-haketa-marktstammdatenregister-scraper",
        "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": {
          "unitCategory": {
            "title": "Unit category",
            "enum": [
              "electricity-generation",
              "electricity-consumption",
              "gas-generation",
              "gas-consumption"
            ],
            "type": "string",
            "description": "Which part of the registry to scrape. Electricity generation covers solar, wind, biomass, hydro, storage and conventional power plants.",
            "default": "electricity-generation"
          },
          "energyTypes": {
            "title": "Energy sources",
            "type": "array",
            "description": "Filter by energy source (electricity-generation only). Leave empty for all sources. Each selected source is fetched separately and merged.",
            "items": {
              "type": "string",
              "enum": [
                "solar",
                "wind",
                "biomass",
                "hydro",
                "storage",
                "nuclear",
                "hydrogen",
                "geothermal",
                "solarthermal",
                "naturalgas",
                "lignite",
                "hardcoal",
                "minegas",
                "sewagegas",
                "mineraloil",
                "heat",
                "othergases",
                "nonbiogenicwaste"
              ],
              "enumTitles": [
                "Solar",
                "Wind",
                "Biomass",
                "Hydro (Wasser)",
                "Storage (Speicher)",
                "Nuclear (Kernenergie)",
                "Hydrogen (Wasserstoff)",
                "Geothermal",
                "Solar thermal",
                "Natural gas (Erdgas)",
                "Lignite (Braunkohle)",
                "Hard coal (Steinkohle)",
                "Mine gas (Grubengas)",
                "Sewage gas (Klärgas)",
                "Mineral oil products",
                "Heat (Wärme)",
                "Other gases",
                "Non-biogenic waste"
              ]
            }
          },
          "states": {
            "title": "Federal states (Bundesland)",
            "type": "array",
            "description": "Filter by German federal state. Leave empty for all of Germany. Each state is fetched separately and merged.",
            "items": {
              "type": "string",
              "enum": [
                "baden-wuerttemberg",
                "bayern",
                "berlin",
                "brandenburg",
                "bremen",
                "hamburg",
                "hessen",
                "mecklenburg-vorpommern",
                "niedersachsen",
                "nordrhein-westfalen",
                "rheinland-pfalz",
                "saarland",
                "sachsen",
                "sachsen-anhalt",
                "schleswig-holstein",
                "thueringen"
              ],
              "enumTitles": [
                "Baden-Württemberg",
                "Bayern (Bavaria)",
                "Berlin",
                "Brandenburg",
                "Bremen",
                "Hamburg",
                "Hessen (Hesse)",
                "Mecklenburg-Vorpommern",
                "Niedersachsen (Lower Saxony)",
                "Nordrhein-Westfalen (NRW)",
                "Rheinland-Pfalz",
                "Saarland",
                "Sachsen (Saxony)",
                "Sachsen-Anhalt",
                "Schleswig-Holstein",
                "Thüringen (Thuringia)"
              ]
            }
          },
          "operationalStatus": {
            "title": "Operational status",
            "type": "array",
            "description": "Filter by status. Defaults to units that are currently in operation. Each status is fetched separately and merged.",
            "items": {
              "type": "string",
              "enum": [
                "in-operation",
                "in-planning",
                "temporarily-shut-down",
                "permanently-shut-down"
              ],
              "enumTitles": [
                "In operation (In Betrieb)",
                "In planning (In Planung)",
                "Temporarily shut down",
                "Permanently shut down"
              ]
            },
            "default": [
              "in-operation"
            ]
          },
          "cityPreset": {
            "title": "City",
            "enum": [
              "",
              "Berlin",
              "Hamburg",
              "München",
              "Köln",
              "Frankfurt am Main",
              "Stuttgart",
              "Düsseldorf",
              "Leipzig",
              "Dortmund",
              "Essen",
              "Bremen",
              "Dresden",
              "Hannover",
              "Nürnberg",
              "Duisburg",
              "Bochum",
              "Wuppertal",
              "Bielefeld",
              "Bonn",
              "Münster",
              "Mannheim",
              "Karlsruhe",
              "Augsburg",
              "Wiesbaden"
            ],
            "type": "string",
            "description": "Pick a German city / municipality to focus on. Leave empty to search all of Germany.",
            "default": ""
          },
          "city": {
            "title": "City — custom (advanced)",
            "type": "string",
            "description": "Optional: type an exact city / municipality name not in the dropdown above, e.g. \"Freiburg im Breisgau\". Overrides the dropdown when set. Leave empty to use the dropdown."
          },
          "postalCode": {
            "title": "Postal code (PLZ)",
            "type": "string",
            "description": "Filter by exact German postal code, e.g. \"10115\"."
          },
          "operatorName": {
            "title": "Operator name contains",
            "type": "string",
            "description": "Filter by operator name (organisations only), e.g. \"GmbH\", \"Solarpark\", \"Energie\". Great for finding commercial operators for B2B leads."
          },
          "onlyCommercial": {
            "title": "Only commercial operators",
            "type": "boolean",
            "description": "Keep only units with a named (non-anonymised) operator — i.e. companies and organisations. Private individuals are anonymised by the registry.",
            "default": false
          },
          "minCapacityKw": {
            "title": "Min gross capacity (kW)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only units with gross power (Bruttoleistung) at or above this value in kW."
          },
          "maxCapacityKw": {
            "title": "Max gross capacity (kW)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only units with gross power (Bruttoleistung) at or below this value in kW."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "newest",
              "oldest",
              "capacity-desc",
              "commissioning-desc"
            ],
            "type": "string",
            "description": "Order in which units are fetched from the registry.",
            "default": "newest"
          },
          "maxItems": {
            "title": "Max units",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of units to return across all filters. Set 0 for no limit. Tip: a run with no filters returns a fast mixed sample of the newest ~150 units — add filters and raise this to go deeper.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy settings. A proxy is optional but recommended for large runs to keep them fast and reliable.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}