Endpoint: forecasts

The forecasts endpoint/data set provides the core forecast data for US and international locations. Forecast information is available in daily, day/night intervals, as well as, custom intervals such as 3 hour or 1 hour intervals.

https://api.aerisapi.com/forecasts/

Data CoverageGlobal

Included With API Developer,  API Basic,  API Premium

Supported Actions

The following actions are supported with the forecasts endpoint:

:id Requesting data by using the :id action is used for returning data for a particular item that has an ID associated with it. This is the primary method for requesting general weather information for a single location (observations, forecasts, advisories, etc.) as the location's name or a zip code serves as the id. Other endpoints may expect a certain value for the ID, such as storm cells whose ID value is a combination of the radar site identifier and unique identifier assigned to every storm cell. Refer to an enpoint's detailed documentation for specific information regarding how to use the :id action.
closest The closest action will query the API for data that is closest to the requested place and return the results, if any, in order from closest to farthest. If no limit is provided in the request, then only the closest single result will be returned. If a radius is not provided, then the default of 20 miles will be used.

If your request does not return results, you may try setting or increasing the radius being used. Note, however, that a maximum of 250 results can be returned in a single request.
route BETA The route action returns data for points along a given route. This can be useful to obtain weather information along a transportation route, trails and more. The route is a series of locations, usually latitude/longitudes provided via the p query parameter or for longer routes via GeoJSON within a POST request. The route will return an array of GeoJSON points with the requested data for each point.

Supported Parameters

The following parameters are options unless otherwise noted:

p p=:place Defines the location to query data for. Refer to the list of supported place value formats.
limit limit=:total The total number of results to return as an integer. Each endpoint may have a set maximum for this value depending on usage.

The default limit is 1 if not specified.
query query=:string Used to filter results based on certain fields in the data set. See Advanced Queries for more details.
filter filter=:string Predefined filters for limiting the results. The filter value can be a single, comma-delimited or a semicolon delimited string of filter names.
from from=:string Returns the results starting form the value specified.

Supports a UNIX timestamp a specific date string, or a string supported by the PHP strtotime() function.

Examples:
from=tomorrow
from=friday
from=1302883980
from=7/10/2011
from=2011/07/10
from=+2hours
to to=:string Returns the results between now* and the value specified. When used in conjunction with the from parameter, the value of to will be relative to the value of from, not relative to the current time.

Supports a UNIX timestamp a specific date string, or a string supported by the PHP strtotime() function.

Examples:
to=+6hours
to=+5days
to=1302883980
to=7/10/2011
to=2011/07/10
skip skip=:number Used to skip over a specific number of results in the data set.
plimit plimit=:total Applied only on the periods property, the total number of periods to return as an integer. This parameter has a normal default of one (1).
pskip pskip=:number Applied only on the periods property, used to skip over a specific number of periods in the data set.
callback callback=:functionName Used with JSONP implementation.

Defines the callback function to use for the response. The response will be enclosed as C(response), where C is the callback function provided.
fields fields=:string Provides a comma separated list of values for the API to return. This parameter is often used to limit the amount of data returned. See Reducing Output.

Supported Filters

The following filters can be passed to the filter parameter to reduce the results that are returned:

day (default) Returns forecast data in the standard daily summary format.

By default a 7 day forecast will be returned. If your account supports a longer forecast, include the limit parameter. i.e. "limit=14"
daynight Returns forecast data in a daily 12-hour format in which day and night forecasts are separated.

By default 7 days of forecast information will be returned. If your account supports a longer forecast, include the limit parameter. i.e. "limit=28"
#hr Returns forecast summary data for the specified interval starting at the locale's current time. Supports values: 1hr, 2hr, 3hr, 4hr, 6hr, 12hr, 24hr, 48hr and 72hr.

NOTE: The day and 24hr filters will not provide the same results. The 24hr filter will return summary data at 24-hour intervals starting from the locale's current time, which may not necessarily be the correct summary for the same days within the range. The 48hr and 72hr filters can be used to return a min, max and total value for the multi-day period.

Examples

Return 7 day forecast for the zip code 55415 (Minneapolis).
/forecasts/55415

Return 14 day forecast for the zip code 55415 (Minneapolis).
/forecasts/55415?limit=14

Return 7 days of the day and night forecasts data for Seattle, WA.
/forecasts/seattle,wa?filter=daynight

Return up to 14 days of the day and night forecasts data for Seattle, WA.
/forecasts/seattle,wa?filter=daynight&limit=28

Return the forecasts for the next eight 3-hour intervals for Seattle, WA.
/forecasts/seattle,wa?filter=3hr&limit=8

Return up to 14 days of forecast in 1-hour intervals for Seattle, WA.
/forecasts/seattle,wa?filter=1hr&limit=999

Return forecast data for the coordinate 42.25N, 95.25W.
/forecasts/42.25,-95.25

Returns the forecast for today only for Minneapolis, MN.
/forecasts/minneapolis,mn?from=today&to=today

Returns the day/night forecast for the next 24 hours for Minneapolis, MN.
/forecasts/minneapolis,mn?from=today&to=+1day&limit=2&filter=daynight

Returns the day/night forecast for the weekend (Friday through Sunday) for Minneapolis, MN.
/forecasts/minneapolis,mn?from=friday&to=+3days&filter=daynight

Response

The following is an example of what each object in the response will consist of. Depending on your requested action, the response may contain multiple instances of this object within an array.

Default
GeoJSON

{
    "loc": {
        "long": -93.264,
        "lat": 44.98
    },
    "interval": "day",
    "periods": [{
        "timestamp": 1318417200,
        "validTime": "2011-10-12T06:00:00-05:00",
        "dateTimeISO": "2011-10-12T06:00:00-05:00",
        "maxTempC": 21,
        "maxTempF": 70,
        "minTempC": 11,
        "minTempF": 52,
        "avgTempC": 18,
        "avgTempF": 64,
        "tempC": null,
        "tempF": null,
        "pop": 30,
        "precipMM": 4.06,
        "precipIN": 0.16,
        "iceaccum": 0,
        "maxHumidity": 80,
        "minHumidity": 62,
        "humidity": 71,
        "uvi": 9,
        "pressureMB": 1025,
        "pressureIN": 30.27,
        "sky": 75,
        "snowCM": 0,
        "snowIN": 0,
        "feelslikeC": 15,
        "feelslikeF": 59,
        "minFeelslikeC": 15,
        "minFeelslikeF": 59,
        "maxFeelslikeC": 20,
        "maxFeelslikeF": 68,
        "avgFeelslikeC": 17,
        "avgFeelslikeF": 63,
        "dewpointC": 12,
        "dewpointF": 54,
        "maxDewpointC": 14,
        "maxDewpointF": 58,
        "minDewpointC": 12,
        "minDewpointF": 54,
        "avgDewpointC": 13,
        "avgDewpointF": 56,
        "windDirDEG": 210,
        "windDir": "SSW",
        "windDirMaxDEG": 140,
        "windDirMax": "SE",
        "windDirMinDEG": 140,
        "windDirMin": "SE",        
        "windGustKTS": 6,
        "windGustKPH": 11,
        "windGustMPH": 7,
        "windSpeedKTS": 6,
        "windSpeedKPH": 11,
        "windSpeedMPH": 7,
        "windSpeedMaxKTS": 6,
        "windSpeedMaxKPH": 11,
        "windSpeedMaxMPH": 7,
        "windSpeedMinKTS": 4,
        "windSpeedMinKPH": 8,
        "windSpeedMinMPH": 5,
        "windDir80mDEG": 0,
        "windDir80m": "ESE",
        "windDirMax80mDEG": 140,
        "windDirMax80m": "SE",
        "windDirMin80mDEG": 120,
        "windDirMin80m": "ESE",
        "windGust80mKTS": 14,
        "windGust80mKPH": 25,
        "windGst80mMPH": 16,
        "windSpeed80mKTS": 13,
        "windSpeed80mKPH": 24,
        "windSpeed80mMPH": 15,
        "windSpeedMax80mKTS": 14,
        "windSpeedMax80mKPH": 25,
        "windSpeedMax80mMPH": 16,
        "windSpeedMin80mKTS": 12,
	"windSpeedMin80mKPH": 21,
	"windSpeedMin80mMPH": 13,
	"sunriseISO": "2015-06-01T05:29:15-05:00",
	"sunsetISO": "2015-06-01T20:52:40-05:00"
        "weather": "Mostly Cloudy with Isolated Storms",
        "weatherCoded": [{
            "timestamp": 1318417200,
            "wx": "L:L:RW,IS::T"
        },
        {
            "timestamp": 1318456800,
            "wx": "CHC:L:RW"
        }],
        "weatherPrimary": "Isolated Storms",
        "weatherPrimaryCoded": "IS::T",
        "cloudsCoded": "BK",
        "icon": "mcloudyt.png",
        "isDay": true,
        "sunrise": 1318422338,
        "sunset": 1318462389
    },
    ...
    ],
    "profile": {
        "tz": "America/Chicago"
    }
}
}
								

{
   "type":"FeatureCollection",
   "features":[
      {
         "type":"Feature",
         "geometry":{
            "type":"Point",
            "coordinates":[
               -93.265,
               44.978
            ]
         },
         "properties":{
            "loc":{
               "long":-93.265,
               "lat":44.978
            },
            "interval":"day",
            "periods":[
               {
                  "timestamp":1442404800,
                  "validTime":"2015-09-16T07:00:00-05:00",
                  "dateTimeISO":"2015-09-16T07:00:00-05:00",
                  "maxTempC":30,
                  "maxTempF":86,
                  "minTempC":21,
                  "minTempF":70,
                  "avgTempC":26,
                  "avgTempF":79,
                  "tempC":null,
                  "tempF":null,
                  "pop":52,
                  "precipMM":7.37,
                  "precipIN":0.29,
                  "iceaccum":0,
                  "maxHumidity":76,
                  "minHumidity":43,
                  "humidity":63,
                  "uvi":5,
                  "pressureMB":1010,
                  "pressureIN":29.83,
                  "sky":68,
                  "snowCM":0,
                  "snowIN":0,
                  "feelslikeC":21,
                  "feelslikeF":70,
                  "minFeelslikeC":21,
                  "minFeelslikeF":70,
                  "maxFeelslikeC":31,
                  "maxFeelslikeF":88,
                  "avgFeelslikeC":27,
                  "avgFeelslikeF":81,
                  "dewpointC":16,
                  "dewpointF":61,
                  "maxDewpointC":20,
                  "maxDewpointF":68,
                  "minDewpointC":16,
                  "minDewpointF":61,
                  "avgDewpointC":18,
                  "avgDewpointF":64,
                  "windDirDEG":170,
                  "windDir":"S",
                  "windDirMaxDEG":180,
                  "windDirMax":"S",
                  "windDirMinDEG":180,
                  "windDirMin":"S",
                  "windGustKTS":23,
                  "windGustKPH":43,
                  "windGustMPH":27,
                  "windSpeedKTS":15,
                  "windSpeedKPH":27,
                  "windSpeedMPH":17,
                  "windSpeedMaxKTS":17,
                  "windSpeedMaxKPH":32,
                  "windSpeedMaxMPH":20,
                  "windSpeedMinKTS":10,
                  "windSpeedMinKPH":19,
                  "windSpeedMinMPH":12,
                  "windDir80mDEG":195,
                  "windDir80m":"SSW",
                  "windDirMax80mDEG":180,
                  "windDirMax80m":"S",
                  "windDirMin80mDEG":180,
                  "windDirMin80m":"S",
                  "windGust80mKTS":24,
                  "windGust80mKPH":45,
                  "windGust80mMPH":28,
                  "windSpeed80mKTS":22,
                  "windSpeed80mKPH":41,
                  "windSpeed80mMPH":25,
                  "windSpeedMax80mKTS":24,
                  "windSpeedMax80mKPH":45,
                  "windSpeedMax80mMPH":28,
                  "windSpeedMin80mKTS":20,
                  "windSpeedMin80mKPH":36,
                  "windSpeedMin80mMPH":23,
                  "weather":"Partly Cloudy",
                  "weatherCoded":[

                  ],
                  "weatherPrimary":"Partly Cloudy",
                  "weatherPrimaryCoded":"::SC",
                  "cloudsCoded":"SC",
                  "icon":"pcloudy.png",
                  "isDay":true,
                  "sunrise":1442404409,
                  "sunriseISO":"2015-09-16T06:53:29-05:00",
                  "sunset":1442449319,
                  "sunsetISO":"2015-09-16T19:21:59-05:00"
               }
            ],
            "profile":{
               "tz":"America/Chicago"
            }
         }
      }
   ]
}
								

Response Properties

The following properties will be provided in every response object:

interval (number) The interval between periods.
periods[#].timestamp (number) UNIX timestamp of the forecast valid time.
periods[#].validTime (string) Localized valid time of the forecast. (Deprecated. Use dateTimeISO)
periods[#].dateTimeISO (string) ISO 8601 of the valid time of the forecast.
periods[#].maxTempC (number) Max expected temperature in Celsius. - Provided with filter=day (Default) and for the day time periods with filter=daynight
periods[#].maxTempF (number) Max expected temperature in Fahrenheit. - Provided with filter=day (Default) and for the day time periods with filter=daynight
periods[#].minTempC (number) Minimum expected temperature in Celsius. - Provided with filter=day (Default) and for the night time periods with filter=daynight
periods[#].minTempF (number) Minimum expected temperature in Fahrenheit. - Provided with filter=day (Default) and for the night time periods with filter=daynight
periods[#].avgTempC (number) Average temperature in Celsius.
periods[#].avgTempF (number) Average temperature in Fahrenheit.
periods[#].tempC (number) Temperature in Celsius. Value will be null when using filter=day or filter=daynight
periods[#].tempF (number) Temperature in Fahrenheit. Value will be null when using filter=day or filter=daynight
periods[#].pop (number) Probability of precipitation. A percentage from 0 - 100%. Null if unavailable.
periods[#].precipMM (number) Precipitation expected in millimeters. The total liquid equivalent of all precipitation.
periods[#].precipIN (number) Precipitation expected in inches. The total liquid equivalent of all precipitation.
periods[#].iceaccum (number) The amount of ice accumulated.
periods[#].maxHumidity (number) Maximum humidity percentage.
periods[#].minHumidity (number) Minimum humidity percentage.
periods[#].humidity (number) Humidity percentage.
periods[#].uvi (number) The ultraviolet index. Integer from 0 - 12, null if unavailable. Available for the first five days of the forecasts
periods[#].pressureMB (number) Barometric pressure in millibars.
periods[#].pressureIN (number) Barometric pressure in inches mercury.
periods[#].sky (number) Sky cover percentage, 0 = clear, 100 = cloudy.
periods[#].snowCM (number) Snowfall amount in centimeters.
periods[#].snowIN (number) Snowfall amount in inches.
periods[#].feelslikeC (number) The apparent temperature in Celsius. - Not used/valid when using filter=day or filter=daynight
periods[#].feelslikeF (number) The apparent temperature in Fahrenheit. - Not used/valid when using filter=day or filter=daynight
periods[#].minFeelslikeC (number) The minimum apparent temperature in Celsius.
periods[#].minFeelslikeF (number) The minimum apparent temperature in Fahrenheit.
periods[#].maxFeelslikeC (number) The maximum apparent temperature in Celsius.
periods[#].maxFeelslikeF (number) The maximum apparent temperature in Fahrenheit.
periods[#].avgFeelslikeC (number) The average apparent temperature in Celsius.
periods[#].avgFeelslikeF (number) The average apparent temperature in Fahrenheit.
periods[#].dewpointC (number) The dew point temperature in Celsius. - Not used/valid when using filter=day or filter=daynight
periods[#].dewpointF (number) The dew point temperature in Fahrenheit. - Not used/valid when using filter=day or filter=daynight
periods[#].maxDewpointC (number) The maximum dew point temperature in Celsius.
periods[#].maxDewpointF (number) The maximum dew point temperature in Fahrenheit.
periods[#].minDewpointC (number) The minimum dew point temperature in Celsius.
periods[#].minDewpiontF (number) The minimum dew point temperature in Fahrenheit.
periods[#].avgDewpointC (number) The average dew point temperature in Celsius.
periods[#].avgDewpointF (number) The average dew point temperature in Fahrenheit.
periods[#].windDirDEG (number) The wind direction in degrees. - Not used/valid when using filter=day or filter=daynight
periods[#].windDir (string) Wind direction in cardinal coordinates. - Not used/valid when using filter=day or filter=daynight
periods[#].windDirMaxDEG (number) The wind direction in degrees (0=North) at the time of maximum wind speed (windSpeedMaxMPH).
periods[#].windDirMax (string) Wind direction in cardinal coordinates at the time of maximum wind speed (windSpeedMaxMPH).
periods[#].windDirMinDEG (number) The wind direction in degrees (0=North) at the time of minimum wind speed (windSpeedMinMPH).
periods[#].windDirMin (string) Wind direction in cardinal coordinates at the time of minimum wind speed (windSpeedMinMPH).
periods[#].windGustKTS (number) Wind gust in knots.
periods[#].windGustKPH (number) Wind gust in kilometers per hour.
periods[#].windGustMPH (number) Wind gust in miles per hour.
periods[#].windSpeedKTS (number) Wind speed in knots.
periods[#].windSpeedKPH (number) Wind speed in kilometers per hour.
periods[#].windSpeedMPH (number) Wind speed in miles per hour.
periods[#].windSpeedMaxKTS (number) The max wind speed in knots.
periods[#].windSpeedMaxKPH (number) The max wind speed in kilometers per hour.
periods[#].windSpeedMaxMPH (number) The max wind speed in miles per hour.
periods[#].windSpeedMinKTS (number) The minimum wind speed in knots.
periods[#].windSpeedMinKPH (number) The minimum wind speed in kilometers per hour.
periods[#].windSpeedMinMPH (number) The minimum wind speed in miles per hour.
periods[#].windDir80mDEG (number) The wind direction in degrees at a height of 80 meters.
periods[#].windDir80m (string) Wind direction in cardinal coordinates at a height of 80 meters.
periods[#].windDirMax80mDEG (number) The wind direction in degrees (0=North) at the time of maximum wind speed at a height of 80 meters.
periods[#].windDirMax80m (string) Wind direction in cardinal coordinates at the time of maximum wind speed at a height of 80 meters.
periods[#].windDirMin80mDEG (number) The wind direction in degrees (0=North) at the time of minimum wind speed at a height of 80 meters.
periods[#].windDirMin80m (string) Wind direction in cardinal coordinates at the time of minimum wind speed at a height of 80 meters.
periods[#].windGust80mKTS (number) Wind gust in knots at a height of 80 meters.
periods[#].windGust80mKPH (number) Wind gust in kilometers per hour at a height of 80 meters.
periods[#].windGust80mMPH (number) Wind gust in miles per hour at a height of 80 meters.
periods[#].windSpeed80mKTS (number) The wind speed in knots at a height of 80 meters.
periods[#].windSpeed80mKPH (number) The wind speed in kilometers per hour at a height of 80 meters.
periods[#].windSpeed80mMPH (number) The wind speed in miles per hour at a height of 80 meters.
periods[#].windSpeedMax80mKTS (number) The maximum wind speed in knots at a height of 80 meters.
periods[#].windSpeedMax80mKPH (number) The maximum wind speed in kilometers per hour at a height of 80 meters.
periods[#].windSpeedMax80mMPH (number) The maximum wind speed in miles per hour at a height of 80 meters.
periods[#].windSpeedMin80mKTS (number) The minimum wind speed in knots at a height of 80 meters.
periods[#].windSpeedMin80mKPH (number) The minimum wind speed in kilometers per hour at a height of 80 meters.
periods[#].windSpeedMin80mMPH (number) The minimum wind speed in miles per hour at a height of 80 meters.
periods[#].weather (string) Full weather phrase that combines the weather from all periods as needed.
periods[#].weatherCoded (string) Array of periods containing different weather types; can be used to determine when a particular type of weather is expected to begin/end. Refer to the Coded Weather documentation for additional information on the types of weather codes.
periods[#].weatherCoded.timestamp (number) UNIX timestamp for the beginning of this period.
periods[#].weatherCoded.wx (string) Coded form of the weather expected for this period. Refer to the Coded Weather documentation for additional information on the types of weather codes.
periods[#].weatherPrimary (string) Primary weather across all periods.
periods[#].weatherPrimaryCoded (string) Primary weather coded. Refer to the Coded Weather documentation for additional information on the types of weather codes.
periods[#].cloudsCoded (string) Code for the cloud type. Refer to the Coded Weather documentation for additional information on the types of cloud codes.
periods[#].icon (string) Weather icon representing the expected weather from the default Aeris icon set. For more custom implementations, icons can be determined by the weatherCoded and weatherCodedPrimary properties.
periods[#].isDay (boolean) True if the period is during the day, otherwise false.
periods[#].sunrise (number) Sunrise time as a UNIX timestamp. Provided when using filter=day (default) or filter=daynight. Not currently available for hourly forecasts. NOTE: If no sunrise (Midnight sun / polar night) a boolean false will be returned
periods[#].sunriseISO (string) ISO 8601 date of the sunrise for the observation location. Provided when using filter=day (default) or filter=daynight. Not currently available for hourly forecasts. NOTE: If no sunrise (Midnight sun / polar night) a boolean false will be returned
periods[#].sunset (number) Sunset time as a UNIX timestamp. Provided when using filter=day (default) or filter=daynight. Not currently available for hourly forecasts. NOTE: If no sunset (Midnight sun / polar night) a boolean false will be returned
periods[#].sunsetISO (string) ISO 8601 date of the sunsetbfor the observation location. Provided when using filter=day (default) or filter=daynight. Not currently available for hourly forecasts. NOTE: If no sunset(Midnight sun / polar night) a boolean false will be returned
loc.long (number) The longitude coordinate of the record.
loc.lat (number) The latitude coordinate of the record.
profile.tz (string) The timezone name association with the record's location.