Skip to main content

Monthly Data

This endpoint provides historical monthly statistics for a particular weather station. The data provided through this endpoint is aggregated from multiple governmental interfaces.

Monthly data is coming in with an offset of multiple months. Additionally, Meteostat aggregates monthly data from hourly observations, daily records and model data.

Endpoint

Monthly data is provided through this endpoint:

GET https://meteostat.p.rapidapi.com/stations/monthly

Parameters

When calling this endpoint please refer to the following parameters.

ParameterDescriptionTypeRequiredDefault
stationThe weather station IDStringYesundefined
startThe start date of the query (YYYY-MM-DD)StringYesundefined
endThe end date of the query (YYYY-MM-DD)StringYesundefined
modelSubstitute missing records with statistically optimized model dataStringNotrue
freqThe time frequency of the records. Can be used for custom aggregationStringNonull
unitsThe unit system of the meteorological parametersStringNometric

For full specification of available frequencies, defined by the freq parameter, please see here.

The units parameter takes one of the following values:

  • metric (Celsius, Millimeters, Kilometers per hour)
  • imperial (Fahrenheit, Inches, Miles per hour)
  • scientific (Kelvin, Millimeters, Meters per second)

Response

The response body includes the following properties. Please note that all units mentioned below refer to the default units setting.

ParameterDescriptionType
dateThe first date (YYYY-MM-DD) of the monthString
tavgThe average daily air temperature in °CFloat
tminThe average daily minimum air temperature in °CFloat
tmaxThe average daily maximum air temperature in °CFloat
prcpThe monthly precipitation total in mmFloat
snowThe maximum snow depth in mmInteger
wdirThe average wind direction in degrees (°)Integer
wspdThe average wind speed in km/hFloat
wpgtThe peak wind gust in km/hFloat
presThe average sea-level air pressure in hPaFloat
tsunThe monthly sunshine total in minutes (m)Integer

More information about the data format is available here.

Example

The following example requires the cURL command-line interface. Alternatively, you can use an API client like Postman.

curl --request GET \
--url 'https://meteostat.p.rapidapi.com/stations/monthly?station=10637&start=2020-01-01&end=2020-12-31' \
--header 'x-rapidapi-host: meteostat.p.rapidapi.com' \
--header 'x-rapidapi-key: {key}'

Please replace {key} with your personal API key.

Data Response

The data output returns one object per month. Have a look at this example:

{
"date": "2020-01-01",
"tavg": 4.1,
"tmin": 1,
"tmax": 7,
"prcp": 37,
"snow": 0,
"wdir": 191.3,
"wspd": 11.2,
"wpgt": 77,
"pres": 1025.2,
"tsun": 3300
}