Open Archives API » Related/Weather

Shows historic measurements of nearest Dutch weatherstation for specified date and location.

Data source is the Royal Netherlands Meteorological Institute, specifically:

URL

https://api.openarchieven.nl/1.0/related/weather.json

Method

GET

Input

NameRequiredDescriptionDefault
dateYesDate in format YYYY-MM-DD.
longitudeYesLongitude to search for nearest weatherstation (eg. 52.1)
latitudeYesLatitude to search for nearest weatherstation (eg. 4.3)
langNoLanguage code (nl for Dutch, en for English) to be used for data labels.nl
callbackNoFunction name to be called on JSON data (JSONP).

Output

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"
		}
	}
]

Errors

One of the following errors may be thrown:

Error codeError message
4Invalid lang
29Invalid date (syntax)
30Missing date
31Invalid longitude (syntax)
32Missing longitude
33Invalid latitude (syntax)
34Missing latitude

An example error looks (pretty-printed) like:

{
	"error_code": 4,
	"error_description": "Invalid lang"
}

Back to API documentation

Find your ancestors and publish your family tree on Genealogy Online via https://www.genealogieonline.nl/en/