RESTful Services

Kansas Mesonet data is available in Comma Separated Value (CSV) format and can be requested through a URL with a query string. The types of available data are described below.

For permitted use and citation resoureces, please see our Data Usage Policy

Station Observations

Location: /rest/url-builder/

Description: A user can request up to 3000 records at a time (approximately 8 years of daily data for one station, or 1 year of daily data for 8 stations). The resulting CSV file contains all variables recorded for that station. Note that variables are not guaranteed to be returned in the same order from call to call. A description of variables is available here.

Usage: The URL builder tool is the simplest way to use this service and is available here.

If building the URL by hand, all of the following parameters must be included

ParameterExampleDescription
stnButler,ClayStation name or comma-separated list of names (no space after the comma). For a list of station names see below. 'all' is an accepted station name and will return data for all stations.
netKSRENetwork name, alternative to "stn". One of 'KSRE', 'BBW' or 'EBW'. Selects all stations within the network.
intdayObservation interval, one of ‘day’, ‘hour’ or ‘5min’
t_start20160101000000Timestamp of first observation: YYYYmmddHHMMSS
t_end20160201000000Timestamp of last observation: YYYYmmddHHMMSS
vars TEMP2MAVG,PRECIP Optional, comma-separated list of variables to return. (STATION and TIMESTAMP are included by default.) Variable names are available here. Note that not all variables are available for each station or interval and reducing the number of variables returned does not change the limit of 3000 records per pull.

The examples in the table would be combined to create the following URL: http://mesonet.k-state.edu/rest/stationdata/?stn=Ashland%20Bottoms&int=day&t_start=20160101000000&t_end=20160201000000&vars=TEMP2MAVG,PRECIP

Station Names

Location: http://mesonet.k-state.edu/rest/stationnames/

Description: An up-to-date CSV list of all stations for which there are data. It includes the station name, county, latitude and longitude.

Usage: URL only, no parameters necessary

Station Time in Operation

Location: http://mesonet.k-state.edu/rest/stationactive/

Description: The approximate time period for which each station has data. For up-to-the-minute data, use Most Recent Data. Each line contains the

  • station name
  • interval of observation in seconds (5 minute observations are 300, hourly are 3600 and daily are 86400)
  • timestamp of first observation for that interval
  • timestamp of most recent observation

Usage: URL only, no parameters necessary

Most Recent Data

Location: http://mesonet.k-state.edu/rest/mostrecent

Description: Gives the timestamp of the most recently ingested data for each station for a given observation interval. The list of stations is preceded by an "--all--", giving the most recent timestamp of any station.

Usage:The following parameter is required

ParameterExampleDescription
int 5min Observation interval, one of ‘day’, ‘hour’ or ‘5min’

FW13 Data

Location: http://mesonet.k-state.edu/rest/fw13

Description:Outputs fire weather data in the FW13 format for the given station and date range. There is no limit on the number of records pulled. Note: station numbers are in beta and do not accurately represent official station numbers

Usage:The following parameters are required

ParameterExampleDescription
stn Ashland Bottoms A single station name
t_start 20150101 Start date for pull as YYYYMMDD. 20150101 would represent 2015-01-01
t_end 20151231 Start date for pull as YYYYMMDD. 20151231 would represent 2015-12-31

The example in the table would result in the following URL:
http://mesonet.k-state.edu/rest/fw13?stn=Ashland Bottoms&t_start=20150101&t_end=20151231