tt
),
rain (rr
),
and total cloud cover (tcc
),
the URL looks as follows:
https://api.meteotest.ch/api/v1/forecast
?lat=46.9534
&lon=7.4237
¶meters=tt,rr,tcc
&time_from=now
&time_to=+24hours
curl -G --header "Authorization: Bearer INSERT-YOUR-TOKEN" \
--data "lat=46.9534" \
--data "lon=7.4237" \
--data "parameters=tt,rr,tcc" \
--data "time_from=now" \
--data-urlencode "time_to=+6hours" \
"https://api.meteotest.ch/api/v1/forecast" | json_pp
Response:
{
"issuetime": "2022-10-24T21:30:33Z",
"timeseries": {
"frequency": "1hours",
"index": [
"2022-10-24T22:00:00Z",
"2022-10-24T23:00:00Z",
"2022-10-25T00:00:00Z",
"2022-10-25T01:00:00Z",
"2022-10-25T02:00:00Z",
"2022-10-25T03:00:00Z"
],
"values": {
"rr": [
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"tcc": [
75.0,
75.0,
75.0,
75.0,
75.0,
87.5
],
"tt": [
12.5,
12.2,
11.9,
11.6,
11.4,
11.2
]
},
"lat": 46.9534,
"lon": 7.4237,
"step_type": {
"rr": "AVERAGE",
"tcc": "AVERAGE",
"tt": "AVERAGE"
}
},
"request": {
"azimuth": 180,
"cdd_critical_temperature_outside": 35.0,
"hdd_critical_temperature_inside": 20.0,
"hdd_critical_temperature_outside": 12.0,
"horizon": null,
"inclination": 30,
"installed_capacity": null,
"lat": 46.9534,
"lon": 7.4237,
"parameters": [
{
"description": "Precipitation rate",
"shortname": "rr",
"unit": {
"description": "mm/h",
"string": "mm/h",
"uid": "mm_per_h"
}
},
{
"description": "Total cloud coverage (100% = overcast)",
"shortname": "tcc",
"unit": {
"description": "%",
"string": "%",
"uid": "percent"
}
},
{
"description": "Air temperature",
"shortname": "tt",
"unit": {
"description": "\u00b0C",
"string": "\u00b0C",
"uid": "celsius"
}
}
],
"resample_to": null,
"source": null,
"time_from": "2022-10-24T21:30:33Z",
"time_to": "2022-10-25T03:30:33Z"
}
}
If you're interested in measurements rather than forecasts, use
the same URL arguments with end point
/measurements
. Example:
curl -G --header "Authorization: Bearer INSERT-YOUR-TOKEN" \
--data "lat=46.9534" \
--data "lon=7.4237" \
--data "parameters=tt,rr,ff" \
--data "time_from=2022-09-01T00:00:00Z" \
--data "time_to=2022-10-01T00:00:00Z" \
"https://api.meteotest.ch/api/v1/measurements"
The API automatically selects the weather model (or data source for measurements) that best suits the requested location and parameters. You can query a particular weather model or data source by using the source URL argument. As an example, to query the ICON1 model for Switzerland, set
&source=icon1-switzerland
The API provides several parameters relevant for the monitoring and operation of PV plants. See parameters for a complete list of available parameters, the most important of which are
gh
(global radiation),gk
(global radiation on inclined plane), ande
(energy output per kWp installed).
curl -G --header "Authorization: Bearer INSERT-YOUR-TOKEN" \
--data "lat=46.9534" \
--data "lon=7.4237" \
--data "parameters=gh,gk,e" \
--data "inclination=30" \
--data "azimuth=180" \
--data "time_from=-24hours" \
--data "time_to=now" \
--data "source=solarsat" \
"https://api.meteotest.ch/api/v1/measurements"
When you plot the response using your favourite programming language, it would look something like this:
The API also provides satellite-based radiation nowcasting with a temporal resolution of 15 minutes. To query radiation data for the next 3 hours:
curl -G --header "Authorization: Bearer INSERT-YOUR-TOKEN" \
--data "lat=46.9534" \
--data "lon=7.4237" \
--data "parameters=gh,gk,e" \
--data "inclination=30" \
--data "azimuth=180" \
--data "time_from=now" \
--data-urlencode "time_to=+3hours" \
--data "source=cloudmove" \
"https://api.meteotest.ch/api/v1/forecast"
The default forecast with hourly resolution, i.e.,
the forecast you get when you don't specify a particular
source=
,
also provides the solar parameters.
To query radiation data for the next 72 hours:
curl -G --header "Authorization: Bearer INSERT-YOUR-TOKEN" \
--data "lat=46.9534" \
--data "lon=7.4237" \
--data "parameters=gh,gk,e" \
--data "inclination=30" \
--data "azimuth=180" \
--data "time_from=now" \
--data-urlencode "time_to=+72hours" \
"https://api.meteotest.ch/api/v1/forecast"
Fields with a ☀️ are relevant only if you request one (or several) of
the following parameters:
gk, dh, bh, dni, gh_max, e, e_total
Name | Description |
---|---|
lat
* required (number) |
query point, latitude
Example:
-90
...
90
|
lon
* required (number) |
query point, longitude
Example:
-180
...
180
|
altitude
(number) |
altitude in meters
Example:
-100
...
10000
|
parameters
* required (string) |
Comma-separated list of parameters. The following parameters are available: tt, ff, fx, dd, qff, rh, rr, sy, tcc, gh, gk, bh, dh, dni, e, e_total, hdd, cdd, gh_max.
Example:
|
time_from
* required (string) |
Start time of request.
Either
Example:
|
time_to
* required (string) |
End time of request.
See
Example:
|
resample_to
(string) |
Desired temporal resolution of response.
Format:
Example:
|
azimuth
(number) |
☀️ Azimuth of solar panel.
Conventions:
Example:
0
...
360
Default:
180
|
inclination
(number) |
☀️ Inclination of the installed panels.
0° = horizontal, 90° = vertical.
Example:
0
...
90
Default:
30
|
horizon
(string) |
☀️ 12 integer values (elevation angle in degrees) that descibre the 360° horizon of location.
The horizon is taken into account when computing special solar parameters. The 12 numbers are in the order north → east → south → west → north, i.e., 0°, 30°, 60°, ..., 300°, 330°.
Example:
|
installed_capacity
(number) |
☀️ Installed capacity of solar panel in kW, i.e., kWp (kilowatt peak).
This argument is mandatory for parameter
Example:
0
...
1000000000
|
hdd_critical_temperature_inside
(number) |
Heating degree days: Critical inside temperatur in degrees celsius.
This argument is only relevant if you request parameter
Example:
0
...
50
Default:
20
|
hdd_critical_temperature_outside
(number) |
Heating degree days: Critical outside temperatur in degrees celsius.
This argument is only relevant if you request parameter
Example:
-30
...
30
Default:
12
|
cdd_critical_temperature_outside
(number) |
Cooling degree days: Critical outside temperatur in degrees celsius.
This argument is only relevant if you request parameter
Example:
20
...
60
Default:
35
|
source
(string) |
Query forecast or measurements from a specific weather model or measurements source, respectively.
See the documentation for more details.
Example:
|
https://api.meteotest.ch/api/v1/parameters
Response:
{
"parameters": [
{
"description": "Air temperature",
"shortname": "tt",
"unit": {
"uid": "celsius",
"string": "°C",
"description": "°C"
}
},
{
"description": "dew point temperature",
"shortname": "td",
"unit": {
"uid": "celsius",
"string": "°C",
"description": "°C",
},
},
[...]
]
}
https://api.meteotest.ch/api/v1/sources
Response:
{
"sources": {
"forecast": [
{
"name": "mos-mix",
"description": "Model Output Statistics (MOS). [...]"
"bounding_boxes": [{"lower_left": {"lat": -90.0, "lon": -180.0}}],
"timerange": "NOW -30 days ... NOW +216 hours",
"title": "MOS MIX"
"parameters": [
{
"description": "Global radiation (on the horizontal plane)",
"shortname": "gh",
"unit": {
"description": "W/m²",
"string": "W/m²",
"uid": "W_per_m2"
}
},
[...]
]
},
[...]
],
"measurements": [
[...]
]
}
}
shortname | description | unit |
---|---|---|
tt | Air temperature | °C |
td | dew point temperature | °C |
rr | Precipitation rate | mm/h |
rh | Relative humidity | % |
gh | Global radiation (on the horizontal plane) | W/m² |
ff | Wind speed | km/h |
dd | Wind direction |
°
description: angle in degrees |
fx | Wind gusts | km/h |
qff | Mean sea level pressure |
hPa
description: hectopascal |
tcc | Total cloud coverage (100% = overcast) | % |
hdd | Heating degree days | °C |
cdd | Cooling degree days | °C |
sy | Weather symbol |
weather_symbol
description: Meteotest weather symbol code. 1: sunny, 2: light coverage, 3: strong coverage, 4: completely covered, 5: heat thunderstorms, 6: heavy precipitation, 7: snow fall, 8: fog, 9: sleet, 10: rain shower, 11: light precipitation, 12: snow shower, 13: front thunderstorms, 14: low stratus, 15: sleet shower. |
For solar ☀️ industry applications, the following parameters are provided:
shortname | description | unit |
---|---|---|
gh | Global radiation (on the horizontal plane) | W/m² |
gk | Global radiation on the inclined plane | W/m² |
dh | Diffuse radiation on the horizontal plane | W/m² |
bh | Direct radiation on the horizontal plane | W/m² |
dni | Direct normal irradiation | W/m² |
gh_max | Clear sky radiation | W/m² |
e | Energy output per kWp installed |
Wh/kWp
description: Wh per kW peak installed |
e_total | Total/effective energy output |
kWh
description: Kilowatt-hours |
tt | Air temperature | °C |
Model Output Statistics (MOS). The forecast is based on the global weather forecasting models IFS (ECMWF) and GFS. The output of these global models is then statistically optimised using measurement data from weather stations. MOS MIX provides forecasts with high accuracy specifically for your location. Note that, in the context of our former product suite solarwebservices.ch, MOS MIX was called "SolarForecast" ☀️. Updated on an hourly basis.
Usage:
&source=mos-mix
Frequency: 1 hours
Temporal range: NOW -30 days ... NOW +216 hours
Available parameters:
bh
:
Direct radiation on the horizontal plane [W/m²]
cdd
:
Cooling degree days [°C]
dd
:
Wind direction [°]
dh
:
Diffuse radiation on the horizontal plane [W/m²]
dni
:
Direct normal irradiation [W/m²]
e
:
Energy output per kWp installed [Wh/kWp]
e_total
:
Total/effective energy output [kWh]
ff
:
Wind speed [km/h]
fx
:
Wind gusts [km/h]
gh
:
Global radiation (on the horizontal plane) [W/m²]
gh_max
:
Clear sky radiation [W/m²]
gk
:
Global radiation on the inclined plane [W/m²]
hdd
:
Heating degree days [°C]
qff
:
Mean sea level pressure [hPa]
rh
:
Relative humidity [%]
rr
:
Precipitation rate [mm/h]
sy
:
Weather symbol [weather_symbol]
tcc
:
Total cloud coverage (100% = overcast) [%]
td
:
dew point temperature [°C]
tt
:
Air temperature [°C]
Bounding box:
Latest generation weather model with a spatial resolution of 1km. Run by MeteoSwiss. Updated every 3 hours.
Usage:
&source=icon1-switzerland
Frequency: 1 hours
Temporal range: NOW -2 hours ... NOW +30 hours
Available parameters:
bh
:
Direct radiation on the horizontal plane [W/m²]
cdd
:
Cooling degree days [°C]
dd
:
Wind direction [°]
dh
:
Diffuse radiation on the horizontal plane [W/m²]
dni
:
Direct normal irradiation [W/m²]
e
:
Energy output per kWp installed [Wh/kWp]
e_total
:
Total/effective energy output [kWh]
ff
:
Wind speed [km/h]
fx
:
Wind gusts [km/h]
gh
:
Global radiation (on the horizontal plane) [W/m²]
gh_max
:
Clear sky radiation [W/m²]
gk
:
Global radiation on the inclined plane [W/m²]
hdd
:
Heating degree days [°C]
qff
:
Mean sea level pressure [hPa]
rh
:
Relative humidity [%]
rr
:
Precipitation rate [mm/h]
sy
:
Weather symbol [weather_symbol]
tcc
:
Total cloud coverage (100% = overcast) [%]
td
:
dew point temperature [°C]
tt
:
Air temperature [°C]
Bounding box:
The Global Forecast System run by the United States' National Weather Service. Updated every 3 hours.
Usage:
&source=gfs
Frequency: 3 hours
Temporal range: NOW -3 hours ... NOW +192 hours
Available parameters:
bh
:
Direct radiation on the horizontal plane [W/m²]
cdd
:
Cooling degree days [°C]
dd
:
Wind direction [°]
dh
:
Diffuse radiation on the horizontal plane [W/m²]
dni
:
Direct normal irradiation [W/m²]
e
:
Energy output per kWp installed [Wh/kWp]
e_total
:
Total/effective energy output [kWh]
ff
:
Wind speed [km/h]
fx
:
Wind gusts [km/h]
gh
:
Global radiation (on the horizontal plane) [W/m²]
gh_max
:
Clear sky radiation [W/m²]
gk
:
Global radiation on the inclined plane [W/m²]
hdd
:
Heating degree days [°C]
qff
:
Mean sea level pressure [hPa]
rh
:
Relative humidity [%]
rr
:
Precipitation rate [mm/h]
sy
:
Weather symbol [weather_symbol]
tcc
:
Total cloud coverage (100% = overcast) [%]
tt
:
Air temperature [°C]
Bounding box:
Our shortest-term forecasting system CloudMove is based on a novel forecasting concept: using wind fields from weather models, the currently measured cloudiness is propagated into the future to forecast the radiation for (almost) any location in the world. Updated every 15 minutes.
Usage:
&source=cloudmove
Frequencies: 10 minutes , 15 minutes
Temporal range: NOW -3 hours ... NOW +6 hours
Available parameters:
bh
:
Direct radiation on the horizontal plane [W/m²]
dh
:
Diffuse radiation on the horizontal plane [W/m²]
dni
:
Direct normal irradiation [W/m²]
gh
:
Global radiation (on the horizontal plane) [W/m²]
gh_max
:
Clear sky radiation [W/m²]
gk
:
Global radiation on the inclined plane [W/m²]
Bounding box:
Measurements interpolated from 160 stations run by MeteoSwiss.
Usage:
&source=swissmetnet
Frequency: 1 hours
Temporal range: 1999-01-01 ... NOW +0 minutes
Available Parameters:
bh
:
Direct radiation on the horizontal plane [W/m²]
cdd
:
Cooling degree days [°C]
dd
:
Wind direction [°]
dh
:
Diffuse radiation on the horizontal plane [W/m²]
dni
:
Direct normal irradiation [W/m²]
e
:
Energy output per kWp installed [Wh/kWp]
e_total
:
Total/effective energy output [kWh]
ff
:
Wind speed [km/h]
fx
:
Wind gusts [km/h]
gh
:
Global radiation (on the horizontal plane) [W/m²]
gh_max
:
Clear sky radiation [W/m²]
gk
:
Global radiation on the inclined plane [W/m²]
hdd
:
Heating degree days [°C]
qff
:
Mean sea level pressure [hPa]
rr
:
Precipitation rate [mm/h]
sy
:
Weather symbol [weather_symbol]
td
:
dew point temperature [°C]
tt
:
Air temperature [°C]
Bounding box(es):
SolarSat provides radiation data, independent of measurement instruments, for (almost) any location in the world.
Usage:
&source=solarsat
Frequencies: 10 minutes , 15 minutes
Temporal range: 2018-01-01 ... NOW +0 minutes
Available Parameters:
bh
:
Direct radiation on the horizontal plane [W/m²]
dh
:
Diffuse radiation on the horizontal plane [W/m²]
dni
:
Direct normal irradiation [W/m²]
gh
:
Global radiation (on the horizontal plane) [W/m²]
gh_max
:
Clear sky radiation [W/m²]
gk
:
Global radiation on the inclined plane [W/m²]
Bounding box(es):
Near real-time precipitation data based on Swiss radar stations.
Usage:
&source=radar-switzerland
Frequency: 5 minutes
Temporal range: NOW -30 days ... NOW +0 minutes
Available Parameters:
rr
:
Precipitation rate [mm/h]
Bounding box(es):