Solar

Solar PV Energy Forecast

Changed on

Returns an hourly and daily power and energy forecast for a solar PV system (up to 14 days; hourly to day 5, 3-hourly after). Available on Business plan and above; keys on other plans get 403 / error 2009. Invalid parameters return 400 with error 1010 (capacity_kw) or 1011 (other solar parameters).

get/solar.json

Request

  • Base URL
    https://api.weatherapi.com/v1
  • Auth
    API key in query parameter key

Query parameters

keystring required
Example:YOUR_API_KEY

Your WeatherAPI.com API key.

qstring required
Example:London

Location query. Accepts: city name, lat/lon, US zip, UK postcode, Canada postal code, METAR code (metar:EGLL), IATA (iata:DXB), auto:ip, IPv4/IPv6, or location ID (id:2801268).

daysinteger

Number of forecast days (1–14). Default 1.

capacity_kwnumber required
Example:4

Array (DC) size in kWp. Must be greater than 0.

tiltnumber

Panel tilt in degrees from horizontal. Default: absolute latitude.

azimuthnumber

Panel azimuth in degrees clockwise from north (180 = south). Default 180 in the northern hemisphere, 0 in the southern.

tracking'fixed' | 'single_axis' | 'dual_axis'

Mounting type. Default fixed.

module_type'standard' | 'premium' | 'thin_film'

Module type (sets temperature coefficient). Default standard.

lossesnumber

System losses in %. Default 14.

inverter_kwnumber

Inverter AC rating in kW. Default capacity_kw / 1.2.

inverter_effnumber

Inverter efficiency in %. Default 96.

albedonumber

Ground reflectance. Default 0.2.

Response

Solar PV energy forecast

Changes