Skip to main content

Hourly Data

This endpoint provides historical hourly observations for any geographic location. Furthermore, gaps in the time series can be filled in with statistically optimized model data. The data provided through this endpoint is aggregated from multiple governmental interfaces.

Hourly observations are coming in with an offset of about two to three hours. However, some data might be added multiple days or even months later, depending on how the different weather services are updating their datasets.

Hourly data can be queried for a maximum of 30 days per request.

Endpoint

Hourly data is provided through this endpoint:

GET https://meteostat.p.rapidapi.com/point/hourly

Parameters

In order to query data for any location you’ll need to specify the lat and lon parameters. You will probably also want to add the alt parameter to your request to make the output more precise. If you do not set the alt parameter, Meteostat will detect the elevation using nearby weather stations.

ParameterDescriptionTypeRequiredDefault
latThe latitude of the geographic locationFloatYesundefined
lonThe longitude of the geographic locationFloatYesundefined
altThe elevation of the geographic locationIntegerNonull
startThe start date of the query (YYYY-MM-DD)StringYesundefined
endThe end date of the query (YYYY-MM-DD)StringYesundefined
tzThe time zone according to the tz databaseStringNoUTC
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
timeTime (YYYY-MM-DD hh:mm:ss) of observationString
tempThe air temperature in °CFloat
dwptThe dew point in °CFloat
rhumThe relative humidity in percent (%)Integer
prcpThe one hour precipitation total in mmFloat
snowThe snow depth in mmInteger
wdirThe wind direction in degrees (°)Integer
wspdThe average wind speed in km/hFloat
wpgtThe peak wind gust in km/hFloat
presThe sea-level air pressure in hPaFloat
tsunThe one hour sunshine total in minutes (m)Integer
cocoThe weather condition codeInteger

More information on the data formats and weather condition codes 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/point/hourly?lat=43.6667&lon=-79.4&start=2020-01-01&end=2020-01-01&alt=113&tz=America%2FToronto' \
--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 hour. Have a look at this example:

{
"time": "2019-12-31 23:00:00",
"temp": 1.6,
"dwpt": 0.1,
"rhum": 90,
"prcp": 0,
"snow": 0,
"wdir": 300,
"wspd": 5,
"wpgt": 10,
"pres": 1036.4,
"tsun": 0,
"coco": 4
}