Solar Irradiance API v1
Product concept
Solar Irradiance & Energy Prediction service helps to predict the energy generated by a particular solar panel before installation, or check for potential issues with existing panels.
Main features of Solar Irradiance API:
- Essential solar irradiation data:
- All indices are available in Clear Sky and Cloudy Sky models
- Current data and forecast for 15 days ahead
- Historical data is available for 47+ years back (from 1st January 1979)
- Data contains daily aggregation for each requested day with hourly detalization or detalization by specified intervals
- Global coverage
There are two routes to receive solar data:
- Get daily aggregation with detalization by 15-minute or 1-hour intervals with Route 1
- Get daily aggregation with hourly detalization of solar irradiance data with Route 2
Data is available in JSON format.
The detailed information about what technologies, algorithms, etc. are behind the Solar Irradiance API can be found here.
How to get access
- Sign up to OpenWeather service in case you haven't got your OpenWeather API key yet.
- Follow the pricing page to learn details about the price. Solar Irradiance API is included in the separate subscription only and allows you to pay only for the number of API calls made to this product. Please find more details on the pricing page.
Solar Irradiance API is included in the separate subscription only and allows you to pay only for the number of API calls made to this product. Please find more details on the pricing page.
- Just make an API call according to the tech documentation below, remembering to add your key to each call.
Route 1: daily aggregation with detalization by intervals
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 over 1 hour or 15 minutes interval solar radiation data for particular geographical location and for specified date. If you are interested in daily aggregation with hourly detalization for solar irradiation data please use section Route 2: daily aggregation with hourly detalization.
How to make an API call
https://api.openweathermap.org/energy/1.0/solar/interval_data?lat={lat}&lon={lon}&date={date}&interval={interval}&appid={API key}Parameters | ||
|---|---|---|
| required | Latitude, decimal (−90; 90) |
| required | Longitude, decimal (−180; 180) |
| 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 |
| required | Your unique API key (you can always find it on your account page under the "API key" tab) |
| optional | The time interval during which the energy is summed up, 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) |
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/solar/interval_data?lat={lat}&lon={lon}&date={date}&interval={interval}&tz={tz}&appid={API key}https://api.openweathermap.org/energy/1.0/solar/interval_data?lat=60.45&lon=-38.67&date=2023-03-30&interval=1h&tz=+03:00&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.
Example of API call
https://api.openweathermap.org/energy/1.0/solar/interval_data?lat=51.509865&lon=-0.118092&date=2023-10-10&interval=1h&appid={API key}Example of API response
{
"lat":51.509865,
"lon":-0.118092,
"date":"2023-10-10",
"interval":"1h",
"tz":"+01:00",
"sunrise":"2023-10-10T07:15:03",
"sunset":"2023-10-10T18:19:05",
"irradiance":{
"daily":[
{
"clear_sky":{
"ghi":3341.99,
"dni":6736.42,
"dhi":796.63
},
"cloudy_sky":{
"ghi":1321.03,
"dni":189.2,
"dhi":1224.62
}
}
],
"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":0,
"dni":0,
"dhi":0
},
"cloudy_sky":{
"ghi":0,
"dni":0,
"dhi":0
}
},
{
"start":"06:00",
"end":"07:00",
"clear_sky":{
"ghi":0,
"dni":0,
"dhi":0
},
"cloudy_sky":{
"ghi":0,
"dni":0,
"dhi":0
}
},
{
"start":"07:00",
"end":"08:00",
"clear_sky":{
"ghi":17.5,
"dni":114.15,
"dhi":15.71
},
"cloudy_sky":{
"ghi":4.52,
"dni":0,
"dhi":4.52
}
},
{
"start":"08:00",
"end":"09:00",
"clear_sky":{
"ghi":131.24,
"dni":474.04,
"dhi":53.2
},
"cloudy_sky":{
"ghi":32.81,
"dni":0,
"dhi":32.81
}
},
{
"start":"09:00",
"end":"10:00",
"clear_sky":{
"ghi":268.29,
"dni":644.2,
"dhi":73.73
},
"cloudy_sky":{
"ghi":69.88,
"dni":0,
"dhi":69.88
}
},
{
"start":"10:00",
"end":"11:00",
"clear_sky":{
"ghi":386.42,
"dni":731.64,
"dhi":86.27
},
"cloudy_sky":{
"ghi":145.02,
"dni":9.14,
"dhi":140.94
}
},
{
"start":"11:00",
"end":"12:00",
"clear_sky":{
"ghi":469.28,
"dni":777.74,
"dhi":93.58
},
"cloudy_sky":{
"ghi":248.06,
"dni":65.63,
"dhi":215.63
}
},
{
"start":"12:00",
"end":"13:00",
"clear_sky":{
"ghi":507.51,
"dni":796.21,
"dhi":96.65
},
"cloudy_sky":{
"ghi":276.15,
"dni":79.43,
"dhi":234.49
}
},
{
"start":"13:00",
"end":"14:00",
"clear_sky":{
"ghi":497.05,
"dni":791.36,
"dhi":95.81
},
"cloudy_sky":{
"ghi":228.56,
"dni":34.99,
"dhi":210.34
}
},
{
"start":"14:00",
"end":"15:00",
"clear_sky":{
"ghi":439.01,
"dni":762.13,
"dhi":90.99
},
"cloudy_sky":{
"ghi":138.36,
"dni":0,
"dhi":138.36
}
},
{
"start":"15:00",
"end":"16:00",
"clear_sky":{
"ghi":339.55,
"dni":700.92,
"dhi":81.62
},
"cloudy_sky":{
"ghi":98.9,
"dni":0,
"dhi":98.9
}
},
{
"start":"16:00",
"end":"17:00",
"clear_sky":{
"ghi":210.63,
"dni":586.34,
"dhi":66.18
},
"cloudy_sky":{
"ghi":57.97,
"dni":0,
"dhi":57.97
}
},
{
"start":"17:00",
"end":"18:00",
"clear_sky":{
"ghi":74.12,
"dni":344.83,
"dhi":39.94
},
"cloudy_sky":{
"ghi":20.4,
"dni":0,
"dhi":20.4
}
},
{
"start":"18:00",
"end":"19:00",
"clear_sky":{
"ghi":1.38,
"dni":12.85,
"dhi":2.94
},
"cloudy_sky":{
"ghi":0.38,
"dni":0,
"dhi":0.38
}
},
{
"start":"19:00",
"end":"20:00",
"clear_sky":{
"ghi":0,
"dni":0,
"dhi":0
},
"cloudy_sky":{
"ghi":0,
"dni":0,
"dhi":0
}
},
{
"start":"20:00",
"end":"21:00",
"clear_sky":{
"ghi":0,
"dni":0,
"dhi":0
},
"cloudy_sky":{
"ghi":0,
"dni":0,
"dhi":0
}
},
{
"start":"21:00",
"end":"22:00",
"clear_sky":{
"ghi":0,
"dni":0,
"dhi":0
},
"cloudy_sky":{
"ghi":0,
"dni":0,
"dhi":0
}
},
{
"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
}
}
]
}
}Fields in API response
latLatitude of the location,decimal (−90; 90)lonLongitude of the location,decimal (-180; 180)dateDate specified in the API request in the `YYYY-MM-DD` format (from 1979-01-01 up to +15 days to the current date)intervalTime interval during which the energy is summed up. Determines temporary resolution of solar radiation data. If not specified "1h" interval will be used. Available values : 1h, 15mtzTimezone in the ±XX:XX formatsunriseDate 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 responsesunsetDate 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 responseirradianceIrradiance related informationdailyDaily aggregated irradiation data for the requested dateclear skyclear sky modelghiClear sky GHI - Global Horizontal Irradiation, Wh/m2dniClear sky DNI - Direct Normal Irradiation, Wh/m2dhiClear sky DHI - Diffuse Horizontal Irradiation, Wh/m2cloud skycloudy sky modelghiCloudy sky GHI - Global Horizontal Irradiation, Wh/m2dniCloudy sky DNI - Direct Normal Irradiation, Wh/m2dhiCloudy sky DHI - Diffuse Horizontal Irradiation, Wh/m2intervalInterval detalization of daily aggregated irradiation data for the requested datestartStart of the time interval for which the energy is summed up. Time interval displays hour and minutes of the day for which indexes were aggregated in "hh:mm" formatendEnd of the time interval for which the energy is summed up. Time interval displays hour and minutes of the day for which indexes were aggregated in "hh:mm" formatclear skyclear sky modelghiClear sky GHI - Global Horizontal Irradiation, Wh/m2dniClear sky DNI - Direct Normal Irradiation, Wh/m2dhiClear sky DHI - Diffuse Horizontal Irradiation, Wh/m2cloudy skycloudy sky modelghiCloudy sky GHI - Global Horizontal Irradiation, Wh/m2dniCloudy sky DNI - Direct Normal Irradiation, Wh/m2dhiCloudy sky DHI - Diffuse Horizontal Irradiation, Wh/m2
Route 2: daily aggregation with hourly detalization
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 solar radiation data for particular geographical location and for specified date. If you are interested in daily aggregation with detalization by intervals for solar irradiation data please use section Route 1: daily aggregation with detalization by intervals.
API call
https://api.openweathermap.org/energy/1.0/solar/data?lat={lat}&lon={lon}&date={date}&appid={API key}Parameters | ||
|---|---|---|
| required | Latitude, decimal (−90; 90) |
| required | Longitude, decimal (−180; 180) |
| 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 |
| 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
Example of API call
https://api.openweathermap.org/energy/1.0/solar/data?lat={lat}&lon={lon}&date={date}&tz={tz}&appid={API key}Example of API call
https://api.openweathermap.org/energy/1.0/solar/data?lat=60.45&lon=-38.67&date=2023-03-30&tz=+03:00&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.
Example of API call
https://api.openweathermap.org/energy/1.0/solar/data?lat=34&lon=34&date=2023-03-28&appid={API key}Example of API response
{
"lat":34,
"lon":34,
"date":"2023-03-28",
"tz":"+02:00",
"sunrise":"2023-03-28T05:37:14",
"sunset":"2023-03-28T18:01:37",
"irradiance":{
"daily":[
{
"clear_sky":{
"ghi":6383.04,
"dni":8319.8,
"dhi":1201.07
},
"cloudy_sky":{
"ghi":5836.23,
"dni":6776.87,
"dhi":1584.37
}
}
],
"hourly":[
{
"hour":0,
"clear_sky":{
"ghi":0,
"dni":0,
"dhi":0
},
"cloudy_sky":{
"ghi":0,
"dni":0,
"dhi":0
}
},
{
"hour":1,
"clear_sky":{
"ghi":0,
"dni":0,
"dhi":0
},
"cloudy_sky":{
"ghi":0,
"dni":0,
"dhi":0
}
},
{
"hour":2,
"clear_sky":{
"ghi":0,
"dni":0,
"dhi":0
},
"cloudy_sky":{
"ghi":0,
"dni":0,
"dhi":0
}
},
{
"hour":3,
"clear_sky":{
"ghi":0,
"dni":0,
"dhi":0
},
"cloudy_sky":{
"ghi":0,
"dni":0,
"dhi":0
}
},
{
"hour":4,
"clear_sky":{
"ghi":0,
"dni":0,
"dhi":0
},
"cloudy_sky":{
"ghi":0,
"dni":0,
"dhi":0
}
},
{
"hour":5,
"clear_sky":{
"ghi":0,
"dni":0,
"dhi":0
},
"cloudy_sky":{
"ghi":0,
"dni":0,
"dhi":0
}
},
{
"hour":6,
"clear_sky":{
"ghi":4.25,
"dni":0.73,
"dhi":3.52
},
"cloudy_sky":{
"ghi":3.43,
"dni":0.41,
"dhi":3.02
}
},
{
"hour":7,
"clear_sky":{
"ghi":115.4,
"dni":378.23,
"dhi":48.82
},
"cloudy_sky":{
"ghi":90.79,
"dni":247.14,
"dhi":47.29
}
},
{
"hour":8,
"clear_sky":{
"ghi":319.36,
"dni":610.29,
"dhi":86.67
},
"cloudy_sky":{
"ghi":261.01,
"dni":369.79,
"dhi":120.02
}
},
{
"hour":9,
"clear_sky":{
"ghi":524.55,
"dni":740.47,
"dhi":107.61
},
"cloudy_sky":{
"ghi":398.92,
"dni":360.05,
"dhi":196.18
}
},
{
"hour":10,
"clear_sky":{
"ghi":693.76,
"dni":807.95,
"dhi":121.26
},
"cloudy_sky":{
"ghi":520.28,
"dni":378.22,
"dhi":252.28
}
},
{
"hour":11,
"clear_sky":{
"ghi":813.42,
"dni":847.94,
"dhi":128.46
},
"cloudy_sky":{
"ghi":730.2,
"dni":667.45,
"dhi":191.04
}
},
{
"hour":12,
"clear_sky":{
"ghi":870.88,
"dni":865.74,
"dhi":131.59
},
"cloudy_sky":{
"ghi":829.87,
"dni":787.48,
"dhi":157.4
}
},
{
"hour":13,
"clear_sky":{
"ghi":859.56,
"dni":863.79,
"dhi":130.63
},
"cloudy_sky":{
"ghi":826.31,
"dni":784.68,
"dhi":164.14
}
},
{
"hour":14,
"clear_sky":{
"ghi":780.46,
"dni":842.11,
"dhi":125.07
},
"cloudy_sky":{
"ghi":775.24,
"dni":825.45,
"dhi":132.8
}
},
{
"hour":15,
"clear_sky":{
"ghi":641.16,
"dni":794.85,
"dhi":115.22
},
"cloudy_sky":{
"ghi":639.98,
"dni":789.39,
"dhi":117.65
}
},
{
"hour":16,
"clear_sky":{
"ghi":455.48,
"dni":708.64,
"dhi":99.7
},
"cloudy_sky":{
"ghi":455.36,
"dni":708,
"dhi":99.89
}
},
{
"hour":17,
"clear_sky":{
"ghi":246.01,
"dni":551.11,
"dhi":74.9
},
"cloudy_sky":{
"ghi":246.08,
"dni":550.99,
"dhi":75
}
},
{
"hour":18,
"clear_sky":{
"ghi":58.76,
"dni":307.97,
"dhi":27.63
},
"cloudy_sky":{
"ghi":58.76,
"dni":307.8,
"dhi":27.64
}
},
{
"hour":19,
"clear_sky":{
"ghi":0,
"dni":0,
"dhi":0
},
"cloudy_sky":{
"ghi":0,
"dni":0,
"dhi":0
}
},
{
"hour":20,
"clear_sky":{
"ghi":0,
"dni":0,
"dhi":0
},
"cloudy_sky":{
"ghi":0,
"dni":0,
"dhi":0
}
},
{
"hour":21,
"clear_sky":{
"ghi":0,
"dni":0,
"dhi":0
},
"cloudy_sky":{
"ghi":0,
"dni":0,
"dhi":0
}
},
{
"hour":22,
"clear_sky":{
"ghi":0,
"dni":0,
"dhi":0
},
"cloudy_sky":{
"ghi":0,
"dni":0,
"dhi":0
}
},
{
"hour":23,
"clear_sky":{
"ghi":0,
"dni":0,
"dhi":0
},
"cloudy_sky":{
"ghi":0,
"dni":0,
"dhi":0
}
}
]
}
}Fields in API response
latLatitude of the location,decimal (−90; 90)lonLongitude of the location,decimal (-180; 180)dateDate specified in the API request in the `YYYY-MM-DD` format (from 1979-01-01 up to +15 days to the current date)tzTimezone in the ±XX:XX formatsunriseDate 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 responsesunsetDate 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 responseirradianceIrradiance related informationdailyDaily aggregated irradiation data for the requested dateclear skyclear sky modelghiClear sky GHI - Global Horizontal Irradiation, Wh/m2dniClear sky DNI - Direct Normal Irradiation, Wh/m2dhiClear sky DHI - Diffuse Horizontal Irradiation, Wh/m2cloud skycloudy sky modelghiCloudy sky GHI - Global Horizontal Irradiation, Wh/m2dniCloudy sky DNI - Direct Normal Irradiation, Wh/m2dhiCloudy sky DHI - Diffuse Horizontal Irradiation, Wh/m2hourlyHourly detalization of daily aggregated irradiation data for the requested datehourthe ordinal number of the hour of start for which the energy is summed up. The parameter can take integer values from 0 to 23clear skyclear sky modelghiClear sky GHI - Global Horizontal Irradiation, Wh/m2dniClear sky DNI - Direct Normal Irradiation, Wh/m2dhiClear sky DHI - Diffuse Horizontal Irradiation, Wh/m2cloudy skycloudy sky modelghiCloudy sky GHI - Global Horizontal Irradiation, Wh/m2dniCloudy sky DNI - Direct Normal Irradiation, Wh/m2dhiCloudy sky DHI - Diffuse Horizontal Irradiation, Wh/m2
Bulk downloading
You can get the entire available historical solar irradiance archive in CSV and JSON formats:
- Solar Irradiance History Bulk - archive for 47+ years with 15-minutes and 1-hour steps, available from January 1979.
- Solar Irradiance History Forecast Bulk - archive of previously made 16 days ahead forecasts on solar irradiance data with 1-hour step (15-minutes step by request), available from April, 2017.
You can find prices on the corresponding page.
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
{
"code": "400",
"message": "Invalid date format",
"parameters": [
"date"
]
}codeCode of errormessageDescription of errorparameters(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

API calls return an error 401

API calls return an error 404

API calls return an error 429

API calls return errors '5xx'

Pay as you call
There are no limits on the number of API calls, users pay for a subscription according to the actual use of the product.
per API call
Any location | No API call limits | Pay-as-you-call
For large-scale projects, we provide a variety of custom packages. Please get in touch with us with your requirements to learn more.