{
  "openapi": "3.0.1",
  "info": {
    "title": "Marktstammdatenregister (MaStR) Export – Solar, Wind, Battery",
    "description": "Export new solar (PV), wind and battery storage units from the German Marktstammdatenregister (MaStR): kW, dates, postcode, grid operator and company operator. Solar and battery leads by Bundesland and size. Private persons anonymised. $1.50 per 1,000.",
    "version": "0.1",
    "x-build-id": "WY81ex9HeVjUsUWxf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nordlicht~mastr-energy-assets/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nordlicht-mastr-energy-assets",
        "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/nordlicht~mastr-energy-assets/runs": {
      "post": {
        "operationId": "runs-sync-nordlicht-mastr-energy-assets",
        "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/nordlicht~mastr-energy-assets/run-sync": {
      "post": {
        "operationId": "run-sync-nordlicht-mastr-energy-assets",
        "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": {
          "technologies": {
            "title": "Technologies",
            "type": "array",
            "description": "Electricity technologies to load. Default is solar, wind and battery.",
            "items": {
              "type": "string",
              "enum": [
                "solar",
                "wind",
                "battery"
              ],
              "enumTitles": [
                "Solar",
                "Wind",
                "Battery storage"
              ]
            },
            "default": [
              "solar",
              "wind",
              "battery"
            ]
          },
          "bundeslaender": {
            "title": "Bundesländer",
            "type": "array",
            "description": "German state names. Leave empty for every state, including the exclusive economic zone (offshore).",
            "items": {
              "type": "string",
              "enum": [
                "Baden-Württemberg",
                "Bayern",
                "Berlin",
                "Brandenburg",
                "Bremen",
                "Hamburg",
                "Hessen",
                "Mecklenburg-Vorpommern",
                "Niedersachsen",
                "Nordrhein-Westfalen",
                "Rheinland-Pfalz",
                "Saarland",
                "Sachsen",
                "Sachsen-Anhalt",
                "Schleswig-Holstein",
                "Thüringen",
                "Ausschließliche Wirtschaftszone"
              ]
            }
          },
          "postcodePrefixes": {
            "title": "Postcode prefixes",
            "type": "array",
            "description": "Keep units whose postcode starts with one of these digits, for example 80 or 80331.",
            "items": {
              "type": "string"
            }
          },
          "minPowerKw": {
            "title": "Minimum gross power (kW)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep units whose gross capacity (Bruttoleistung) is at least this many kilowatts."
          },
          "maxPowerKw": {
            "title": "Maximum gross power (kW)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep units whose gross capacity is at most this many kilowatts."
          },
          "registeredSinceDays": {
            "title": "Registered in the last N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Registration window ending today (Europe/Berlin). 7 means the registration date is after the day that is 7 days ago. Ignored when Registered from is set. Maximum 365.",
            "default": 7
          },
          "registeredFrom": {
            "title": "Registered from",
            "type": "string",
            "description": "First registration day (YYYY-MM-DD). Replaces the day window."
          },
          "commissionedFrom": {
            "title": "Commissioned from",
            "type": "string",
            "description": "Optional. Keep units commissioned on or after this day (YYYY-MM-DD). Units without a commissioning date are dropped."
          },
          "status": {
            "title": "Operating status",
            "type": "array",
            "description": "Default is in operation and planned.",
            "items": {
              "type": "string",
              "enum": [
                "inOperation",
                "planned",
                "temporarilyDecommissioned",
                "decommissioned"
              ],
              "enumTitles": [
                "In operation",
                "Planned",
                "Temporarily decommissioned",
                "Decommissioned"
              ]
            },
            "default": [
              "inOperation",
              "planned"
            ]
          },
          "operatorType": {
            "title": "Operator type",
            "enum": [
              "organisations",
              "all"
            ],
            "type": "string",
            "description": "organisations skips natural persons (PersonenArt 518, anonymised units, and names MaStR already replaced with natürliche Person). all keeps those units with the identity fields emptied.",
            "default": "organisations"
          },
          "operatorNameContains": {
            "title": "Operator name contains",
            "type": "string",
            "description": "Case-insensitive substring of the operator name. MaStR applies this to organisation names only."
          },
          "windLocation": {
            "title": "Wind location",
            "enum": [
              "any",
              "onshore",
              "offshore"
            ],
            "type": "string",
            "description": "Applied to wind units. Ignored for solar and battery.",
            "default": "any"
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after this many output units. Default 1000. You pay per unit that is pushed.",
            "default": 1000
          },
          "onlyNew": {
            "title": "Only new units",
            "type": "boolean",
            "description": "Remember each MaStR number in the key-value store mastr-energy-assets-state. The key is the MaStR number only, so a later update of the same unit is not pushed again and is not charged. Skipped units are not dataset items.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}