Shows historic measurements of nearest Dutch weatherstation for specified date and location.
Data source is the Royal Netherlands Meteorological Institute, specifically:
https://api.openarchieven.nl/1.0/related/weather.json
GET
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Date in format YYYY-MM-DD. | |
| longitude | Yes | Longitude to search for nearest weatherstation (eg. 52.1) | |
| latitude | Yes | Latitude to search for nearest weatherstation (eg. 4.3) | |
| lang | No | Language code (nl for Dutch, en for English) to be used for data labels. | nl |
| callback | No | Function name to be called on JSON data (JSONP). |
The output is in JSON. It's an array of hashes with weather measurements. Each field within these hashes has a value and an descriptive label. Some values are coded, in that case a decoded value is also provided. Be ware, this API exposes several types of historical datasets, this means the types of measurements as well as the units can vary!
Example: https://api.openarchieven.nl/1.0/related/weather.php?date=1748-12-06&longitude=52.1&latitude=4.3 outputs (pretty-printed):
[
{
"WW": {
"value": "GEHBET",
"decoded": "geheel betrokken"
},
"T": {
"value": 88.8888888889
},
"P": {
"value": "29111"
},
"rijnland": 1,
"DD": {
"value": "WTN"
},
"YYYYMMDD": {
"value": "17481206"
},
"STN_LOC": {
"longitude": 52.38,
"latitude": 4.73
},
"M": {
"value": "1"
},
"FH": {
"value": "20"
},
"STN": {
"value": "42"
},
"STN_URL": {
"value": "http:\/\/www.knmi.nl\/klimatologie\/metadata\/042_zwanenburg.html",
"label": "URL meer informatie over weerstation"
},
"STN_PLACE": {
"value": "Zwanenburg",
"label": "Plaats"
}
},
{
"WW": {
"value": "GEHBET",
"decoded": "geheel betrokken"
},
"T": {
"value": 94.4444444444
},
"P": {
"value": "29112"
},
"rijnland": 1,
"DD": {
"value": "WTN"
},
"YYYYMMDD": {
"value": "17481206"
},
"STN_LOC": {
"longitude": 52.38,
"latitude": 4.73
},
"M": {
"value": "2"
},
"FH": {
"value": "40"
},
"STN": {
"value": "42"
},
"STN_URL": {
"value": "http:\/\/www.knmi.nl\/klimatologie\/metadata\/042_zwanenburg.html",
"label": "URL meer informatie over weerstation"
},
"STN_PLACE": {
"value": "Zwanenburg",
"label": "Plaats"
}
},
{
"WW": {
"value": "GEHBET",
"decoded": "geheel betrokken"
},
"T": {
"value": 77.7777777778
},
"P": {
"value": "29101"
},
"rijnland": 1,
"DD": {
"value": "WTZ"
},
"YYYYMMDD": {
"value": "17481206"
},
"STN_LOC": {
"longitude": 52.38,
"latitude": 4.73
},
"M": {
"value": "3"
},
"FH": {
"value": "60"
},
"STN": {
"value": "42"
},
"STN_URL": {
"value": "http:\/\/www.knmi.nl\/klimatologie\/metadata\/042_zwanenburg.html",
"label": "URL meer informatie over weerstation"
},
"STN_PLACE": {
"value": "Zwanenburg",
"label": "Plaats"
}
}
]
One of the following errors may be thrown:
| Error code | Error message |
|---|---|
| 4 | Invalid lang |
| 29 | Invalid date (syntax) |
| 30 | Missing date |
| 31 | Invalid longitude (syntax) |
| 32 | Missing longitude |
| 33 | Invalid latitude (syntax) |
| 34 | Missing latitude |
An example error looks (pretty-printed) like:
{
"error_code": 4,
"error_description": "Invalid lang"
}
Zoek uw voorouders en publiceer uw stamboom op Genealogie Online via https://www.genealogieonline.nl/