Current Weather API

The Combined API returns a combination of current and forecast requests. The forecast duration can be either 5 or 7 days.The maximum URL length is 256 characters.

Format

Verb Request
GET https://host/weather/v1/combined/{location}[?duration={duration}]

Path Parameters

Key Description Required
location The airport IATA code. Yes

Request Query Parameters

Key Description Required
duration The amount of days for the forecast. Can be either 5 or 7 days. Defaults to 5. No
temperatureScale Temperature unit (C, F) to convert the response. Defaults to C. No
lengthUnit Distance unit (K, M) to convert the response. Defaults to K. No
callback Name of callback function (JSONP). No

Payload Example

Request

"https://host/weather/v1/combined/BOS?duration=7

Response


{
  "success": true,
  "version": "v1",
  "duration": "7",
  "temperatureScale": "C",
  "lengthUnit": "K",
  "currentWeather": {
    "location": "BOS",
    "phrase": "Partly sunny",
    "temperature": "31",
    "heatIndex": "31",
    "windChill": "31",
    "relativeHumidity": "38",
    "relativeHumidityUnits": "%",
    "windDirection": "SSW",
    "windSpeed": "32,19",
    "pressure": "29.80",
    "pressureUnits": "in/Hg",
    "visibility": "16,09",
    "feelsLikeTemperature": "31",
    "timeStamp": "2015-08-03T17:49:50Z",
    "icon": "03"
  },
  "weatherForecast": [
    {
      "forecastDate": "2015-08-03",
      "dayName": "Monday",
      "highTemperatureValue": "32",
      "lowTemperatureValue": "22",
      "feelsLikeHighTemperature": "32",
      "feelsLikeLowTemperature": "22",
      "phrase": "Partly sunny and more humid; breezy this afternoon",
      "probabilityOfPrecip": "1",
      "probabilityOfPrecipUnits": "percent",
      "nightPhrase": "Increasing amounts of clouds with a shower or thunderstorm around; humid",
      "nightIcon": "42",
      "nightProbabilityOfPrecip": "55",
      "nightProbabilityOfPrecipUnits": "percent",
      "icon": "03"
    },
    {
      "forecastDate": "2015-08-04",
      "dayName": "Tuesday",
      "highTemperatureValue": "31",
      "lowTemperatureValue": "20",
      "feelsLikeHighTemperature": "31",
      "feelsLikeLowTemperature": "19",
      "phrase": "Variable clouds with a shower or thunderstorm in the area",
      "probabilityOfPrecip": "40",
      "probabilityOfPrecipUnits": "percent",
      "nightPhrase": "Patchy clouds",
      "nightIcon": "35",
      "nightProbabilityOfPrecip": "25",
      "nightProbabilityOfPrecipUnits": "percent",
      "icon": "16"
    },
    {
      "forecastDate": "2015-08-05",
      "dayName": "Wednesday",
      "highTemperatureValue": "28",
      "lowTemperatureValue": "18",
      "feelsLikeHighTemperature": "29",
      "feelsLikeLowTemperature": "17",
      "phrase": "Sunny",
      "probabilityOfPrecip": "18",
      "probabilityOfPrecipUnits": "percent",
      "nightPhrase": "Mainly clear",
      "nightIcon": "34",
      "nightProbabilityOfPrecip": "15",
      "nightProbabilityOfPrecipUnits": "percent",
      "icon": "01"
    },
    {
      "forecastDate": "2015-08-06",
      "dayName": "Thursday",
      "highTemperatureValue": "27",
      "lowTemperatureValue": "18",
      "feelsLikeHighTemperature": "28",
      "feelsLikeLowTemperature": "17",
      "phrase": "Variable cloudiness",
      "probabilityOfPrecip": "12",
      "probabilityOfPrecipUnits": "percent",
      "nightPhrase": "Partly cloudy",
      "nightIcon": "35",
      "nightProbabilityOfPrecip": "15",
      "nightProbabilityOfPrecipUnits": "percent",
      "icon": "06"
    },
    {
      "forecastDate": "2015-08-07",
      "dayName": "Friday",
      "highTemperatureValue": "23",
      "lowTemperatureValue": "18",
      "feelsLikeHighTemperature": "25",
      "feelsLikeLowTemperature": "16",
      "phrase": "Sunny and nice",
      "probabilityOfPrecip": "13",
      "probabilityOfPrecipUnits": "percent",
      "nightPhrase": "Mainly clear",
      "nightIcon": "34",
      "nightProbabilityOfPrecip": "18",
      "nightProbabilityOfPrecipUnits": "percent",
      "icon": "01"
    },
    {
      "forecastDate": "2015-08-08",
      "dayName": "Saturday",
      "highTemperatureValue": "24",
      "lowTemperatureValue": "18",
      "feelsLikeHighTemperature": "24",
      "feelsLikeLowTemperature": "17",
      "phrase": "Mostly sunny and pleasant",
      "probabilityOfPrecip": "12",
      "probabilityOfPrecipUnits": "percent",
      "nightPhrase": "Clear",
      "nightIcon": "33",
      "nightProbabilityOfPrecip": "18",
      "nightProbabilityOfPrecipUnits": "percent",
      "icon": "02"
    },
    {
      "forecastDate": "2015-08-09",
      "dayName": "Sunday",
      "highTemperatureValue": "24",
      "lowTemperatureValue": "18",
      "feelsLikeHighTemperature": "25",
      "feelsLikeLowTemperature": "17",
      "phrase": "Clouds yielding to sun with rain ending, then a leftover shower",
      "probabilityOfPrecip": "75",
      "probabilityOfPrecipUnits": "percent",
      "nightPhrase": "Partly cloudy",
      "nightIcon": "36",
      "nightProbabilityOfPrecip": "12",
      "nightProbabilityOfPrecipUnits": "percent",
      "icon": "13"
    }
  ]
}


 

NOTE 1: Fields not available in the response will be omitted.

NOTE 2: The icon field maps to a URL which returns an icon corresponding to the weather. See Weather Icon List for a list of URL mappings.

Errors

HTTP Code Reason Payload
400 Auth failed

{
 "errors":
   {"error":[
     {"description":"authentication failed",
       "code":"9998"
     }
   ]
  },
  "success":false
}
404 Airport not Found

{
  "errors": {
     "error": [
        {
          "description": "Airport / Location not found",
          "code": "4001"
        }
     ]
    },
400 Invalid Scope

{
  "errors": {
     "error": [
       {
         "description": "Duration should be '5' or '7' days",
         "code": "4002"
       }
      ]
   },
   "success": false
}
400 Invalid Temperature Scale

{
  "errors": {
     "error": [
        {
          "description": "Temperature Unit should be 'C' or 'F'",
          "code": "4003"
        }
     ]
    },
    "success": false
}
400 Invalid Length Unit

{
  "errors": {
     "error": [
        {
          "description": "Length Unit should be 'K' or 'M'",
          "code": "4004"
        }
     ]
    },
    "success": false
}
404 No Service

  "errors": {
     "error": [
       {
         "description": "no service available",
         "code": "1003"
       }
      ]
   },
   "success": false
}
500 System Error

{
  "errors": {
     "error": [
       {
         "operation had partial failure. Memory operation 
         succeeded, persistence operation failed",
         "code": "9995"
       }
      ]
   },
   "success": false
}
500 System Error

{
  "errors": {
     "error": [
       {
         "A system error occurred. Contact Support",
         "code": "9999"
       }
      ]
   },
   "success": false
}