# Schnellstart

import {Stepper} from "zudoku/ui/Stepper";
import {
    Card,
    CardHeader,
    CardTitle,
    CardDescription,
    CardContent,
} from "zudoku/ui/Card";

Erhalten Sie Ihre erste PV-Prognose in wenigen Minuten.

## Voraussetzungen

<div className="not-prose grid sm:grid-cols-2 gap-3 mb-8">
    <a href="https://pvnode.com/auth/register"
       className="flex items-center gap-3 rounded-lg border border-border bg-card px-4 py-3 hover:border-primary/50 transition-all">
    <span
        className="inline-flex items-center justify-center w-8 h-8 rounded-lg bg-primary/10 border border-primary/20 text-primary">
      <svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" strokeWidth="2" stroke="currentColor"><path
          strokeLinecap="round" strokeLinejoin="round"
          d="M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0"/></svg>
    </span>
        <div>
            <div className="text-sm font-semibold">pvnode Account</div>
            <div className="text-xs text-muted-foreground">Kostenlos registrieren auf pvnode.com</div>
        </div>
    </a>
    <a href="https://pvnode.com/settings/api-keys"
       className="flex items-center gap-3 rounded-lg border border-border bg-card px-4 py-3 hover:border-primary/50 transition-all">
    <span
        className="inline-flex items-center justify-center w-8 h-8 rounded-lg bg-primary/10 border border-primary/20 text-primary">
      <svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" strokeWidth="2" stroke="currentColor"><path
          strokeLinecap="round" strokeLinejoin="round"
          d="M15.75 5.25a3 3 0 013 3m3 0a6 6 0 01-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1121.75 8.25z"/></svg>
    </span>
        <div>
            <div className="text-sm font-semibold">API Key</div>
            <div className="text-xs text-muted-foreground">Erstellen Sie einen in Ihrem Dashboard</div>
        </div>
    </a>
</div>

## Ihren Forecast erhalten

<Stepper>

    1. **Holen Sie sich Ihren API-Key**

        Registrieren Sie sich auf [pvnode.com](https://pvnode.com/auth/register) und erstellen Sie einen API-Key in Ihrem
        [Dashboard](https://pvnode.com/settings/api-keys).

    2. **Stellen Sie Ihre erste Prognose-Anfrage**

        Installieren Sie die `requests` Bibliothek, falls noch nicht vorhanden:

        ```bash
        pip install requests
        ```

        Dann, nutzen Sie dieses Python Script:

        ```python title="forecast.py"
        import requests

        response = requests.get(
            "https://api.pvnode.com/v1/forecast",
            headers={"Authorization": f"Bearer YOUR_API_KEY"},
            params={
                "latitude": 51.0,
                "longitude": 10.0,
                "slope": 30.0,
                "orientation": 180.0,
                "pv_power_kw": 10
            }
        )

        data = response.json()
        print(f"Status: {response.status_code}")
        print(f"First entry: {data['values'][0]}")
        ```

        **Beispiel Antwort:**

        ```json title="Response (200 OK)"
        {
            "data": "forecast",
            "latitude": 51.0,
            "longitude": 10.0,
            "elevation": 378.0,
            "slope": 30.0,
            "orientation": 180.0,
            "data_timezone": "utc",
            "values": [
                {
                    "dtm": "2026-03-01 00:00:00",
                    "GHI": 0.0,
                    "DHI": 0.0,
                    "BNI": 0.0,
                    "spec_watts": 0.0,
                    "temp": 5.5,
                    "weather_code": 3
                },
                {
                    "dtm": "2026-03-01 00:15:00",
                    "GHI": 0.0,
                    "DHI": 0.0,
                    "BNI": 0.0,
                    "spec_watts": 0.0,
                    "temp": 5.3,
                    "weather_code": 3
                },
                {...}
            ]
        }
        ```

        :::tip
        Die Antwort enthält standardmäßig 15-Minuten-Intervalle mit Leistungsabgabe (spec_watts in W/kWp), Einstrahlung (GHI, DHI, BNI), Temperatur und Wettercodes. Sie können anpassen, welche Felder zurückgegeben werden, und Dutzende weiterer Parameter konfigurieren – siehe die [API Referenz](/api) für die vollständige Liste.
        :::

</Stepper>