Skip to main content

Overview

 

The SITA Weather API is a REST based service which provides current and forecast weather data for locations around the world. The API consumer can query current conditions and either 5-day or 7-day forecast for airports around the world using just the airport IATA\ICAO code. The APIs can return current conditions, forecasted conditions or both.

Features

The API enables you to:

  • Request the current weather information for a single location.
  • Request the weather forecast information for a single location for either 5 or 7 days duration depending on the request parameter.
  • Request to receive a combination of current and forecast for a single location.
  • The APIs also include icons for each weather description enabling you to create a graphical display of the weather information and forecasts within your apps.

The refresh period for current conditions is more frequent than that for forecast conditions. Current conditions are updated every 30 minutes while the forecast is updated 4 times per day, at approximately 0:15, 6:15, 12:15, and 18:15 US Eastern Time.

Example of information included:  location: "MIA", phrase: "Mostly cloudy", temperature: "83", heatIndex: "84", windChill: "83", relativeHumidity: "48", relativeHumidityUnits: "%", windDirection: "ESE", windSpeed: "13", pressure: "30.03", pressureUnits: "in/Hg", visibility: "10", feelsLikeTemperature: "82", timeStamp: "2020-05-08T19:19:01Z", icon: "06" 

Weather Icons

We also make icons available to enable you to create a graphical display of the weather information and forecasts within your apps. Some sample weather Icons shown below. See documentation for full list.

 

 

 

 

Weather API Service

SITA Advanced Data Services
version 3.1.0-SNAPSHOT

1 Revision History

Date Version Description Author

22 July 2015

1.0

Initial Version

Kretschmer

03 August 2015

1.1

Added weather icon list

Lucas Freitas

16 September 2015

1.2

Updated error messages

Stephen O'Donnell

01 October 2015

1.3

Updated error messages

Stephen O'Donnell

03 July 2017

1.4

Updated error messages

Stephen O'Donnell

01 August 2023

1.5

Added rate limit and OAuth

Liam Kenny

2 Definitions, Acronyms and Abbreviations

Term Definition

Weather

Weather Information

Current

Reference to requests for the current weather

Forecast

Reference to requests for the weather forecast

Duration

Parameter for forecast, number forecasted days

Location

Location is an airport, as defined by its IATA code

C

Celsius

F

Fahrenheit

M

Miles

K

Kilometers

3 Introduction

The SITA Weather API is a REST based service which provides current and forecast weather data for locations around the world.

3.1 Registration and API Signup

To access the APIs you will need an API key. These can be obtained by creating an account on https://www.developer.aero/ and registering your interest for access to the API.

3.2 Authentication

To access the APIs an OAuth access token must be supplied. To obtain an OAuth token a request must be sent to the https://sitaopen.api.aero/weather/oauth/token endpoint using the OAuth2 Client Credential flow, using your API key as the client_id, and your consumer secret as the client_secret.

Once an access token has been obtained, it can be placed in the Authorization HTTP header as a bearer token, for example:

    Authorization: Bearer eyJ92dNw9dka...

3.3 SITA Weather API Structure

The scheme, domain and high level path parameters portion of the URL is:

Where weather is the functional domain. The current version is v1. The current qa server is at https://weather-qa.api.aero.

Following the weather domain parameter, and version, the next path parameter defines the service called. As of this version, the following functions are provided:

Function Description

current

Request the current weather information for a single location

forecast

Request the weather forecast information for a single location. It can be for 5 or 7 days duration provided as a parameter

combined

Request to receive a combination of current and forecast for a single location.

3.4 Security

  • All incoming requests will be REST over HTTPS.

  • Users are authenticated using their OAuth token.

  • Certain response payload elements will be filtered based on permissions associated with their token.

3.5 Rate Limiting

All incoming requests are subject to a rate limiting restriction. The following headers are included in HTTP responses:

Header Description

X-RateLimit-Limit

The total number of requests allowed in the current time window

X-RateLimit-Remaining

The number of requests left for the current time window

X-RateLimit-Policy

The policy describing how many request per time window are allowed

X-RateLimit-Reset

The UTC timestamp at which the current rate limit window resets

3.6 Error Response

Response fields
Path Type Description

errors

Object

Object that holds the error information

errors.error[].code

Number

Weather API Internal Error Code

errors.error[].description

String

Error Description

errors.error[]

Array

Array of errors

HTTP response
    HTTP/1.1 400 Bad Request
    Content-Type: application/json
    Content-Length: 119
    
    {
      "errors" : {
        "error" : [ {
          "description" : "Airport not found.",
          "code" : 2020
        } ]
      }
    }

4 Resources

This section describes each WEATHER API service. Detailed API structure, example requests and responses, JSON schema for request (where appropriate) and responses, and error response codes and formats are included.

4.1 Current Weather

Path parameters
Table 1. /{version}/current/{location}
Parameter Description

version

The version of this API.

location

The IATA or ICAO code of the location.

Request headers
Name Description

Content-Type

The Content-Type of this request.

Authorization

Authorization header that contains the access token.

Response fields
Path Type Description

currentWeather.pressureUnits

String

 

currentWeather.icon

String

 

temperatureScale

String

 

currentWeather.heatIndex

String

 

currentWeather.pressure

String

 

currentWeather.timeStamp

String

 

lengthUnit

String

 

currentWeather.location

String

 

currentWeather.windChill

String

 

currentWeather.feelsLikeTemperature

String

 

currentWeather.windSpeed

String

 

currentWeather.phrase

String

 

currentWeather.relativeHumidity

String

 

currentWeather.visibility

String

 

duration

String

 

currentWeather.windDirection

String

 

currentWeather.temperature

String

 

currentWeather.relativeHumidityUnits

String

 
Curl request
    $ curl 'https://www.example.com:12345/v1/current/DUB' -i -X GET \
        -H 'Authorization: Bearer eyJkb2N1bWVudGF0aW9uIiwidG9rZW4ifQ...' \
        -H 'Content-Type: application/json'
HTTP response
    HTTP/1.1 200 OK
    Content-Type: application/json
    Content-Length: 556
    
    {
      "duration" : "1 day",
      "temperatureScale" : "C",
      "lengthUnit" : "K",
      "currentWeather" : {
        "location" : "DUB",
        "phrase" : "Partly sunny",
        "temperature" : "18",
        "heatIndex" : "17",
        "windChill" : "18",
        "relativeHumidity" : "42",
        "relativeHumidityUnits" : "%",
        "windDirection" : "WSW",
        "windSpeed" : "14.48",
        "pressure" : "29.92",
        "pressureUnits" : "in/Hg",
        "visibility" : "16.09",
        "feelsLikeTemperature" : "17",
        "timeStamp" : "2018-08-09T13:49:03Z",
        "icon" : "03"
      }
    }

4.2 Forecast Weather

Path parameters
Table 1. /{version}/forecast/{location}
Parameter Description

version

The version of this API.

location

The IATA or ICAO code of the location.

Request headers
Name Description

Content-Type

The Content-Type of this request.

Authorization

Authorization header that contains the access token.

Response fields
Path Type Description

weatherForecast[].feelsLikeHighTemperature

String

 

weatherForecast[].forecastDate

String

 

weatherForecast[].nightProbabilityOfPrecip

String

 

weatherForecast[].probabilityOfPrecip

String

 

weatherForecast[].feelsLikeLowTemperature

String

 

weatherForecast[].dayName

String

 

weatherForecast[].nightIcon

String

 

duration

String

 

weatherForecast[].phrase

String

 

weatherForecast[].highTemperatureValue

String

 

temperatureScale

String

 

weatherForecast[].nightPhrase

String

 

weatherForecast[].icon

String

 

weatherForecast[].lowTemperatureValue

String

 

weatherForecast[].nightProbabilityOfPrecipUnits

String

 

lengthUnit

String

 

weatherForecast[].probabilityOfPrecipUnits

String

 
Curl request
    $ curl 'https://www.example.com:12345/v1/forecast/DUB' -i -X GET \
        -H 'Authorization: Bearer eyJkb2N1bWVudGF0aW9uIiwidG9rZW4ifQ...' \
        -H 'Content-Type: application/json'
HTTP response
    HTTP/1.1 200 OK
    Content-Type: application/json
    Content-Length: 1170
    
    {
      "duration" : "1 day",
      "temperatureScale" : "C",
      "lengthUnit" : "K",
      "weatherForecast" : [ {
        "forecastDate" : "2018-08-09",
        "dayName" : "Thursday",
        "highTemperatureValue" : "18",
        "lowTemperatureValue" : "9",
        "feelsLikeHighTemperature" : "17",
        "feelsLikeLowTemperature" : "4",
        "phrase" : "Partly sunny with a passing shower",
        "probabilityOfPrecip" : "55",
        "probabilityOfPrecipUnits" : "percent",
        "nightPhrase" : "Partly cloudy with a passing shower",
        "nightIcon" : "39",
        "nightProbabilityOfPrecip" : "55",
        "nightProbabilityOfPrecipUnits" : "percent",
        "icon" : "14"
      }, {
        "forecastDate" : "2018-08-10",
        "dayName" : "Friday",
        "highTemperatureValue" : "18",
        "lowTemperatureValue" : "9",
        "feelsLikeHighTemperature" : "17",
        "feelsLikeLowTemperature" : "9",
        "phrase" : "Times of clouds and sun",
        "probabilityOfPrecip" : "25",
        "probabilityOfPrecipUnits" : "percent",
        "nightPhrase" : "Partly cloudy",
        "nightIcon" : "35",
        "nightProbabilityOfPrecip" : "25",
        "nightProbabilityOfPrecipUnits" : "percent",
        "icon" : "04"
      } ]
    }

4.3 Combined Weather

Path parameters
Table 1. /{version}/combined/{location}
Parameter Description

version

The version of this API.

location

The IATA or ICAO code of the location.

Request headers
Name Description

Content-Type

The Content-Type of this request.

Authorization

Authorization header that contains the access token.

Response fields
Path Type Description

weatherForecast[].nightProbabilityOfPrecip

String

 

currentWeather.relativeHumidityUnits

String

 

currentWeather.temperature

String

 

weatherForecast[].phrase

String

 

currentWeather.phrase

String

 

currentWeather.pressure

String

 

duration

String

 

weatherForecast[].nightIcon

String

 

currentWeather.timeStamp

String

 

weatherForecast[].highTemperatureValue

String

 

currentWeather.heatIndex

String

 

weatherForecast[].feelsLikeLowTemperature

String

 

currentWeather.windSpeed

String

 

temperatureScale

String

 

weatherForecast[].nightPhrase

String

 

currentWeather.feelsLikeTemperature

String

 

weatherForecast[].icon

String

 

weatherForecast[].dayName

String

 

currentWeather.windChill

String

 

weatherForecast[].feelsLikeHighTemperature

String

 

lengthUnit

String

 

currentWeather.windDirection

String

 

weatherForecast[].probabilityOfPrecipUnits

String

 

currentWeather.visibility

String

 

weatherForecast[].nightProbabilityOfPrecipUnits

String

 

weatherForecast[].forecastDate

String

 

currentWeather.relativeHumidity

String

 

currentWeather.pressureUnits

String

 

currentWeather.location

String

 

weatherForecast[].lowTemperatureValue

String

 

currentWeather.icon

String

 

weatherForecast[].probabilityOfPrecip

String

 
Curl request
    $ curl 'https://www.example.com:12345/v1/combined/DUB' -i -X GET \
        -H 'Authorization: Bearer eyJkb2N1bWVudGF0aW9uIiwidG9rZW4ifQ...' \
        -H 'Content-Type: application/json'
HTTP response
    HTTP/1.1 200 OK
    Content-Type: application/json
    Content-Length: 1646
    
    {
      "duration" : "1 day",
      "temperatureScale" : "C",
      "lengthUnit" : "K",
      "currentWeather" : {
        "location" : "DUB",
        "phrase" : "Partly sunny",
        "temperature" : "18",
        "heatIndex" : "17",
        "windChill" : "18",
        "relativeHumidity" : "42",
        "relativeHumidityUnits" : "%",
        "windDirection" : "WSW",
        "windSpeed" : "14.48",
        "pressure" : "29.92",
        "pressureUnits" : "in/Hg",
        "visibility" : "16.09",
        "feelsLikeTemperature" : "17",
        "timeStamp" : "2018-08-09T13:49:03Z",
        "icon" : "03"
      },
      "weatherForecast" : [ {
        "forecastDate" : "2018-08-09",
        "dayName" : "Thursday",
        "highTemperatureValue" : "18",
        "lowTemperatureValue" : "9",
        "feelsLikeHighTemperature" : "17",
        "feelsLikeLowTemperature" : "4",
        "phrase" : "Partly sunny with a passing shower",
        "probabilityOfPrecip" : "55",
        "probabilityOfPrecipUnits" : "percent",
        "nightPhrase" : "Partly cloudy with a passing shower",
        "nightIcon" : "39",
        "nightProbabilityOfPrecip" : "55",
        "nightProbabilityOfPrecipUnits" : "percent",
        "icon" : "14"
      }, {
        "forecastDate" : "2018-08-10",
        "dayName" : "Friday",
        "highTemperatureValue" : "18",
        "lowTemperatureValue" : "9",
        "feelsLikeHighTemperature" : "17",
        "feelsLikeLowTemperature" : "9",
        "phrase" : "Times of clouds and sun",
        "probabilityOfPrecip" : "25",
        "probabilityOfPrecipUnits" : "percent",
        "nightPhrase" : "Partly cloudy",
        "nightIcon" : "35",
        "nightProbabilityOfPrecip" : "25",
        "nightProbabilityOfPrecipUnits" : "percent",
        "icon" : "04"
      } ]
    }
 

 

 

Glossary

 

Terms Definitions
C Celsius
Current Reference to requests for the current weather
Duration Parameter for forecast, number of forecasted days
F Fahrenheit
Forecast Reference to requests for the weather forecast
K Kilometers
L Location is an airport, as defined by its IATA code
M Miles
W Weather

 

Weather Icon List

The Weather APIs include numbered icons for each weather description. For example, Sunny is Icon 01, represented by a large sun. Below is the table with codes and a URL for corresponding icons.

Code Description URL

1

Sunny

uds-static.api.aero/weather/icon/sm/01.png
uds-static.api.aero/weather/icon/lg/01.png

2

Mostly Sunny

uds-static.api.aero/weather/icon/sm/02.png
uds-static.api.aero/weather/icon/lg/02.png

3

Partly Sunny

uds-static.api.aero/weather/icon/sm/03.png
uds-static.api.aero/weather/icon/lg/03.png

4

Intermittent Clouds

uds-static.api.aero/weather/icon/sm/04.png
uds-static.api.aero/weather/icon/lg/04.png

5

Hazy Sunshine

uds-static.api.aero/weather/icon/sm/05.png
uds-static.api.aero/weather/icon/lg/05.png

6

Mostly Cloudy

uds-static.api.aero/weather/icon/sm/06.png
uds-static.api.aero/weather/icon/lg/06.png

7

Cloudy (AM and PM)

uds-static.api.aero/weather/icon/sm/07.png
uds-static.api.aero/weather/icon/lg/07.png

8

Dreary (AM and PM)

uds-static.api.aero/weather/icon/sm/08.png
uds-static.api.aero/weather/icon/lg/08.png

11

Fog (AM and PM)

uds-static.api.aero/weather/icon/sm/11.png
uds-static.api.aero/weather/icon/lg/11.png

12

Showers (AM and PM)

uds-static.api.aero/weather/icon/sm/12.png
uds-static.api.aero/weather/icon/lg/12.png

13

Mostly Cloudy with Showers

uds-static.api.aero/weather/icon/sm/13.png
uds-static.api.aero/weather/icon/lg/13.png

14

Partly Sunny with Showers

uds-static.api.aero/weather/icon/sm/14.png
uds-static.api.aero/weather/icon/lg/14.png

15

Thunderstorms (AM and PM)

uds-static.api.aero/weather/icon/sm/15.png
uds-static.api.aero/weather/icon/lg/15.png

16

Mostly Cloudy with Thunder Showers

uds-static.api.aero/weather/icon/sm/16.png
uds-static.api.aero/weather/icon/lg/16.png

17

Partly Sunny with Thunder Showers

uds-static.api.aero/weather/icon/sm/17.png
uds-static.api.aero/weather/icon/lg/17.png

18

Rain (AM and PM)

uds-static.api.aero/weather/icon/sm/18.png
uds-static.api.aero/weather/icon/lg/18.png

19

Flurries (AM and PM)

uds-static.api.aero/weather/icon/sm/19.png
uds-static.api.aero/weather/icon/lg/19.png

20

Mostly Cloudy with Flurries

uds-static.api.aero/weather/icon/sm/20.png
uds-static.api.aero/weather/icon/lg/20.png

21

Partly Sunny with Flurries

uds-static.api.aero/weather/icon/sm/21.png
uds-static.api.aero/weather/icon/lg/21.png

22

Snow (AM and PM)

uds-static.api.aero/weather/icon/sm/22.png
uds-static.api.aero/weather/icon/lg/22.png

23

Mostly Cloudy with Snow

uds-static.api.aero/weather/icon/sm/23.png
uds-static.api.aero/weather/icon/lg/23.png

24

Ice (AM and PM)

uds-static.api.aero/weather/icon/sm/24.png
uds-static.api.aero/weather/icon/lg/24.png

25

Sleet (AM and PM)

uds-static.api.aero/weather/icon/sm/25.png
uds-static.api.aero/weather/icon/lg/25.png

26

Freezing Rain (AM and PM)

uds-static.api.aero/weather/icon/sm/26.png
uds-static.api.aero/weather/icon/lg/26.png

29

Rain and Snow Mixed (AM and PM)

uds-static.api.aero/weather/icon/sm/29.png
uds-static.api.aero/weather/icon/lg/29.png

30

Hot (AM and PM)

uds-static.api.aero/weather/icon/sm/30.png
uds-static.api.aero/weather/icon/lg/30.png

31

Cold (AM and PM)

uds-static.api.aero/weather/icon/sm/31.png
uds-static.api.aero/weather/icon/lg/31.png

32

Windy (AM and PM)

uds-static.api.aero/weather/icon/sm/32.png
uds-static.api.aero/weather/icon/lg/32.png

Night Only ICONS

33

Clear

uds-static.api.aero/weather/icon/sm/33.png
uds-static.api.aero/weather/icon/lg/33.png

34

Mostly Clear

uds-static.api.aero/weather/icon/sm/34.png
uds-static.api.aero/weather/icon/lg/34.png

35

Partly Cloudy

uds-static.api.aero/weather/icon/sm/35.png
uds-static.api.aero/weather/icon/lg/35.png

36

Intermittent Clouds

uds-static.api.aero/weather/icon/sm/36.png
uds-static.api.aero/weather/icon/lg/36.png

37

Hazy

uds-static.api.aero/weather/icon/sm/37.png
uds-static.api.aero/weather/icon/lg/37.png

38

Mostly Cloudy

uds-static.api.aero/weather/icon/sm/38.png
uds-static.api.aero/weather/icon/lg/38.png

39

Partly Cloudy with Showers

uds-static.api.aero/weather/icon/sm/39.png
uds-static.api.aero/weather/icon/lg/39.png

40

Mostly Cloudy with Showers

uds-static.api.aero/weather/icon/sm/40.png
uds-static.api.aero/weather/icon/lg/40.png

41

Partly Cloudy with Thunder Showers

uds-static.api.aero/weather/icon/sm/41.png
uds-static.api.aero/weather/icon/lg/41.png

42

Mostly Cloudy with Thunder Showers

uds-static.api.aero/weather/icon/sm/42.png
uds-static.api.aero/weather/icon/lg/42.png

43

Mostly Cloudy with Flurries

uds-static.api.aero/weather/icon/sm/43.png
uds-static.api.aero/weather/icon/lg/43.png

44

Mostly Cloudy with Flurries

uds-static.api.aero/weather/icon/sm/44.png
uds-static.api.aero/weather/icon/lg/44.png

 

Contact Us

For subscription and sales queries, please contact:

Product Inquiries
Weather API

Contact Us

 
For any technical queries and support, please contact:

Technical Support Team

Contact Us

contact-icon

Do you have a question? We are here, ready to help

Get in touch

About us

We are the world's leading specialist in air transport communications and IT solutions. 

 

bottom navigation SITA logo