Solar Panel Energy Prediction

Product concept

OpenWeather are thrilled to announce the launch of our new Solar Panel Energy Prediction service. This API allows users to accurately estimate solar power generation and determine the energy output of each PV panel.

Main features of Solar Panel Energy Prediction:

  • API response contains daily solar panel power output data for each solar panel with 1 hour and 15 minutes detalization
  • Each API response contains also essential solar irradiation data (DNI, GHI and DHI)
  • Current and 15 days ahead forecast data for solar panel power output
  • Historical solar panel power output data is available for 45+ years back (from 1st January 1979)
  • Create an unlimited number of solar panels for a particular location. Users could define solar panel by specifying its type, tilt and azimuth angles
  • Making API call to particular location get solar panel power output data for all solar panels associated with this location
  • Global coverage

Data is available in JSON format.

How to use the service

  1. Sign up to OpenWeather service in case you haven't got your OpenWeather API key yet. Do not forget to add your key to the each API call in paragraphs 2, 3 and 4.

  2. Create a unique location via API call according "Step 1: Manage my location".

    Create a location where your solar panels are located in accordance with chapter "How to create a unique location" and receive location ID number. Please pay attention that chapters "How to get a location", "How to get a list of created locations" , "How to delete a location" described how to manage created locations.

  3. Create a solar panels for your location according "Step 2: Operations with solar panels".

    Create a solar panel for location created at the previous step according to the documentation "How to create a solar panel". Please note that you could create unlimited number of panels for one location.

  4. Make an API call to get location solar panels power output and location solar irradiation data according step 3.

Step 1: Manage my location

How to create a unique location

This HTTP method is used to create a new location and receive location ID for it. You need to pass a geographical coordinates of location in parameters. In case of successful creation method returns an HTTP code 201.

Method: POST

Header: Content-Type: application/json

URL

https://api.openweathermap.org/energy/1.0/locations?appid={API key}
Parameters
appid required Your unique API key (you can always find it on your account page under the "API key" tab)
Example of the request body
                     
  {
    "type": "point",
    "coordinates": [
      {
        "lat": 51.507222,
        "lon": -0.1275
      }
    ]
  }
                     
                  
Parameters
type required Type of the location. Allowed type - point
lat required Latitude, decimal (-90; 90)
lon required Longitude, decimal (-180; 180)

Example of API response

Example of API response
                  
  {
   "location_id": "F01E165B-22F3-4591-89D4-F238E92F6885",
   "type": "point",
   "coordinates": [
     {
      "lat": 51.507222,
      "lon": -0.1275
     }
   ]
  }
             
                

Fields in API response

  • location_id Unique identifer of the location assigned at resource creation
  • type Type of the location
  • lat Latitude of the location, decimal (−90; 90)
  • lon Longitude of the location, decimal (-180; 180)

Please note:

  • When creating unique locations, coordinates are rounded to 6 decimal places
  • To check geographical coordinates of previously created location, please see section "How to get location"

How to get a location data

You could get geographical coordinates for previously created location by its id number following instruction below. In case of success method returns an HTTP code 200.

Method: GET

URL

https://api.openweathermap.org/energy/1.0/location/{location_id}?appid={API key}
Parameters
location_id required Unique identifer of the location assigned at resource creation. You could find all created locations id using instruction here
appid required Your unique API key (you can always find it on your account page under the "API key" tab)

URL example

https://api.openweathermap.org/energy/1.0/location/F01E165B-22F3-4591-89D4-F238E92F6885?appid={API key}

Example of API response

Example of API response
                  
  {
    "location_id": "F01E165B-22F3-4591-89D4-F238E92F6885",
    "type": "point",
    "coordinates": [
       {
        "lat": 51.507222,
        "lon": -0.1275
       }
     ]
  }
             
                

Fields in API response

  • location_id Unique identifer of the location assigned at resource creation
  • type Type of the location
  • lat Latitude of the location, decimal (−90; 90)
  • lon Longitude of the location, decimal (-180; 180)

How to get a list of created locations

You could get a list of all created locations using your OpenWeather API key and instruction below. In case of success method returns an HTTP code 200.

Method: GET

URL

https://api.openweathermap.org/energy/1.0/locations?appid={API key}
Parameters
appid required Your unique API key (you can always find it on your account page under the "API key" tab)

Example of API response

Example of API response
  [                
     {
      "location_id": "F01E165B-22F3-4591-89D4-F238E92F6885",
      "type": "point",
      "coordinates": [
         {
          "lat": 51.5072,
          "lon": -0.1275
         }
       ]
    }
  ]           
                

Fields in API response

  • location_id Unique identifer of the location assigned at resource creation
  • type Type of the location
  • lat Latitude of the location, decimal (−90; 90)
  • lon Longitude of the location, decimal (-180; 180)

How to delete a location

You could delete created location by its id number using folowing URL. Please pay attention, that all solar panels assosiated with this location will deleted as well. In case of successful removing method returns an HTTP code 204.

Method: DELETE

URL

https://api.openweathermap.org/energy/1.0/location/{location_id}?appid={API key}
Parameters
location_id required Unique identifer of the location assigned at resource creation
appid required Your unique API key (you can always find it on your account page under the "API key" tab)

URL example

https://api.openweathermap.org/energy/1.0/location/F01E165B-22F3-4591-89D4-F238E92F6885?appid={API key}

API response

Please pay attention if the delete request is successfully processed, then no response will be returned.

Step 2: Operations with solar panels

How to create a solar panel

This HTTP method is used to create a new solar panel associated with location and receive solar panel ID for this panel. You need to pass a set of solar panel parameters: tilt, azimuth and peak power. In case of successful creation method returns an HTTP code 201.

Method: POST

Header: Content-Type: application/json

URL

https://api.openweathermap.org/energy/1.0/location/{location_id}/panels?appid={API key}
Parameters
location_id required Unique identifer of the location assigned at resource creation
appid required Your unique API key (you can always find it on your account page under the "API key" tab)
Example of the request body
                     
  {
    "type": "mono-si",
    "area": 1.5,
    "tilt": 45,
    "azimuth": 182,
    "peak_power": 2.5
  }
                     
                  
Parameters
type required PV technology type used in solar panel. In case not specified mono-si will be assumed. Allowed technology types: mono-sipoly-sitf-ascdte
area required Area of solar panel in square meters. In case peak_power is not specified then in the POST request then area must be specified instead to be able to estimate panel power output. Solar panel area must not be equal to or less than 0.
tilt required Panel installation tilt angle in degrees (0; 90)
azimuth required Panel installation azimuth angle in degrees (0; 360). An azimuth circle consists of 360 degrees. Ninety degrees corresponds to east, 180 degrees is south, 270 degrees is west, and 360 degrees and 0 degrees mark north
peak_power required Total solar panel installation peak power output in kilowatts. In case area is not specified in the POST request then peak_power must be specified instead. In case both area and peak_power are specified, peak_power will be used. In case only area is specified, peak_power will be calculated from area and type. Solar panel peak power must not be equal to or less than 0.

Example of API response

Example of API response
                  
  {
    "panel_id": "F48BE762-6101-405B-BB72-E0CA9FE1A8FF",
    "location_id": "F01E165B-22F3-4591-89D4-F238E92F6885",
    "type": "mono-si",
    "area": 1.5,
    "tilt": 45,
    "azimuth": 182,
    "peak_power": 2.5
  }
             
                

Fields in API response

  • panel_idUnique identifer of the solar panel assigned at resource creation
  • location_idUnique identifer of the location assigned at resource creation
  • typePV technology type used in solar panel
  • area Area of solar panel, m2
  • tilt Panel installation tilt angle in degrees (0; 90)
  • azimuth Panel installation azimuth angle in degrees (0; 360)
  • peak_power Total solar panel installation peak power output in kilowatts

How to get a solar panel data

You could get information about created solar panel by its id number using API call below. In case of success method returns an HTTP code 200.

Method: GET

URL

https://api.openweathermap.org/energy/1.0/panel/{panel_id}?appid={API key}
Parameters
panel_id required Unique identifer of the solar panel assigned at resource creation
appid required Your unique API key (you can always find it on your account page under the "API key" tab)

URL example

https://api.openweathermap.org/energy/1.0/panel/F48BE762-6101-405B-BB72-E0CA9FE1A8FF?appid={API key}

Example of API response

Example of API response
                  
  {
    "panel_id": "F48BE762-6101-405B-BB72-E0CA9FE1A8FF",
    "location_id": "F01E165B-22F3-4591-89D4-F238E92F6885",
    "type": "mono-si",
    "area": 1.5,
    "tilt": 45,
    "azimuth": 182,
    "peak_power": 2.5
  }
             
                

Fields in API response

  • panel_id Unique identifer of the solar panel assigned at resource creation
  • location_idUnique identifer of the location assigned at resource creation
  • typePV technology type used in solar panel
  • area Area of solar panel, m2
  • tilt Panel installation tilt angle in degrees (0; 90)
  • azimuth Panel installation azimuth angle in degrees (0; 360)
  • peak_power Total solar panel installation peak power output in kilowatts (kW)

How to get a list of created solar panels

You could get a list of all created solar panels for particular location using OpenWeather API key. In case of success method returns an HTTP code 200.

Method: GET

URL

https://api.openweathermap.org/energy/1.0/location/{location_id}/panels?appid={API key}
Parameters
location_id required Unique identifer of the location assigned at resource creation
appid required Your unique API key (you can always find it on your account page under the "API key" tab)

URL example

https://api.openweathermap.org/energy/1.0/location/F01E165B-22F3-4591-89D4-F238E92F6885/panels?appid={API key}

Example of API response

Example of API response
                  
  [
    {
      "panel_id": "F48BE762-6101-405B-BB72-E0CA9FE1A8FF",
      "location_id": "F01E165B-22F3-4591-89D4-F238E92F6885",
      "type": "mono-si",
      "area": 1.5,
      "tilt": 45,
      "azimuth": 182,
      "peak_power": 2.5
    }
  ]
             
                

Fields in API response

  • panel_id Unique identifer of the solar panel assigned at resource creation
  • location_idUnique identifer of the location assigned at resource creation
  • typePV technology type used in solar panel
  • area Area of solar panel, m2
  • tilt A Panel installation tilt angle in degrees (0; 90)
  • azimuth Panel installation azimuth angle in degrees (0; 360)
  • peak_power Total solar panel installation peak power output in kilowatts

How to delete a solar panel

You could delete created solar panel by its id number using folowing API call. In case of successful removing method returns an HTTP code 204.

Method: DELETE

URL

https://api.openweathermap.org/energy/1.0/panel/{panel_id}?appid={API key}
Parameters
panel_id required Unique identifer of the solar panel assigned at resource creation
appid required Your unique API key (you can always find it on your account page under the "API key" tab)

URL example

https://api.openweathermap.org/energy/1.0/panel/F01E165B-22F3-4591-89D4-F238E92F6885?appid={API key}

API response

Please pay attention if the delete request is successfully processed, then no response will be returned.

Step 3: Get solar panel power output and solar irradiation data by location

To get solar panel power output data make an API call according rules below.
API response contains not only solar panel power output data for all solar panels associated with particular location but solar irradiation data for this location as well. You could find detailed information about what technologies, algorithms, etc. are behind the solar irradiation calculations here. In case of success method returns an HTTP code 200. Please pay attention that solar panel output values are given for averaged efficiency with a performance ratio 0.75.

There are two routes to receive solar panel power output data and solar irradiation data for specified location:

  • Get daily aggregation with hourly detalization with Route 1
  • Get daily aggregation with detalization by intervals with Route 2

Method: GET

Route 1: daily aggregation with hourly detalization of solar panel power output and solar irradiation data

In this section you will find how to request historical starting from 1st January 1979, current or forecast for 15 days ahead daily aggregated and accumulated hourly detalization for solar panel power output and solar irradiation data for particular geographical location and for specified date.
If you are interested in daily aggregation with detalization by intervals for solar panel power output and solar irradiation data please use section Route 2: daily aggregation with detalization by intervals.

URL

https://api.openweathermap.org/energy/1.0/location/{location_id}/data?date={date}&appid={API key}
Parameters
location_id required Unique identifer of the location assigned at resource creation
date required Date in the `YYYY-MM-DD` format for which data is requested. Date available from 1979-01-01 up to +15 days to the current date
appid required Your unique API key (you can always find it on your account page under the "API key" tab)
If the service detected timezone for your location incorrectly you can specify correct timezone manually by adding tz parameter in the ±XX:XX format to API call.

API call

https://api.openweathermap.org/energy/1.0/location/{location_id}/data?date={date}&tz={tz}&appid={API key}

URL example

https://api.openweathermap.org/energy/1.0/location/F01E165B-22F3-4591-89D4-F238E92F6885/data?date=2023-03-30&tz=+05:45&appid={API key}
Please pay attention that in case timezone is specified time of sunset and sunrise will be returned in accordance with this specified timezone.

URL example

https://api.openweathermap.org/energy/1.0/location/0189d066-983b-8a33-ae7a-b60be1ab759f/data?date=2023-08-07&appid={API key}

Example of API response

Example of API response
                  
  {
      "location_id": "0189d066-983b-8a33-ae7a-b60be1ab759f",
      "lat": 42.301,
      "lon": 19.185,
      "date": "2023-08-07",
      "tz": "+02:00",
      "sunrise": "2023-08-07T05:41:22",
      "sunset": "2023-08-07T19:56:06",
      "irradiance": {
          "daily": [
              {
                  "clear_sky": {
                      "ghi": 7738.01,
                      "dni": 10286.11,
                      "dhi": 1275.66
                  },
                  "cloudy_sky": {
                      "ghi": 7695.01,
                      "dni": 9659.94,
                      "dhi": 1363.06
                  }
              }
          ],
          "hourly": [
              {
                  "hour": 0,
                  "clear_sky": {
                      "ghi": 0.0,
                      "dni": 0.0,
                      "dhi": 0.0
                  },
                  "cloudy_sky": {
                      "ghi": 0.0,
                      "dni": 0.0,
                      "dhi": 0.0
                  }
              },
              {
                  "hour": 1,
                  "clear_sky": {
                      "ghi": 0.0,
                      "dni": 0.0,
                      "dhi": 0.0
                  },
                  "cloudy_sky": {
                      "ghi": 0.0,
                      "dni": 0.0,
                      "dhi": 0.0
                  }
              },
              {
                  "hour": 2,
                  "clear_sky": {
                      "ghi": 0.0,
                      "dni": 0.0,
                      "dhi": 0.0
                  },
                  "cloudy_sky": {
                      "ghi": 0.0,
                      "dni": 0.0,
                      "dhi": 0.0
                  }
              },
              {
                  "hour": 3,
                  "clear_sky": {
                      "ghi": 0.0,
                      "dni": 0.0,
                      "dhi": 0.0
                  },
                  "cloudy_sky": {
                      "ghi": 0.0,
                      "dni": 0.0,
                      "dhi": 0.0
                  }
              },
              {
                  "hour": 4,
                  "clear_sky": {
                      "ghi": 0.0,
                      "dni": 0.0,
                      "dhi": 0.0
                  },
                  "cloudy_sky": {
                      "ghi": 0.0,
                      "dni": 0.0,
                      "dhi": 0.0
                  }
              },
              {
                  "hour": 5,
                  "clear_sky": {
                      "ghi": 0.0,
                      "dni": 0.0,
                      "dhi": 0.0
                  },
                  "cloudy_sky": {
                      "ghi": 0.0,
                      "dni": 0.0,
                      "dhi": 0.0
                  }
              },
              {
                  "hour": 6,
                  "clear_sky": {
                      "ghi": 86.4,
                      "dni": 390.66,
                      "dhi": 43.5
                  },
                  "cloudy_sky": {
                      "ghi": 77.43,
                      "dni": 226.55,
                      "dhi": 47.13
                  }
              },
              {
                  "hour": 7,
                  "clear_sky": {
                      "ghi": 266.08,
                      "dni": 634.47,
                      "dhi": 71.86
                  },
                  "cloudy_sky": {
                      "ghi": 239.15,
                      "dni": 506.18,
                      "dhi": 78.42
                  }
              },
              {
                  "hour": 8,
                  "clear_sky": {
                      "ghi": 457.79,
                      "dni": 757.88,
                      "dhi": 90.29
                  },
                  "cloudy_sky": {
                      "ghi": 457.77,
                      "dni": 750.01,
                      "dhi": 87.66
                  }
              },
              {
                  "hour": 9,
                  "clear_sky": {
                      "ghi": 635.88,
                      "dni": 831.13,
                      "dhi": 103.17
                  },
                  "cloudy_sky": {
                      "ghi": 635.84,
                      "dni": 822.81,
                      "dhi": 101.84
                  }
              },
              {
                  "hour": 10,
                  "clear_sky": {
                      "ghi": 782.37,
                      "dni": 876.2,
                      "dhi": 111.98
                  },
                  "cloudy_sky": {
                      "ghi": 782.34,
                      "dni": 869.32,
                      "dhi": 110.03
                  }
              },
              {
                  "hour": 11,
                  "clear_sky": {
                      "ghi": 883.76,
                      "dni": 902.16,
                      "dhi": 117.42
                  },
                  "cloudy_sky": {
                      "ghi": 883.74,
                      "dni": 873.35,
                      "dhi": 134.33
                  }
              },
              {
                  "hour": 12,
                  "clear_sky": {
                      "ghi": 931.14,
                      "dni": 913.16,
                      "dhi": 119.81
                  },
                  "cloudy_sky": {
                      "ghi": 931.12,
                      "dni": 873.19,
                      "dhi": 147.55
                  }
              },
              {
                  "hour": 13,
                  "clear_sky": {
                      "ghi": 920.39,
                      "dni": 910.73,
                      "dhi": 119.27
                  },
                  "cloudy_sky": {
                      "ghi": 920.34,
                      "dni": 873.2,
                      "dhi": 144.54
                  }
              },
              {
                  "hour": 14,
                  "clear_sky": {
                      "ghi": 852.42,
                      "dni": 894.54,
                      "dhi": 115.78
                  },
                  "cloudy_sky": {
                      "ghi": 852.37,
                      "dni": 872.57,
                      "dhi": 126.4
                  }
              },
              {
                  "hour": 15,
                  "clear_sky": {
                      "ghi": 733.11,
                      "dni": 862.22,
                      "dhi": 109.15
                  },
                  "cloudy_sky": {
                      "ghi": 731.35,
                      "dni": 830.9,
                      "dhi": 123.29
                  }
              },
              {
                  "hour": 16,
                  "clear_sky": {
                      "ghi": 573.05,
                      "dni": 808.17,
                      "dhi": 98.94
                  },
                  "cloudy_sky": {
                      "ghi": 571.38,
                      "dni": 804.41,
                      "dhi": 92.96
                  }
              },
              {
                  "hour": 17,
                  "clear_sky": {
                      "ghi": 387.35,
                      "dni": 720.06,
                      "dhi": 84.24
                  },
                  "cloudy_sky": {
                      "ghi": 385.39,
                      "dni": 710.72,
                      "dhi": 79.66
                  }
              },
              {
                  "hour": 18,
                  "clear_sky": {
                      "ghi": 196.09,
                      "dni": 565.48,
                      "dhi": 62.93
                  },
                  "cloudy_sky": {
                      "ghi": 194.76,
                      "dni": 516.5,
                      "dhi": 65.89
                  }
              },
              {
                  "hour": 19,
                  "clear_sky": {
                      "ghi": 32.18,
                      "dni": 219.25,
                      "dhi": 27.32
                  },
                  "cloudy_sky": {
                      "ghi": 32.03,
                      "dni": 130.23,
                      "dhi": 23.36
                  }
              },
              {
                  "hour": 20,
                  "clear_sky": {
                      "ghi": 0.0,
                      "dni": 0.0,
                      "dhi": 0.0
                  },
                  "cloudy_sky": {
                      "ghi": 0.0,
                      "dni": 0.0,
                      "dhi": 0.0
                  }
              },
              {
                  "hour": 21,
                  "clear_sky": {
                      "ghi": 0.0,
                      "dni": 0.0,
                      "dhi": 0.0
                  },
                  "cloudy_sky": {
                      "ghi": 0.0,
                      "dni": 0.0,
                      "dhi": 0.0
                  }
              },
              {
                  "hour": 22,
                  "clear_sky": {
                      "ghi": 0.0,
                      "dni": 0.0,
                      "dhi": 0.0
                  },
                  "cloudy_sky": {
                      "ghi": 0.0,
                      "dni": 0.0,
                      "dhi": 0.0
                  }
              },
              {
                  "hour": 23,
                  "clear_sky": {
                      "ghi": 0.0,
                      "dni": 0.0,
                      "dhi": 0.0
                  },
                  "cloudy_sky": {
                      "ghi": 0.0,
                      "dni": 0.0,
                      "dhi": 0.0
                  }
              }
          ]
      },
      "panels": [
          {
              "panel_id": "0189d067-a458-8dd9-8058-deac073e01de",
              "output": {
                  "daily": {
                      "clear_sky": {
                          "power": 13.4922
                      },
                      "cloudy_sky": {
                          "power": 13.1875
                      }
                  },
                  "hourly": {
                      "clear_sky": [
                          {
                              "hour": 0,
                              "power": 0.0
                          },
                          {
                              "hour": 1,
                              "power": 0.0
                          },
                          {
                              "hour": 2,
                              "power": 0.0
                          },
                          {
                              "hour": 3,
                              "power": 0.0
                          },
                          {
                              "hour": 4,
                              "power": 0.0
                          },
                          {
                              "hour": 5,
                              "power": 0.0
                          },
                          {
                              "hour": 6,
                              "power": 0.2537
                          },
                          {
                              "hour": 7,
                              "power": 0.6937
                          },
                          {
                              "hour": 8,
                              "power": 1.1348
                          },
                          {
                              "hour": 9,
                              "power": 1.507
                          },
                          {
                              "hour": 10,
                              "power": 1.7635
                          },
                          {
                              "hour": 11,
                              "power": 1.8755
                          },
                          {
                              "hour": 12,
                              "power": 1.8316
                          },
                          {
                              "hour": 13,
                              "power": 1.6378
                          },
                          {
                              "hour": 14,
                              "power": 1.3167
                          },
                          {
                              "hour": 15,
                              "power": 0.9065
                          },
                          {
                              "hour": 16,
                              "power": 0.4601
                          },
                          {
                              "hour": 17,
                              "power": 0.0926
                          },
                          {
                              "hour": 18,
                              "power": 0.0162
                          },
                          {
                              "hour": 19,
                              "power": 0.0027
                          },
                          {
                              "hour": 20,
                              "power": 0.0
                          },
                          {
                              "hour": 21,
                              "power": 0.0
                          },
                          {
                              "hour": 22,
                              "power": 0.0
                          },
                          {
                              "hour": 23,
                              "power": 0.0
                          }
                      ],
                      "cloudy_sky": [
                          {
                              "hour": 0,
                              "power": 0.0
                          },
                          {
                              "hour": 1,
                              "power": 0.0
                          },
                          {
                              "hour": 2,
                              "power": 0.0
                          },
                          {
                              "hour": 3,
                              "power": 0.0
                          },
                          {
                              "hour": 4,
                              "power": 0.0
                          },
                          {
                              "hour": 5,
                              "power": 0.0
                          },
                          {
                              "hour": 6,
                              "power": 0.1854
                          },
                          {
                              "hour": 7,
                              "power": 0.5894
                          },
                          {
                              "hour": 8,
                              "power": 1.1211
                          },
                          {
                              "hour": 9,
                              "power": 1.492
                          },
                          {
                              "hour": 10,
                              "power": 1.7483
                          },
                          {
                              "hour": 11,
                              "power": 1.8536
                          },
                          {
                              "hour": 12,
                              "power": 1.8105
                          },
                          {
                              "hour": 13,
                              "power": 1.6212
                          },
                          {
                              "hour": 14,
                              "power": 1.3054
                          },
                          {
                              "hour": 15,
                              "power": 0.8984
                          },
                          {
                              "hour": 16,
                              "power": 0.4534
                          },
                          {
                              "hour": 17,
                              "power": 0.0901
                          },
                          {
                              "hour": 18,
                              "power": 0.016
                          },
                          {
                              "hour": 19,
                              "power": 0.0026
                          },
                          {
                              "hour": 20,
                              "power": 0.0
                          },
                          {
                              "hour": 21,
                              "power": 0.0
                          },
                          {
                              "hour": 22,
                              "power": 0.0
                          },
                          {
                              "hour": 23,
                              "power": 0.0
                          }
                      ]
                  }
              }
          }
      ]
  }
             
                

Fields in API response

  • location_idUnique identifer of the location assigned at resource creation
  • lat Latitude of the location, decimal (−90; 90)
  • lon Longitude of the location, decimal (-180; 180)
  • date Date specified in the API request in the `YYYY-MM-DD` format (from 1979-01-01 up to +15 days to the current date)
  • tz Timezone in the ±XX:XX format
  • sunrise Date and time of sunrise based on date specified in the API request and timezone authomatically determinated by on latitude and longitute of requested location. If you added timezone parameter into API request, then time of sunrise will be recalculated in accordance with this timezone. For polar areas in midnight sun and polar night periods this parameter is not returned in the response
  • sunsetDate and time of sunset based on date specified in the API request and timezone authomatically determinated by on latitude and longitute of requested location. If you added timezone parameter into API request, then time of sunset will be recalculated in accordance with this timezone. For polar areas in midnight sun and polar night periods this parameter is not returned in the response
  • irradianceIrradiance related information
  • panels Solar panels related information
    • panel_id Unique identifer of the solar panel assigned at resource creation
    • outputSolar panel power output data
      • dailyDaily aggeregated solar panel power output data. Please pay attention that solar panel output values are given for averaged efficiency with a performance ratio 0.75
        • clear_skyClear sky model
          • powerDaily solar panel power output amount for clear sky model, kW. Please pay attention that solar panel output values are given for averaged efficiency with a performance ratio 0.75
        • cloudy_skyCloudy sky model
          • powerDaily solar panel power output amount for cloudy sky model, kW. Please pay attention that solar panel output values are given for averaged efficiency with a performance ratio 0.75
      • hourlyHourly detalization of solar panel power output data. Please pay attention that solar panel output values are given for averaged efficiency with a performance ratio 0.75
        • clear_skyClear sky model
          • hourHour of the day for which power output is calculated
          • powerHourly solar panel power output amount for clear sky model, kW. Please pay attention that solar panel output values are given for averaged efficiency with a performance ratio 0.75
        • cloudy_skyCloudy sky model
          • hourHour of the day for which power output is calculated
          • powerHourly solar panel power output amount for cloudy sky model, kW. Please pay attention that solar panel output values are given for averaged efficiency with a performance ratio 0.75

Route 2: daily aggregation with detalization by intervals of solar panel power output and solar irradiation data

In this section you will find how to request historical starting from 1st January 1979, current or forecast for 15 days ahead daily aggregated and accumulated 1 hour and 15 minutes interval detalization for solar panel power output and solar irradiation data for particular geographical location and for specified date.
If you are interested in daily aggregation with hourly detalization for solar panel power output and solar irradiation data please use section Route 1: daily aggregation with hourly detalization.

URL

https://api.openweathermap.org/energy/1.0/location/{location_id}/interval_data?date={date}&interval={interval}&appid={API key}
Parameters
location_id required Unique identifer of the location assigned at resource creation
date required Date in the `YYYY-MM-DD` format for which data is requested. Date available from 1979-01-01 up to +15 days to the current date
interval optional The time interval during which the energy is summed up and solar panel power output is calculated, defines the temporary resolution of solar radiation data. If not specified, the default interval of "1h" (1 hour) will be used. Available values for this parameter include: "1h" (1 hour) and "15m" (15 minutes)
appid required Your unique API key (you can always find it on your account page under the "API key" tab)
If the service detected timezone for your location incorrectly you can specify correct timezone manually by adding tz parameter in the ±XX:XX format to API call.

API call

https://api.openweathermap.org/energy/1.0/location/{location_id}/interval_data?date={date}&interval={interval}&tz={tz}&appid={API key}

URL example

https://api.openweathermap.org/energy/1.0/location/F01E165B-22F3-4591-89D4-F238E92F6885/interval_data?date=2023-03-30&interval=1h&tz=+05:45&appid={API key}
Please pay attention that in case timezone is specified time of sunset and sunrise will be returned in accordance with this specified timezone.

URL example

https://api.openweathermap.org/energy/1.0/location/018aa7aa-3d5f-85a2-91ee-b1b53c3e98a4/interval_data?date=2021-05-01&interval=1h&appid={API key}

Example of API response

Example of API response
                  
  {
     "location_id":"018aa7aa-3d5f-85a2-91ee-b1b53c3e98a4",
     "lat":60.16986,
     "lon":24.93838,
     "date":"2021-05-01",
     "tz":"+03:00",
     "interval":"1h",
     "sunrise":"2021-05-01T05:16:36",
     "sunset":"2021-05-01T21:19:47",
     "irradiance":{
        "daily":[
           {
              "clear_sky":{
                 "ghi":6428.85,
                 "dni":10469.57,
                 "dhi":1271.66
              },
              "cloudy_sky":{
                 "ghi":6318.7,
                 "dni":9562.88,
                 "dhi":1491.64
              }
           }
        ],
        "intervals":[
           {
              "start":"00:00",
              "end":"01:00",
              "clear_sky":{
                 "ghi":0,
                 "dni":0,
                 "dhi":0
              },
              "cloudy_sky":{
                 "ghi":0,
                 "dni":0,
                 "dhi":0
              }
           },
           {
              "start":"01:00",
              "end":"02:00",
              "clear_sky":{
                 "ghi":0,
                 "dni":0,
                 "dhi":0
              },
              "cloudy_sky":{
                 "ghi":0,
                 "dni":0,
                 "dhi":0
              }
           },
           {
              "start":"02:00",
              "end":"03:00",
              "clear_sky":{
                 "ghi":0,
                 "dni":0,
                 "dhi":0
              },
              "cloudy_sky":{
                 "ghi":0,
                 "dni":0,
                 "dhi":0
              }
           },
           {
              "start":"03:00",
              "end":"04:00",
              "clear_sky":{
                 "ghi":0,
                 "dni":0,
                 "dhi":0
              },
              "cloudy_sky":{
                 "ghi":0,
                 "dni":0,
                 "dhi":0
              }
           },
           {
              "start":"04:00",
              "end":"05:00",
              "clear_sky":{
                 "ghi":0,
                 "dni":0,
                 "dhi":0
              },
              "cloudy_sky":{
                 "ghi":0,
                 "dni":0,
                 "dhi":0
              }
           },
           {
              "start":"05:00",
              "end":"06:00",
              "clear_sky":{
                 "ghi":8.56,
                 "dni":66.34,
                 "dhi":10.37
              },
              "cloudy_sky":{
                 "ghi":8.56,
                 "dni":7.47,
                 "dhi":8.14
              }
           },
           {
              "start":"06:00",
              "end":"07:00",
              "clear_sky":{
                 "ghi":84.84,
                 "dni":377.47,
                 "dhi":42.87
              },
              "cloudy_sky":{
                 "ghi":84.84,
                 "dni":334.94,
                 "dhi":38.4
              }
           },
           {
              "start":"07:00",
              "end":"08:00",
              "clear_sky":{
                 "ghi":203.02,
                 "dni":572.19,
                 "dhi":64.42
              },
              "cloudy_sky":{
                 "ghi":203.02,
                 "dni":551.03,
                 "dhi":61.66
              }
           },
           {
              "start":"08:00",
              "end":"09:00",
              "clear_sky":{
                 "ghi":332.67,
                 "dni":687.73,
                 "dhi":79.94
              },
              "cloudy_sky":{
                 "ghi":332.53,
                 "dni":670.61,
                 "dhi":79.13
              }
           },
           {
              "start":"09:00",
              "end":"10:00",
              "clear_sky":{
                 "ghi":458.18,
                 "dni":762.29,
                 "dhi":91.47
              },
              "cloudy_sky":{
                 "ghi":456.73,
                 "dni":732.71,
                 "dhi":97.91
              }
           },
           {
              "start":"10:00",
              "end":"11:00",
              "clear_sky":{
                 "ghi":567.24,
                 "dni":811.26,
                 "dhi":99.86
              },
              "cloudy_sky":{
                 "ghi":560.89,
                 "dni":766.56,
                 "dhi":113.13
              }
           },
           {
              "start":"11:00",
              "end":"12:00",
              "clear_sky":{
                 "ghi":649.96,
                 "dni":842.02,
                 "dhi":105.5
              },
              "cloudy_sky":{
                 "ghi":611.09,
                 "dni":683.8,
                 "dhi":164.13
              }
           },
           {
              "start":"12:00",
              "end":"13:00",
              "clear_sky":{
                 "ghi":699.11,
                 "dni":858.29,
                 "dhi":108.63
              },
              "cloudy_sky":{
                 "ghi":660.3,
                 "dni":681.77,
                 "dhi":184.85
              }
           },
           {
              "start":"13:00",
              "end":"14:00",
              "clear_sky":{
                 "ghi":710.5,
                 "dni":861.83,
                 "dhi":109.35
              },
              "cloudy_sky":{
                 "ghi":708.26,
                 "dni":812.08,
                 "dhi":135.12
              }
           },
           {
              "start":"14:00",
              "end":"15:00",
              "clear_sky":{
                 "ghi":683.19,
                 "dni":853.1,
                 "dhi":107.65
              },
              "cloudy_sky":{
                 "ghi":675.85,
                 "dni":793.48,
                 "dhi":133.9
              }
           },
           {
              "start":"15:00",
              "end":"16:00",
              "clear_sky":{
                 "ghi":619.53,
                 "dni":831.16,
                 "dhi":103.51
              },
              "cloudy_sky":{
                 "ghi":607.9,
                 "dni":767.8,
                 "dhi":125.36
              }
           },
           {
              "start":"16:00",
              "end":"17:00",
              "clear_sky":{
                 "ghi":525.02,
                 "dni":793.54,
                 "dhi":96.78
              },
              "cloudy_sky":{
                 "ghi":523.37,
                 "dni":759.9,
                 "dhi":106.81
              }
           },
           {
              "start":"17:00",
              "end":"18:00",
              "clear_sky":{
                 "ghi":408.06,
                 "dni":735.34,
                 "dhi":87.18
              },
              "cloudy_sky":{
                 "ghi":406.77,
                 "dni":711.18,
                 "dhi":89.93
              }
           },
           {
              "start":"18:00",
              "end":"19:00",
              "clear_sky":{
                 "ghi":279.52,
                 "dni":646.85,
                 "dhi":74.18
              },
              "cloudy_sky":{
                 "ghi":279.15,
                 "dni":627.16,
                 "dhi":72.79
              }
           },
           {
              "start":"19:00",
              "end":"20:00",
              "clear_sky":{
                 "ghi":152.75,
                 "dni":506.63,
                 "dhi":56.64
              },
              "cloudy_sky":{
                 "ghi":152.75,
                 "dni":483.2,
                 "dhi":52.63
              }
           },
           {
              "start":"20:00",
              "end":"21:00",
              "clear_sky":{
                 "ghi":46.07,
                 "dni":257.91,
                 "dhi":31.36
              },
              "cloudy_sky":{
                 "ghi":46.07,
                 "dni":179.19,
                 "dhi":27.13
              }
           },
           {
              "start":"21:00",
              "end":"22:00",
              "clear_sky":{
                 "ghi":0.63,
                 "dni":5.62,
                 "dhi":1.98
              },
              "cloudy_sky":{
                 "ghi":0.63,
                 "dni":0,
                 "dhi":0.63
              }
           },
           {
              "start":"22:00",
              "end":"23:00",
              "clear_sky":{
                 "ghi":0,
                 "dni":0,
                 "dhi":0
              },
              "cloudy_sky":{
                 "ghi":0,
                 "dni":0,
                 "dhi":0
              }
           },
           {
              "start":"23:00",
              "end":"00:00",
              "clear_sky":{
                 "ghi":0,
                 "dni":0,
                 "dhi":0
              },
              "cloudy_sky":{
                 "ghi":0,
                 "dni":0,
                 "dhi":0
              }
           }
        ]
     },
     "panels":[
        {
           "panel_id":"018aa7aa-f224-893a-9907-ff7befe87968",
           "output":{
              "daily":{
                 "clear_sky":{
                    "power":3.3902
                 },
                 "cloudy_sky":{
                    "power":3.2197
                 }
              },
              "intervals":{
                 "clear_sky":[
                    {
                       "start":"00:00",
                       "end":"01:00",
                       "power":0
                    },
                    {
                       "start":"01:00",
                       "end":"02:00",
                       "power":0
                    },
                    {
                       "start":"02:00",
                       "end":"03:00",
                       "power":0
                    },
                    {
                       "start":"03:00",
                       "end":"04:00",
                       "power":0
                    },
                    {
                       "start":"04:00",
                       "end":"05:00",
                       "power":0
                    },
                    {
                       "start":"05:00",
                       "end":"06:00",
                       "power":0.0215
                    },
                    {
                       "start":"06:00",
                       "end":"07:00",
                       "power":0.1544
                    },
                    {
                       "start":"07:00",
                       "end":"08:00",
                       "power":0.2852
                    },
                    {
                       "start":"08:00",
                       "end":"09:00",
                       "power":0.388
                    },
                    {
                       "start":"09:00",
                       "end":"10:00",
                       "power":0.4554
                    },
                    {
                       "start":"10:00",
                       "end":"11:00",
                       "power":0.4825
                    },
                    {
                       "start":"11:00",
                       "end":"12:00",
                       "power":0.468
                    },
                    {
                       "start":"12:00",
                       "end":"13:00",
                       "power":0.4147
                    },
                    {
                       "start":"13:00",
                       "end":"14:00",
                       "power":0.3292
                    },
                    {
                       "start":"14:00",
                       "end":"15:00",
                       "power":0.2214
                    },
                    {
                       "start":"15:00",
                       "end":"16:00",
                       "power":0.1037
                    },
                    {
                       "start":"16:00",
                       "end":"17:00",
                       "power":0.0278
                    },
                    {
                       "start":"17:00",
                       "end":"18:00",
                       "power":0.0196
                    },
                    {
                       "start":"18:00",
                       "end":"19:00",
                       "power":0.0142
                    },
                    {
                       "start":"19:00",
                       "end":"20:00",
                       "power":0.0035
                    },
                    {
                       "start":"20:00",
                       "end":"21:00",
                       "power":0.0011
                    },
                    {
                       "start":"21:00",
                       "end":"22:00",
                       "power":0
                    },
                    {
                       "start":"22:00",
                       "end":"23:00",
                       "power":0
                    },
                    {
                       "start":"23:00",
                       "end":"00:00",
                       "power":0
                    }
                 ],
                 "cloudy_sky":[
                    {
                       "start":"00:00",
                       "end":"01:00",
                       "power":0
                    },
                    {
                       "start":"01:00",
                       "end":"02:00",
                       "power":0
                    },
                    {
                       "start":"02:00",
                       "end":"03:00",
                       "power":0
                    },
                    {
                       "start":"03:00",
                       "end":"04:00",
                       "power":0
                    },
                    {
                       "start":"04:00",
                       "end":"05:00",
                       "power":0
                    },
                    {
                       "start":"05:00",
                       "end":"06:00",
                       "power":0.0058
                    },
                    {
                       "start":"06:00",
                       "end":"07:00",
                       "power":0.1375
                    },
                    {
                       "start":"07:00",
                       "end":"08:00",
                       "power":0.2747
                    },
                    {
                       "start":"08:00",
                       "end":"09:00",
                       "power":0.379
                    },
                    {
                       "start":"09:00",
                       "end":"10:00",
                       "power":0.443
                    },
                    {
                       "start":"10:00",
                       "end":"11:00",
                       "power":0.4657
                    },
                    {
                       "start":"11:00",
                       "end":"12:00",
                       "power":0.4191
                    },
                    {
                       "start":"12:00",
                       "end":"13:00",
                       "power":0.3757
                    },
                    {
                       "start":"13:00",
                       "end":"14:00",
                       "power":0.3237
                    },
                    {
                       "start":"14:00",
                       "end":"15:00",
                       "power":0.2185
                    },
                    {
                       "start":"15:00",
                       "end":"16:00",
                       "power":0.1056
                    },
                    {
                       "start":"16:00",
                       "end":"17:00",
                       "power":0.0308
                    },
                    {
                       "start":"17:00",
                       "end":"18:00",
                       "power":0.0209
                    },
                    {
                       "start":"18:00",
                       "end":"19:00",
                       "power":0.0148
                    },
                    {
                       "start":"19:00",
                       "end":"20:00",
                       "power":0.0035
                    },
                    {
                       "start":"20:00",
                       "end":"21:00",
                       "power":0.0011
                    },
                    {
                       "start":"21:00",
                       "end":"22:00",
                       "power":0.0003
                    },
                    {
                       "start":"22:00",
                       "end":"23:00",
                       "power":0
                    },
                    {
                       "start":"23:00",
                       "end":"00:00",
                       "power":0
                    }
                 ]
              }
           }
        }
     ]
  }
             
                

Fields in API response

  • location_idUnique identifer of the location assigned at resource creation
  • lat Latitude of the location, decimal (−90; 90)
  • lon Longitude of the location, decimal (-180; 180)
  • date Date specified in the API request in the `YYYY-MM-DD` format (from 1979-01-01 up to +15 days to the current date)
  • tz Timezone in the ±XX:XX format
  • interval Time interval during which the energy is summed up and solar panel power output is calculated. Determines temporary resolution of solar radiation data. If not specified "1h" interval will be used. Available values : 1h, 15m
  • sunrise Date and time of sunrise based on date specified in the API request and timezone authomatically determinated by on latitude and longitute of requested location. If you added timezone parameter into API request, then time of sunrise will be recalculated in accordance with this timezone. For polar areas in midnight sun and polar night periods this parameter is not returned in the response
  • sunsetDate and time of sunset based on date specified in the API request and timezone authomatically determinated by on latitude and longitute of requested location. If you added timezone parameter into API request, then time of sunset will be recalculated in accordance with this timezone. For polar areas in midnight sun and polar night periods this parameter is not returned in the response
  • irradianceIrradiance related information
  • panels Solar panels related information
    • panel_id Unique identifer of the solar panel assigned at resource creation
    • outputSolar panel power output data
      • dailyDaily aggeregated solar panel power output data. Please pay attention that solar panel output values are given for averaged efficiency with a performance ratio 0.75
        • clear_skyClear sky model
          • powerDaily solar panel power output amount for clear sky model, kW. Please pay attention that solar panel output values are given for averaged efficiency with a performance ratio 0.75
        • cloudy_skyCloudy sky model
          • powerDaily solar panel power output amount for cloudy sky model, kW. Please pay attention that solar panel output values are given for averaged efficiency with a performance ratio 0.75
      • intervals Interval detalization of daily aggregated solar panel power output data for the requested date. Please pay attention that solar panel output values are given for averaged efficiency with a performance ratio 0.75
        • clear_skyClear sky model
          • startStart of the time interval for which the solar panel power output is calculated. Time interval displays hour and minutes of the day for which indexes were aggregated in "hh:mm" format
          • endEnd of the time interval for which the solar panel power output is calculated. Time interval displays hour and minutes of the day for which indexes were aggregated in "hh:mm" format
          • powerSolar panel power output amount per requeted interval for clear sky model, kW. Please pay attention that solar panel output values are given for averaged efficiency with a performance ratio 0.75
        • cloudy_skyCloudy sky model
          • startStart of the time interval for which the solar panel power output is calculated. Time interval displays hour and minutes of the day for which indexes were aggregated in "hh:mm" format
          • endEnd of the time interval for which the solar panel power output is calculated. Time interval displays hour and minutes of the day for which indexes were aggregated in "hh:mm" format
          • powerSolar panel power output amount per requeted interval for cloudy sky model, kW. Please pay attention that solar panel output values are given for averaged efficiency with a performance ratio 0.75

API errors

Structure of API errors

In case of incorrected API call you will receive API error response. Error response payload returned for all types of errors with the structure below.

Example of error response

Example of error response
                  
  {
      "code": "400",
      "message": "Invalid date format",
      "parameters": [
          "date"
      ]
  }
          
                

Fields in error response

  • code Code of error
  • message Description of error
  • parameters(optional) List of request parameters names that are related to this particular error

Errors list


Please find more detailed information about some popular errors below.

API calls return an error 400

Error 400 - Bad Request. You can get error 400 error if either some mandatory parameters in the request are missing or some of request parameters have incorrect format or values out of allowed range. List of all parameters names that are missong or incorrect will be returned in `parameters`attribute of the `ErrorResponse` object.

API calls return an error 401

Error 401 - Unauthorized. You can get 401 error if API token did not providen in the request or in case API token provided in the request does not grant access to this API. You must add API token with granted access to the product to the request before returing it.

API calls return an error 404

Error 404 - Not Found. You can get 404 error if data with requested parameters (lat, lon, date, location_id, panel_id) does not exist in service database. You must not retry the same request.

API calls return an error 429

Error 429 - Too Many Requests. You can get 429 error if key quato of requests for provided API to this API was exceeded. You may retry request after some time or after extending your key quota.

API calls return errors '5xx'

Errors 5xx - Unexpected Error. You can get '5xx' error in case of other internal errors. Error Response code will be `5xx`. Please contact us and enclose an example of your API request that receives this error into your email to let us analyze it and find a solution for you promptly. You may retry the request which led to this error.

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.