Introduction

The Weather API provides a RESTful method to retrieve and personalize the weather data provided by NOAA's National Weather Service. The format of the response can either be a nearly display ready string for an application or it can be a simple HTML web page or table.

Unlike most APIs which can only return their payload data with the same data elements and structure every time, the Weather API is programmable so that the user can more precisely define what is returned from the API. This allows the API to respond with a smaller payload that more closely matches the user's needs. For example, I have built a digital weather clock with live weather using an old 2x20 Point Of Sale display and a Raspberry Pi.

The documentation for this API is broken down into five parts. The first, Current Text, describes how to personalize the current observed weather conditions and return them as a text string. The second Forecast Text, describes how to personalize the forecasted weather conditions and return them as a text string. The third, Current HTML, describes how to personalize the current observed weather conditions and return them as a web page or web table. The fourth, Forecast HTML, describes how to personalize the forecasted weather conditions and return them as a web page or web table. The last, By GUID, describes how the "GUID" resource can be used to shorten the URL required to get your personalized weather data.

Getting Started

It is suggested that you first review all of the information in the Current Text part. Once you have done that, follow these simple steps to build your personalized current observation weather:

  1. Find the ICAO Station ID for the weather station that is nearest to you. Follow the instuctions in the ICAO Station ID page.
  2. In your browser's address bar build your own URL
    1. Start with "https://api-weather.omegatower.com/nws/?icao="
    2. End with the ICAO Station ID from Step 1
  3. Personalize your weather data following the instructions in the other parts.
  4. Save the personalized weather data URL as a bookmark, embed it in your WordPress site, etc...

Examples

Here are just some of the possibilities of what can be done with the Weather API.

Example 1

This link will return the current observations from Kennedy International Airport in a simple text string:
https://api-weather.omegatower.com/nws?icao=kjfk

Returns:

Example 2

This link will return the current observations from Kennedy International Airport in a simple HTML page:
https://api-weather.omegatower.com/nws?icao=kjfk&current=a,n,ts,n,ws&format=,,0&html=page,$lsat&table=,left,99ccff&border=5,ridge,9933ff&heading=$lsat,,,24,verdana&icon=100,left&text=400,center,,,verdana

Returns:

Example 3

This link will also return the current observations from Kennedy International Airport in a simple HTML page, but this time simulating the IoT Weather Clock I built and uses the GUID resource:
https://api-weather.omegatower.com/guid?guid=4720ab89-1d5c-4e4d-9b3d-319a3ca56087

Returns:

Example 4

This link will return the current observations and forecast from Kennedy International Airport in a simple HTML page and uses the GUID resource:
https://api-weather.omegatower.com/guid?guid=3d23866b-ecc8-4b9e-93ff-b04a5a09e8e8

Returns: