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. See documentation for full list.

Technical Documentation

1 Revision History

DateVersionDescription

22 July 2015

1.0

Initial Version

03 August 2015

1.1

Added weather icon list

16 September 2015

1.2

Updated error messages

01 October 2015

1.3

Updated error messages

03 July 2017

1.4

Updated error messages

01 August 2023

1.5

Added rate limit and OAuth

2 Definitions, Acronyms and Abbreviations

TermDefinition

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.1 Authentication

To access the APIs an OAuth access token must be supplied in an Authorization header in the request. 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.Use your API key as the client_id, and your consumer secret as the client_secret these should be base64 encoded in an Authorization header when sent to the OAuth endpoint.

Please note the OAuth tokens have an expiry of one hour after the token has been retrieved, after the token has expired you will need to re-issue a request to get a new token.

curl --location 'https://sitaopen.api.aero/weather/oauth/token' \--header 'Authorization: Basic YWJjZGVmZ2hpamtsbW5vcC5xcnN0dXY='

You should then see your OAuth token in the response.

"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOJIUzI1NiJ9.eyJyZWZyZXNoX3Rva2VuX2V4cGlyZXNfaW4iOiIzNTk5Iiwic3ViIjoic2l0YSIsImFwaV9cm9kdWN0X2xpc3QiOiJbRE9UUy1GbGlnaHQtQ29ubmVjdGlvbi1JbnRlcm5hbF0iLCJpc3MiOiJ1cm46XC9cL2FwaWdlZS1lZdlLUpXVC1wb2xpY3ktdGVzdCIsImFwaV9hY2Nlc3NfdG9rZW4iOiIweXlIZHduSUdtOGo5WlN6WWtuYTBsWG9ZNTFvIiwiYXBpX3JlZnJlc2hfdG9rZW4iOiJraHNlaXN2T3JwSHBUd2NuUVRHdXdBdVdicXNpamNQTyIsImFwaV9zY29wZSI6IiIsImF1ZCI6ImFwaWdlZS1hcGkiLCJleHAiOj3MzAyOTI3MzIsImFwcF9pZCI6IjIxYzI5NTgyLTIwZTktNDkwMS1hNjExLTVkM2UwM2QxNzFkYiIsImV4cGlyZXNfaW4iOiIzNTk5IiwiaWF0IjoxNzMwMjg5MTMyLCJqdGkiOiI3ZmEzNTU4Mi0xNDhmLTRiMmEtODYxMS0wNWI4NDg5YjFjYmMifQ.g_dFH-08DGADOX9HIk7wzX5edxXejVsnCen27A25TQ0"

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

curl --location 'https://sitaopen.api.aero/weather/v1/combined/MIA' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOJIUzI1NiJ9.eyJyZWZyZXNoX3Rva2VuX2V4cGlyZXNfaW4iOiIzNTk5Iiwic3ViIjoic2l0YSIsImFwaV9cm9kdWN0X2xpc3QiOiJbRE9UUy1GbGlnaHQtQ29ubmVjdGlvbi1JbnRlcm5hbF0iLCJpc3MiOiJ1cm46XC9cL2FwaWdlZS1lZdlLUpXVC1wb2xpY3ktdGVzdCIsImFwaV9hY2Nlc3NfdG9rZW4iOiIweXlIZHduSUdtOGo5WlN6WWtuYTBsWG9ZNTFvIiwiYXBpX3JlZnJlc2hfdG9rZW4iOiJraHNlaXN2T3JwSHBUd2NuUVRHdXdBdVdicXNpamNQTyIsImFwaV9zY29wZSI6IiIsImF1ZCI6ImFwaWdlZS1hcGkiLCJleHAiOj3MzAyOTI3MzIsImFwcF9pZCI6IjIxYzI5NTgyLTIwZTktNDkwMS1hNjExLTVkM2UwM2QxNzFkYiIsImV4cGlyZXNfaW4iOiIzNTk5IiwiaWF0IjoxNzMwMjg5MTMyLCJqdGkiOiI3ZmEzNTU4Mi0xNDhmLTRiMmEtODYxMS0wNWI4NDg5YjFjYmMifQ.g_dFH-08DGADOX9HIk7wzX5edxXejVsnCen27A25TQ0'

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:

FunctionDescription

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:

HeaderDescription

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

PathTypeDescription

errors

Object

Object that holds the error information

errors.error[]

Array

Array of errors

errors.error[].code

Number

Weather API Internal Error Code

errors.error[].description

String

Error Description

HTTP response

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

4 SITA Weather API Service

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.

Path parameters

Table 1. /{version}/current/{location}
ParameterDescription

version

The version of this API.

location

The IATA or ICAO code of the location.

Request headers

NameDescription

Content-Type

The Content-Type of this request.

Authorization

Authorization header that contains the access token.

Response fields

PathTypeDescription

currentWeather.feelsLikeTemperature

String

Feels like temperature

currentWeather.heatIndex

String

Current heat index

currentWeather.icon

String

Icon for current weather

currentWeather.location

String

Location of weather

currentWeather.phrase

String

Phrase for current weather

currentWeather.pressure

String

Current pressure

currentWeather.pressureUnits

String

Current pressure units

currentWeather.relativeHumidity

String

Current relative humidity

currentWeather.relativeHumidityUnits

String

Current relative humidity in units

currentWeather.temperature

String

Temperature

currentWeather.timeStamp

String

Timestamp for weather forecast

currentWeather.visibility

String

Current visibility

currentWeather.windChill

String

Current wind chill

currentWeather.windDirection

String

Current wind direction

currentWeather.windSpeed

String

Current wind speed

duration

String

Duration

lengthUnit

String

Length unit

temperatureScale

String

Temperature scale

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}
ParameterDescription

version

The version of this API.

location

The IATA or ICAO code of the location.

Request headers

NameDescription

Content-Type

The Content-Type of this request.

Authorization

Authorization header that contains the access token.

Response fields

PathTypeDescription

duration

String

Duration

lengthUnit

String

Length unit

temperatureScale

String

Temperature scale

weatherForecast[].dayName

String

Day of week

weatherForecast[].feelsLikeHighTemperature

String

High temperature feels like

weatherForecast[].feelsLikeLowTemperature

String

Low temperature feels like

weatherForecast[].forecastDate

String

Date of forecast

weatherForecast[].highTemperatureValue

String

High temperature value

weatherForecast[].icon

String

Icon in use for forecast

weatherForecast[].lowTemperatureValue

String

Low tempearture value

weatherForecast[].nightIcon

String

Icon in use for overnight forecast

weatherForecast[].nightPhrase

String

Overnight weather forecast phrase

weatherForecast[].nightProbabilityOfPrecip

String

Probability of precipitation overnight

weatherForecast[].nightProbabilityOfPrecipUnits

String

Probability of precipitation overnight in units

weatherForecast[].phrase

String

Weather forecast phrase

weatherForecast[].probabilityOfPrecip

String

Probability of precipitation

weatherForecast[].probabilityOfPrecipUnits

String

Probability of precipitation overnight in units

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}
ParameterDescription

version

The version of this API.

location

The IATA or ICAO code of the location.

Request headers

NameDescription

Content-Type

The Content-Type of this request.

Authorization

Authorization header that contains the access token.

Response fields

PathTypeDescription

currentWeather.feelsLikeTemperature

String

Feels like temperature

currentWeather.heatIndex

String

Current heat index

currentWeather.icon

String

Icon for current weather

currentWeather.location

String

Location of weather

currentWeather.phrase

String

Phrase for current weather

currentWeather.pressure

String

Current pressure

currentWeather.pressureUnits

String

Current pressure units

currentWeather.relativeHumidity

String

Current relative humidity

currentWeather.relativeHumidityUnits

String

Current relative humidity in units

currentWeather.temperature

String

Temperature

currentWeather.timeStamp

String

Timestamp for weather forecast

currentWeather.visibility

String

Current visibility

currentWeather.windChill

String

Current wind chill

currentWeather.windDirection

String

Current wind direction

currentWeather.windSpeed

String

Current wind speed

duration

String

Duration

lengthUnit

String

Length unit

temperatureScale

String

Temperature scale

weatherForecast[].dayName

String

Day of week

weatherForecast[].feelsLikeHighTemperature

String

High temperature feels like

weatherForecast[].feelsLikeLowTemperature

String

Low temperature feels like

weatherForecast[].forecastDate

String

Date of forecast

weatherForecast[].highTemperatureValue

String

High temperature value

weatherForecast[].icon

String

Icon in use for forecast

weatherForecast[].lowTemperatureValue

String

Low tempearture value

weatherForecast[].nightIcon

String

Icon in use for overnight forecast

weatherForecast[].nightPhrase

String

Overnight weather forecast phrase

weatherForecast[].nightProbabilityOfPrecip

String

Probability of precipitation overnight

weatherForecast[].nightProbabilityOfPrecipUnits

String

Probability of precipitation overnight in units

weatherForecast[].phrase

String

Weather forecast phrase

weatherForecast[].probabilityOfPrecip

String

Probability of precipitation

weatherForecast[].probabilityOfPrecipUnits

String

Probability of precipitation overnight in units

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
 ds-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