get_solar_production
Production of photovoltaic systems, past and forecast, for up to 20 sites.
Each site is lat + lon plus the installation: module_kw (installed kWp;
use 1 to get specific yield per kWp), inverter_kw (defaults to module_kw),
tilt (degrees from horizontal, default 30) and orientation (azimuth the
modules face, clockwise from north: 180 = south, the default). Dates are
YYYY-MM-DD, inclusive, from up to 20 years back to 4 days ahead, so one
call can cover last week's actual weather and the coming days. The
renewables plan includes the last 3 years; older days need the paid
historical add-on, otherwise the API refuses them ("historical data this
old"), reported per site.
Granularity: 'hourly' (power at each full hour, max 14 days per call),
'daily' or 'monthly' (energy, max 366 days per call — call repeatedly for
multi-year yield; past days are cached so repeats are cheap).
Columns: production_kw = output of the system at that hour (an
instantaneous value); production_kwh = energy of the day or month, summed
from those hourly values; production_max_kw = its peak.
`variables` adds the weather behind the production: irradiance (ghi, dni,
dhi in W/m2 hourly; ghi/dni/dhi_sum_wh_m2 daily and monthly), temperature,
cloud_cover, humidity, dew_point, pressure, snowfall (flag per hour;
snowfall_hours daily and monthly).
Each site+day costs one API request on first fetch; a single call is
capped at 400 site-days — split longer ranges into multiple calls.
Needs a key on the renewables tier.
Output: `columns` once at the top level; each site has `rows` as arrays
in column order.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sites | Yes | ||
| units | No | metric | |
| date_to | Yes | ||
| timezone | No | auto | |
| date_from | Yes | ||
| variables | No | ||
| granularity | No | daily |