JSON
JSON1 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.
The output format has to be set to json
.
-
Time series for temperature and relative humidity at two locations:
https://api.meteomatics.com/2024-12-19T00:00:00Z--2024-12-19T03:00:00Z:PT1H/t_2m:C,relative_humidity_2m:p/50.23,10.23+40.23,20.12/json
Response:{ "version": "3.0", "user": "user", "dateGenerated": "2021-09-20T09:01:10Z", "status": "OK", "data": [ { "parameter": "t_2m:C", "coordinates": [ { "lat": 50.23, "lon": 10.23, "dates": [ { "date": "2021-09-20T00:00:00Z", "value": 10 }, { "date": "2021-09-20T01:00:00Z", "value": 9 }, { "date": "2021-09-20T02:00:00Z", "value": 9.4 }, { "date": "2021-09-20T03:00:00Z", "value": 9.4 } ] }, { "lat": 40.23, "lon": 20.12, "dates": [ { "date": "2021-09-20T00:00:00Z", "value": 18.2 }, { "date": "2021-09-20T01:00:00Z", "value": 18.1 }, { "date": "2021-09-20T02:00:00Z", "value": 17.6 }, { "date": "2021-09-20T03:00:00Z", "value": 17.2 } ] } ] }, { "parameter": "relative_humidity_2m:p", "coordinates": [ { "lat": 50.23, "lon": 10.23, "dates": [ { "date": "2021-09-20T00:00:00Z", "value": 77.6 }, { "date": "2021-09-20T01:00:00Z", "value": 79.8 }, { "date": "2021-09-20T02:00:00Z", "value": 78 }, { "date": "2021-09-20T03:00:00Z", "value": 78.1 } ] }, { "lat": 40.23, "lon": 20.12, "dates": [ { "date": "2021-09-20T00:00:00Z", "value": 99.9 }, { "date": "2021-09-20T01:00:00Z", "value": 97.7 }, { "date": "2021-09-20T02:00:00Z", "value": 97.5 }, { "date": "2021-09-20T03:00:00Z", "value": 98.3 } ] } ] } ] }
-
Route query:
https://api.meteomatics.com/2024-12-19T12Z,2024-12-19T13Z,2024-12-19T14Z,2024-12-19T15Z/t_2m:C,precip_1h:mm,sunshine_duration_1h:min/47.423938,9.3728583+47.499419,8.7265173+47.3819673,8.5306616+46.949911,7.4300993/json?route=true
Response:{ "version": "3.0", "user": "internal-api-beta-user", "dateGenerated": "2021-02-05T14:06:38Z", "status": "OK", "data": [ { "lat": 47.42394, "lon": 9.372858, "date": "2021-02-05T12:00:00Z", "parameters": [ { "parameter": "t_2m:C", "value": 9.8 }, { "parameter": "precip_1h:mm", "value": 0 }, { "parameter": "sunshine_duration_1h:min", "value": 60 } ] }, { "lat": 47.49942, "lon": 8.726517, "date": "2021-02-05T13:00:00Z", "parameters": [ { "parameter": "t_2m:C", "value": 11.5 }, { "parameter": "precip_1h:mm", "value": 0 }, { "parameter": "sunshine_duration_1h:min", "value": 60 } ] }, { "lat": 47.381966, "lon": 8.530662, "date": "2021-02-05T14:00:00Z", "parameters": [ { "parameter": "t_2m:C", "value": 11.6 }, { "parameter": "precip_1h:mm", "value": 0 }, { "parameter": "sunshine_duration_1h:min", "value": 4 } ] }, { "lat": 46.94991, "lon": 7.430099, "date": "2021-02-05T15:00:00Z", "parameters": [ { "parameter": "t_2m:C", "value": 8.8 }, { "parameter": "precip_1h:mm", "value": 0 }, { "parameter": "sunshine_duration_1h:min", "value": 0 } ] } ] }
Footnotes
JavaScript Object Notation: http://www.json.org