Weather API

Open API Specification

Open API Specification (Swagger) documentation can be found here: Weather REST API. To test the APIs in the documentation site, click the Authorize button. Paste the test key of oViXqthDGFNVw3IvAsnKrFG1AcfPyA6b in the apikey-query text box. You may need to right click and select Copy from the pop-up menu to copy the API key.

Observations and Forecasts

The Weather API can be used to build out your own Weather displays on your own web site.

The DTN Weather API supports daily and hourly observations and forecasts.

Note: The level of your subscription and associated API key gives you access to different API endpoints. Some other limits may apply. For example, the number of days forecast is limited to 5, 10 or 15 days depending on your subscription. The number of days of observations available is dependent on your subscription.

The observations and forecasts endpoints use the provided latitude, longitude values to find the nearest official weather station and the weather content associated for that station. Access to additional stations, including your own stations can be configured by DTN.

*Hourly precipitation observed values are NOT available outside of the United States.

If you feel you have purchased the correct level of subscription and still do not have access to expected endpoints, stations or time limits, please contact DTN Support.

Times

All the times provided in the API responses are in UTC.

Various API's ask for a number of days in the query parameter. This is either a number of days into the future for forecasts, or number of days in the past for observations.

Daily forecasts will include the forecast for the current day.

Hourly forecasts are managed at the days level. For days=2 will return 48 records. The first record will be a forecast for the top of the current hour.

Units

The API does not return unit of measure for each field. Instead, you can provide a query parameter of units for each of the APIs. You can select to have US or SI (International System of Units). The Open API Specification documentation indicates the unit of measure it will return for the provided query parameter unit. The default is us.

Weather Codes

0Missing15Rain-Snow Mix30Freezing Rain Showers
1Fair16Blizzard31Drizzle Showers
2Partly Cloudy17Blowing Snow32Freezing Drizzle Showers
3Cloudy18Rain33Passing Snow Showers
4Dust19Snow34Passing Flurries
5Mostly Sunny20Thunderstorms35Passing Rain Showers
6Fog21Sunny36Passing Rain-Snow Showers
7Very Hot and Humid22Clear37Passing Thunder Showers
8Haze23Rain Showers38Passing Sleet Showers
9Very Cold24Sleet (ice pellets)39Passing Freezing Rain Showers
10Snow Showers25Freezing Rain40Passing Drizzle Showers
11Smoke26Freezing Drizzle41Passing Freezing Drizzle Showers
12Drizzle27Rain-Snow Mix Showers
13Flurries28Thunder Showers
14Windy29Sleet Showers