API Response

The API will respond with the requested data. If your requested location does not exactly match a grid point of the forecasting system, the API will automatically interpolate the requested location. The same will happen for any requested date which does not match a valid date of the model. A temporally interpolated value between the two closest available valid dates will be returned.

Please note that the returned weather data is likely to have changed if the same request is queried again later, such as when a newer run of the forecasting system becomes available.

CSV

CSV1 is the simplest option to query data. It is a semicolon separated list.

CSV Examples

Temperature and relative humidity time series

Query:

https://api.meteomatics.com/insert_current_dateT13:35:00ZP1D:PT3H/t_2m:C,relative_humidity_2m:p/47.423336,9.377225/csv

Reply:

validdate;t_2m:C;relative_humidity_2m:p
2016-01-20T13:35:00Z;-0.829;99.2
2016-01-20T16:35:00Z;-1.574;99.3
2016-01-20T19:35:00Z;-2.167;99
2016-01-20T22:35:00Z;-2.367;98.6
2016-01-21T01:35:00Z;-3.162;95.5
2016-01-21T04:35:00Z;-3.893;75.1
2016-01-21T07:35:00Z;-4.625;79.3
2016-01-21T10:35:00Z;-5.357;100
2016-01-21T13:35:00Z;-6.088;100

Temperature geographical region

Query:

https://api.meteomatics.com/insert_current_dateT12:00:00Z/t_2m:C/90,-180_-90,180:10x10/csv

Please note that when querying a grid, the first column in the reply corresponds to the latitudes, the first row after the header corresponds to the longitudes.

Reply:

validdate;2016-12-19 12:00:00
parameter;t_2m:C
data;-180;-140;-100;-60;-20;20;60;100;140;180
90;-15.286;-15.286;-15.286;-15.286;-15.286;-15.286;-15.286;-15.286;-15.286;-15.286
70;-8.161;-16.942;-24.255;-16.692;-0.567;7.3;-22.192;-38.973;-22.411;-8.036
50;2.8;7.1;-6.098;-9.755;9;0.963;-9.348;-15.13;-19.973;2.8
30;20.7;18.8;-5.755;22.1;18.2;16.6;12.5;-3.848;18.2;20.7
10;26.4;26;26.8;27.4;26.7;34.8;26.7;27.8;27.2;26.4
-10;27.1;27;22.5;22.7;24.6;27.4;27.3;27.2;27.9;27.4
-30;21.7;21.9;20.1;22.8;19.7;34.2;22.9;18.7;25.2;21.6
-50;9.7;9.3;8.1;12.2;4.1;1.7;3.7;7.9;8.8;9.7
-70;-1.505;-0.348;-3.13;0.308;-2.036;-2.411;-18.348;-16.411;-25.317;-1.473
-90;-25.63;-25.63;-25.63;-25.63;-25.63;-25.63;-25.63;-25.63;-25.63;-25.63

Route query

The following query provides you the temperature and precipitation along a route from St. Gallen (ZIP code 9000) via Zurich (ZIP code 8000) to Basel (ZIP code 4000), when you start now, arrive in Zurich in 1 hour and arrive in Basel in 2 hours from now:

Query:

http://api.meteomatics.com/now,now+1H,now+2H/t_2m:C,precip_1h:mm/postal_CH9000_postal_CH8000+postal_CH4000/csv?route=true

Response:

lat;lon;validdate;t_2m:C;precip_1h:mm
47.4239;9.3748;2018-10-23T15:47:46Z;10.9;0.02
47.3828;8.5307;2018-10-23T16:47:46Z;12.5;0.00
47.5577;7.5936;2018-10-23T17:47:46Z;13.0;0.00

JSON

JSON2 is a tree representation allowing for example an easy integration into web applications. It is both machine and human readable. The data is ordered first by parameter, then by coordinate and finally by time, providing continuous time series for each location for all parameters.

JSON Examples

Temperature and relative humidity between two times at two locations

Query:

https://api.meteomatics.com/insert_current_dateT00:00:00ZP2D:P1D/t_2m:C,relative_humidity_2m:p/50,10+40,20/json

Reply:

{
  "version" : "3.0",
  "user" : "internal-api-beta-user",
  "dateGenerated" : "2016-12-23T15:24:07Z",
  "status" : "OK",
  "data" : [ {
    "parameter" : "t_2m:C",
    "coordinates" : [ {
      "lat" : 50,
      "lon" : 10,
      "dates" : [ {
        "date" : "2016-12-20T00:00:00Z",
        "value" : -1.18699,
      }, {
        "date" : "2016-12-21T00:00:00Z",
        "value" : -2.58338,
      }, {
        "date" : "2016-12-22T00:00:00Z",
        "value" : 0.0499817,
      } ]
    }, {
      "lat" : 40,
      "lon" : 20,
      "dates" : [ {
        "date" : "2016-12-20T00:00:00Z",
        "value" : -0.186987,
      }, {
        "date" : "2016-12-21T00:00:00Z",
        "value" : -0.0833496,
      }, {
        "date" : "2016-12-22T00:00:00Z",
        "value" : 1.04998,
      } ]
    } ]
  }, {
    "parameter" : "relative_humidity_2m:p",
    "coordinates" : [ {
      "lat" : 50,
      "lon" : 10,
      "dates" : [ {
        "date" : "2016-12-20T00:00:00Z",
        "value" : 98.0471,
      }, {
        "date" : "2016-12-21T00:00:00Z",
        "value" : 94.6451,
      }, {
        "date" : "2016-12-22T00:00:00Z",
        "value" : 96.7655,
      } ]
    }, {
      "lat" : 40,
      "lon" : 20,
      "dates" : [ {
        "date" : "2016-12-20T00:00:00Z",
        "value" : 77.4957,
      }, {
        "date" : "2016-12-21T00:00:00Z",
        "value" : 78.3308,
      }, {
        "date" : "2016-12-22T00:00:00Z",
        "value" : 64.9726,
      } ]
    } ]
  } ]
}

Route query

Query:

https://api.meteomatics.com/todayT12ZPT1H:PT30M/t_2m:C,wind_speed_10m:ms/47,9_45,7:3/json?route=true

Response:

{
  "version": "3.0",
  "user": "internal-api-beta-user",
  "dateGenerated": "2018-10-19T09:13:04Z",
  "status": "OK",
  "data": [
    {
      "lat": 47,
      "lon": 9,
      "date": "2018-10-19T12:00:00Z",
      "parameters": [
        {"parameter": "t_2m:C", "value": 3.9},
        {"parameter": "wind_speed_10m:ms", "value": 1.4}
      ]
    },
    {
      "lat": 46,
      "lon": 8,
      "date": "2018-10-19T12:30:00Z",
      "parameters": [
        {"parameter": "t_2m:C", "value": 5.5},
        {"parameter": "wind_speed_10m:ms", "value": 0.8}
      ]
    },
    {
      "lat": 45,
      "lon": 7,
      "date": "2018-10-19T13:00:00Z",
      "parameters": [
        {"parameter": "t_2m:C", "value": 9.3},
        {"parameter": "wind_speed_10m:ms", "value": 2.0}
      ]
    }
  ]
}

XML

XML3 is another well established tree representation commonly used in web development. It is both machine and human readable.

XML Examples

Temperature and relative humidity between two times in a region

Query:

https://api.meteomatics.com/insert_current_dateT00:00:00ZP2D:P1D/t_2m:C/50,10_40,20:2x2/xml

Reply:

<?xml version="1.0" encoding="utf-8"?>
<meteomatics-api-response version="3.0">
  <user>internal-api-beta-user</user>
  <dateGenerated>2016-12-23T15:29:35Z</dateGenerated>
  <status>OK</status>
  <data>
    <parameter name="t_2m:C">
    <location lat="40" lon="10">
      <value date="2016-12-20T00:00:00Z">
        16.563
      </value>
      <value date="2016-12-21T00:00:00Z">
        16.6667
      </value>
      <value date="2016-12-22T00:00:00Z">
        16.925
      </value>
    </location>
    <location lat="40" lon="20">
      <value date="2016-12-20T00:00:00Z">
        -0.186987
      </value>
      <value date="2016-12-21T00:00:00Z">
        -0.0833496
      </value>
      <value date="2016-12-22T00:00:00Z">
        1.04998
      </value>
    </location>
    <location lat="50" lon="10">
      <value date="2016-12-20T00:00:00Z">
        -1.18699
      </value>
      <value date="2016-12-21T00:00:00Z">
        -2.58338
      </value>
      <value date="2016-12-22T00:00:00Z">
        0.0499817
      </value>
    </location>
    <location lat="50" lon="20">
      <value date="2016-12-20T00:00:00Z">
        -2.06199
      </value>
      <value date="2016-12-21T00:00:00Z">
        -1.08335
      </value>
      <value date="2016-12-22T00:00:00Z">
        -2.45002
      </value>
    </location>
  </parameter>
</data>
</meteomatics-api-response>

Route query

Query:

https://api.meteomatics.com/todayT12ZPT1H:PT30M/t_2m:C,wind_speed_10m:ms,elevation:m/47,9_45,7:3/xml?route=true

Response:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<meteomatics-api-response version="3.0">
  <user>internal-api-beta-user</user>
  <dateGenerated>2018-10-19T09:02:22Z</dateGenerated>
  <status>OK</status>
  <data>
    <location lat="47" lon="9" date="2018-10-19T12:00:00Z">
        <parameter name="t_2m:C">3.9</parameter>
        <parameter name="wind_speed_10m:ms">1.4</parameter>
        <parameter name="elevation:m">2850.0</parameter>
    </location>
    <location lat="46" lon="8" date="2018-10-19T12:30:00Z">
        <parameter name="t_2m:C">5.5</parameter>
        <parameter name="wind_speed_10m:ms">0.8</parameter>
        <parameter name="elevation:m">2574.0</parameter>
    </location>
    <location lat="45" lon="7" date="2018-10-19T13:00:00Z">
        <parameter name="t_2m:C">9.3</parameter>
        <parameter name="wind_speed_10m:ms">2.0</parameter>
        <parameter name="elevation:m">2442.0</parameter>
    </location>
  </data>
</meteomatics-api-response>

PNG

PNG Examples

Temperature global

https://api.meteomatics.com/insert_current_dateT12:00:00Z/t_2m:C/90,-180_-90,180:600x400/png

Solar radiation global

https://api.meteomatics.com/insert_current_dateT12:00:00Z/global_rad:W/90,-180_-90,180:600x400/png

Temperature in the Alps

https://api.meteomatics.com/insert_current_dateT12:00:00Z/t_2m:C/50,0_40,20:600x400/png

HTML

HTML Example

Time series: temperature at different altitudes

https://api.meteomatics.com/insert_current_dateT00:00:00ZP5D:PT1H/t_2m:C,t_0m:C,t_500hPa:C,t_700hPa:C/47.427660,9.378648/html

Interactive PNG: temperature at different altitudes

https://api.meteomatics.com/insert_current_dateT00:00:00Z/t_2m:C/50,10_40,20:0.01,0.01/html

(Hover over the image to see the value below the cursor.)

HTML-Map

HTML-Map Example

A single parameter overlay showing the global wind speed

http://api.meteomatics.com/now/wind_speed_10m:ms/global:0.5,0.5/html_map

Two parameters in one map, showing precipitation and hail

http://api.meteomatics.com/2018-08-08T16Z/precip_5min:mm,hail:idx/47.6,7.2_47.2,8:0.001,0.001/html_map

NetCDF

NetCDF Example

Global temperature for a full day with a step size of one hour

https://api.meteomatics.com/insert_current_dateT00:00:00ZP1D:PT1H/t_2m:C/90,-180_-90,180:600x400/netcdf

Geopotential Height at 500hPa for 10 days

https://api.meteomatics.com/insert_current_dateT12:00:00ZP8D:P1D/gh_500hPa:m/90,-180_-90,180:600x400/netcdf

GrADS

GrADS plots can be created for the following parameters:

A few points which are specific to GrADS plots:

GrADS Examples

Temperature and Geopotential Height

https://api.meteomatics.com/insert_current_dateZ/t_500hPa:C,gh_500hPa:m/north-america/grads?model=ecmwf-ifs

https://api.meteomatics.com/insert_current_dateZ/t_300hPa:C,gh_300hPa:m/56,0_36,23:1000x1000/grads?model=ukmo-euro4

Temperature at 2m

https://api.meteomatics.com/insert_current_dateZ/t_2m:C/europe/grads?model=ncep-gfs

https://api.meteomatics.com/insert_current_dateZ/t_2m:C/44,-12_35,5/grads?model=cmc-gem

Precipitation

https://api.meteomatics.com/insert_current_dateZ/precip_12h:mm/asia/grads?model=ecmwf-ifs

https://api.meteomatics.com/insert_current_dateZ/precip_3h:mm/10,90_-15,130/grads?model=ecmwf-ifs

Cloud Cover

https://api.meteomatics.com/insert_current_dateZ/total_cloud_cover:p/africa/grads?model=ecmwf-ifs

https://api.meteomatics.com/insert_current_dateZ/low_cloud_cover:p/-20,5_-40,40/grads?model=ecmwf-ifs

Wind Speed and Direction

https://api.meteomatics.com/insert_current_dateZ/wind_speed_u_100m:ms,wind_speed_v_100m:ms/australia/grads?model=ecmwf-ifs

https://api.meteomatics.com/insert_current_dateZ/wind_speed_u_10m:ms,wind_speed_v_10m:ms/55,5_47,17/grads?model=ecmwf-ifs

Wind Power

https://api.meteomatics.com/insert_current_dateZ/wind_power_turbine_enercon_e82_3000_hub_height_110m:MW/52,5_45,12:100x100/grads?model=ukmo-euro4

Waves and Mean Sea Level Pressure

https://api.meteomatics.com/insert_current_dateZ/significant_wave_height:m,msl_pressure:hPa/north-atlantic/grads?model=ecmwf-wam

https://api.meteomatics.com/insert_current_dateZ/peak_wave_period:s,msl_pressure:hPa/world/grads?model=ecmwf-wam

Reserved Values

The values -999, -888, -777 and -666 are reserved throughout the whole API. If you receive any of these values, the data is either not applicable or not available:

Value Meaning
-999: data is not available (this rarely occurs, if so, try another source)
-888: parameter specific reserved value (check the description of the corresponding parameter, e.g. sunset if the sun does not set at the queried location and time)
-777: parameter specific reserved value (check the description of the corresponding parameter, e.g. sunrise if the sun does not rise at the queried location and time)
-666: data not applicable (e.g. cloud top temperature if there are no clouds)

These invalid reserved values are plotted transparent in image formats.

Footnotes

  1. Comma Separated Value: https://en.wikipedia.org/wiki/Comma-separated_values
  2. JavaScript Object Notation: http://www.json.org
  3. Extensible Markup Language: https://www.w3.org/TR/REC-xml/

News