# Forecast API

The Forecast API endpoint provides near-term, high-resolution 15-minute time-series data spanning +7 days and -30 days
from the current day for photovoltaic (PV) systems based on their site's location and installation characteristics.
This endpoint supports `GET` requests that require `latitude`, `longitude`, as well as the `slope` and `orientation`
of the PV system.


:::note
For users on the free plan, forecast data is limited to +1 day (includes today and tomorrow) and no days in the past
:::

:::note
**Request limits** depend on the plan:
- **Free:** 40 requests per month
- **Paid plans:** 1,000 requests per month
- **Nowcast plan:** 3,000 requests per month

Fair use applies. Limits are subject to change. Custom limits may apply depending on subscription and user.

Regardless of plan, a **rate limit of 10 requests per second** applies. Exceeding this returns `429`.
:::

## Nowcast

:::tip
Satellite nowcast data (~1.5 × 1.5 km) enhances the forecast with high-resolution data and is **enabled by default** for users on a **Nowcast plan**. It can be disabled by passing <code>nowcast=False</code> as a URL parameter.

**Updates:** Every **10 minutes** across Europe. Every **15 minutes** in selected regions outside Europe.
:::

## Base URL

The Base URL for this endpoint is:

```
https://api.pvnode.com/v1/forecast/
```

## Example Request

The following examples demonstrate how to pass the required parameters and include the [API key](/docs/en/authentication)
for authentication. The example uses a `slope` of 30 degrees, an `orientation` of 180 degrees (south-facing), and
the location is set to Rosenheim, Germany with coordinates `latitude`: 47.84812, `longitude`: 12.06231.

<CodeTabs>

    ```python
    import requests

    url = 'https://api.pvnode.com/v1/forecast/'
    body = {
    "latitude": 47.84812,
    "longitude": 12.06231,
    "slope": 30,
    "orientation": 180
}
    headers = {
    'Authorization': 'Bearer ' + YOUR_API_KEY
}
    response = requests.get(url, headers=headers, params=body)
    data = response.json()
    ```

    ```javascript
    const axios = require('axios');

    const url = 'https://api.pvnode.com/v1/forecast/';
    const params = {
    latitude: 47.84812,
    longitude: 12.06231,
    slope: 30,
    orientation: 180
};
    const headers = {
    Authorization: 'Bearer YOUR_API_KEY'
};

    axios.get(url, {headers, params})
    .then(response => {
    console.log(response.data);
})
    .catch(error => {
    console.error('Error during API call:', error);
});


    ```

</CodeTabs>

This covers the base configuration. The API supports many additional parameters for shading, tracker systems, module characteristics, and more — see the [API Reference](/api/v1-endpoints#forecast) for the full list.

## Advanced Configuration

<div className="not-prose mt-4">
    <div className="grid sm:grid-cols-2 gap-3">
        <a href="/docs/en/guides/shading-horizon"
           className="group block rounded-xl border border-border bg-card p-5 hover:border-primary/50 hover:shadow-lg hover:shadow-primary/5 transition-all">
            <h3 className="font-semibold text-sm mb-1 group-hover:text-primary transition-colors">Shading &amp; Horizon</h3>
            <p className="text-xs text-muted-foreground leading-relaxed">Configure horizon profiles, row shading, and
                other shading scenarios.</p>
        </a>
        <a href="/docs/en/guides/tracker-configuration"
           className="group block rounded-xl border border-border bg-card p-5 hover:border-primary/50 hover:shadow-lg hover:shadow-primary/5 transition-all">
            <h3 className="font-semibold text-sm mb-1 group-hover:text-primary transition-colors">Tracker
                Configuration</h3>
            <p className="text-xs text-muted-foreground leading-relaxed">Set up single-axis and dual-axis tracker
                systems with custom parameters.</p>
        </a>
        <a href="/docs/en/guides/demand-profiles"
           className="group block rounded-xl border border-border bg-card p-5 hover:border-primary/50 hover:shadow-lg hover:shadow-primary/5 transition-all">
            <h3 className="font-semibold text-sm mb-1 group-hover:text-primary transition-colors">Demand Profiles</h3>
            <p className="text-xs text-muted-foreground leading-relaxed">Include load profiles to model self-consumption
                and grid feed-in.</p>
        </a>
        <a href="/docs/en/guides/weather-codes"
           className="group block rounded-xl border border-border bg-card p-5 hover:border-primary/50 hover:shadow-lg hover:shadow-primary/5 transition-all">
            <h3 className="font-semibold text-sm mb-1 group-hover:text-primary transition-colors">Weather Codes</h3>
            <p className="text-xs text-muted-foreground leading-relaxed">Reference for weather condition codes returned
                in the forecast response.</p>
        </a>
        <a href="/docs/en/guides/data-columns"
           className="group block rounded-xl border border-border bg-card p-5 hover:border-primary/50 hover:shadow-lg hover:shadow-primary/5 transition-all">
            <h3 className="font-semibold text-sm mb-1 group-hover:text-primary transition-colors">Data Columns</h3>
            <p className="text-xs text-muted-foreground leading-relaxed">Full reference of all fields returned in the
                forecast response.</p>
        </a>
    </div>
</div>