Solar Irradiance API
Loading...
Solar Irradiance API
✔ This is the latest version of the API (v2).
Looking for the previous version? You can find the v1 documentation here.
Product concept
Solar Irradiance service supplies accurate solar irradiance data for any location on the globe.
Main features of Solar Irradiance API:
You can find the previous documentation v1 here
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.
Just make an API call according to the tech documentation below, remembering to add your key to each call.
Call Solar Irradiance 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 over 1 hour, 15 minutes or 1 day interval solar radiation data for particular geographical location and for specified date.
https://api.openweathermap.org/energy/2.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: "15m" (15 minutes), "1h" (1 hour) and "1d" (1 day) |
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/2.0/solar/interval_data?lat={lat}&lon={lon}&date={date}&interval={interval}&tz={tz}&appid={API key}
Example of API call
https://api.openweathermap.org/energy/2.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.
https://api.openweathermap.org/energy/2.0/solar/interval_data?lat=51.509865&lon=-0.118092&date=2023-10-10&interval=1h&appid={API key}To view the API response, expand the example by clicking the triangle.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)interval Time 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 : 15m, 1h and 1d.tz Timezone in the ±XX:XX formatsunrise 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 responsesunset Date 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 responseintervals Interval detalization of daily aggregated irradiation data for the requested datestart Start 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" formatend End 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" formatavg_irradiance Average irradiance per periodclear sky clear sky modelghi Clear sky GHI - Global Horizontal Irradiance, W/m2dni Clear sky DNI - Direct Normal Irradiance, W/m2dhi Clear sky DHI - Diffuse Horizontal Irradiance, W/m2cloud sky cloudy sky modelghi Cloudy sky GHI - Global Horizontal Irradiance, W/m2dni Cloudy sky DNI - Direct Normal Irradiance, W/m2dhi Cloudy sky DHI - Diffuse Horizontal Irradiance, W/m2max_irradiance Maximum irradiance per periodclear sky clear sky modelghi Clear sky GHI - Global Horizontal Irradiance, W/m2dni Clear sky DNI - Direct Normal Irradiance, W/m2dhi Clear sky DHI - Diffuse Horizontal Irradiance, W/m2cloud sky cloudy sky modelghi Cloudy sky GHI - Global Horizontal Irradiance, W/m2dni Cloudy sky DNI - Direct Normal Irradiance, W/m2dhi Cloudy sky DHI - Diffuse Horizontal Irradiance, W/m2irradiation Irradiation related informationclear sky clear sky modelghi Clear sky GHI - Global Horizontal Irradiation, Wh/m2dni Clear sky DNI - Direct Normal Irradiation, Wh/m2dhi Clear sky DHI - Diffuse Horizontal Irradiation, Wh/m2cloud sky cloudy sky modelghi Cloudy sky GHI - Global Horizontal Irradiation, Wh/m2dni Cloudy sky DNI - Direct Normal Irradiation, Wh/m2dhi Cloudy sky DHI - Diffuse Horizontal Irradiation, Wh/m2Bulk downloading
You can get the entire available historical solar irradiance archive in CSV and JSON formats:
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.
{
"code": "400",
"message": "Invalid date format",
"parameters": [
"date"
]
}code Code of errormessage Description of errorparameters(optional) List of request parameters names that are related to this particular errorPlease 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.
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.