Endpoint: advisories

The advisories data set provides access to all currently active US advisories as issued by the National Weather Service (NWS). The NWS issues a variety of severe weather warnings, watches, advisories and statements that may be issued for a single forecast zone or county, or for a larger region.

https://api.aerisapi.com/advisories/

Data CoverageContinental US, Alaska, Hawaii

Included With API Developer,  API Basic,  API Premium

Supported Advisory Types

Please refer to the full list of available advisories, type and color codes:
http://www.aerisweather.com/support/docs/aeris-maps/reference/advisory-types/

The advisory type codes may be passed in the type element of the query parameter and correspond to the details.type in the response output.

Supported Actions

The following actions are supported with the advisories 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.
within The within action allows for returning data within a variety of different geometrical regions. Currently supported geometries include a circle (requires a center point and radius), square (requires two coordinate points defining the top-left and bottom-right corners) and polygon (requires at least three coordinate points). Unlike the closest action, the results will not be returned in any particular order based on distance.
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.
search The search action is used as a more general query method and expects the query to be defined with the custom query for the request. Unlike the closest action, results will not be returned in any particular order.

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.
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.
query query=:string Used to filter results based on certain fields in the data set. See Advanced Queries for more details.
radius radius=:distance:unit When requesting the closest results within a circle, the radius determines how far from the specified location to search. A valid unit value must be included in your radius value, e.g., "5mi", "10km", "50miles". If no unit is provided, your value is assumed to be in meters by default.

The default radius is 25 miles if not specified.
sort sort=:string Used to sort results based on certain fields in the data set. See Sorting for more details.
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.
skip skip=:number Used to skip over a specific number of results in the data set.

Supported Filters

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

county Some advisories such as Tornado warnings, severe thunderstorm warnings, flash flood warnings, flood warnings are issued county based, but include a small polygon of the coverage area within the county that is being affected. By default, if this small polygon exists, the API will only return the advisory, if the requested latitude/longitude is within the provided small polygon.

Using the filter=county option will make the API ignore any small polygon within the warning and return the warning based on the larger county coverage area.
warning Returns all warnings.

A warning is issued when a hazardous weather or hydrologic event is occurring, imminent, or likely. A warning means weather conditions pose a threat to life or property. People in the path of the storm need to take protective action.
watch Returns all watches.

A watch is used when the risk of a hazardous weather or hydrologic event has increased significantly, but its occurrence, location, or timing is still uncertain. It is intended to provide enough lead time so those who need to set their plans in motion can do so. A watch means that hazardous weather is possible. People should have a plan of action in case a storm threatens and they should listen for later information and possible warnings especially when planning travel or outdoor activities.
advisory Returns all advisories.

An advisory is issued when a hazardous weather or hydrologic event is occurring, imminent, or likely. Advisories are for "less serious" conditions than warnings that may cause significant inconvenience, and if caution is not exercised could lead to situations that may threaten life or property.
outlook Returns all outlooks.

An outlook is issued daily to indicate that a hazardous weather or hydrologic event may occur in the next several days. The outlook will include information about potential severe thunderstorms, heavy rain or flooding, winter weather, extremes of heat or cold, etc., that may develop over the next 7 days with an emphasis on the first 24 hours of the forecast. It is intended to provide information to those who need considerable lead time to prepare for the event.
statement Returns all special weather statements.
severe Returns all severe-related advisories:
- severe thunderstorm
- tornado
flood Returns all flood/hydro-related advisories:
- debris flow
- flood, flash flood
- hydrologic
tropical Returns all tropical-related advisories:
- tropical storm, hurricane, typhoon
- tropical storm wind
- hurricane wind
- extreme wind
winter Returns all winter-related advisories:
- blizzard, winter storm, winter weather
- snow, heavy snow
- lake effect snow
- snow and blowing snow
- ice pellets, freezing rain, ice storm
- wind chill
marine Returns all marine/coastal-related advisories:
- marine
- freezing spray, heavy freezing spray
- small craft
- small craft for winds
- small craft for hazardous seas
- small craft for rough bar
- gale
- hazardous seas
- hurricane force winds
- lakeshore flood
- coastal flood, high surf
- tsunami
- low water
- dense fog, dense smoke, ashfall (marine)
nonprecip Returns all non-precipitation-related advisories:
- blowing dust/dust storm
- wind, high wind, lake wind
- dense smoke
- dense fog, freezing fog
- freeze, frost
- heat, excessive heat, extreme cold
forecast Returns forecasts, normally short-term forecasts.
all Return all warnings, watches, advisories, statements, outlooks and forecasts.
wind Returns wind-related advisories.
fire Returns fire-related advisories.
tsunami Returns tsunami-related advisories.
now Returns advisories that are currently in effect.
synopsis Returns a synopsis of the advisories.

Supported Query Properties

Use the following supported property keys when creating custom queries for your requests:

type Used to query the advisory type. The value should be set to the VTEC Code or the WMO if no VTEC code exists. Review the list of allowed Advisory Types.

Examples:
/advisories/minneapolis,mn?query=type:TO.W will return only the tornado warnings
/advisories/minneapolis,mn?query=type:TO.W;type:NOW will return tornado warnings and short-term forecasts
wxzone Used to query by the zone id the alert is issued for. Normally will be a NOAA public weather zone that looks similar to: VAZ014 or if issued for a specific county : VAC023
state Used to query by state, useful for requesting all advisories for a specific state. Two letter, lower case state abbreviation.
sig Used to query by the one character coded significance of an advisory type.
W = Warning
A = Watch
Y = Advisory
S = Statement
O = Outlook
F = Forecast

Examples:
/advisories/minneapolis,mn?query=sig:W;sig:A (returning alerts for Minneapolis, MN that are warnings or watches)
sigp Used to query by the numeric representation of an advisory type. A lower number has higher significance.
1 = Warning
3 = Watch
5 = Advisory
7 = Statement
9 = Forecast (Short term)
11 = Outlook

Examples:
/advisories/minneapolis,mn?query=sigp:1:3 (returns only warnings and watches for Minneapolis, MN)
name County name or weather zone name (lowercase) of the location the advisory has been issued for.
country Two letter country abbreviation (lowercase) of the location the advisory was issued for. (US only)
issued Used to query by the date the alert is issued for.
expires Used to query by the date the alert is scheduled to expire.
active Used to query active or inactive advisories.
0 = not active
1 = active
By default the API will not return in active advisories

Examples:
/advisories/minneapolis,min?query=active:0:0 (returns only warnings and advisories that are no longer active for Minneapolis, MN)

Examples

Returns data for zip code 55403.
/advisories/55403

Return advisories for zip code 55403, ignoring any small polygons. If a severe thunderstorm or tornado warning is issued for anywhere in the same county, it will be returned.
/advisories/55403?filter=county

Returns the advisories that affect the specified latitude/longitude.
/advisories/45.25,-95.25

Returns an array of advisory objects, sorted by distances, closest to furthest. “distance” value is included in each advisory object.
/advisories/closest?p=45.25,-95.25

Return closest/nearby advisories to the specified point.
/advisories/closest?p=45.25,-95.25

Return up to 5 advisories within 50 miles of zip code 55403 (Minneapolis). Results will be sorted by distance (ascending) from zip code 55403.
/advisories/closest?p=55403&limit=5&radius=50mi

Return up to one tornado warning within 25 miles of zip code 55403.
/advisories/closest?p=55403&query=type:TO.W

Return all tornado warnings within 25 miles of zip code 55403. Results will be sorted by distance.
/advisories/closest?p=55403&query=TO.W&limit=0

Returns all advisories within a rectangle defined by the coordinates specified in the point parameter. The points should be: top latitude, left longitude, bottom latitude, right longitude.
/advisories/within?p=:top,:left,:bottom,:right
/advisories/within?p=45.25,-95.25,35.25,-85.25

Returns all advisories within a circle with its center at the specified latitude/longitude point and a radius distance from that center.
NOTE: This functionality is similar to the closest search, but does not include a distance or sorting. It is a faster query.
/advisories/within?p=:lat,:lon&radius=:distance
/advisories/within?p=44,-93&radius=25miles

Returns all advisories within a polygon specified by a series of comma-separated latitude, longitude points. There must be three or more points specified.
/advisories/within?p=:lat1,:lon1,:lat2,:lon2,:lat3,:lon3...
/advisories/within?p=30.69,-86.04,33.19,-84.31,29.90,-82.05

Return up to 10 advisories within the rectangle specified with the top-left corner at 45.25, -95.25 and the bottom-right corner at 35.25, -85.25.
/advisories/within?p=45.25,-95.25,35.25,-85.25&limit=10

Return all tornado warnings within the rectangle specified with the top-left corner at 45.25, -95.25 and the bottom-right corner at 35.25, -85.25.
/advisories/within?p=45.25,-95.25,35.25,-85.25&query=type:TO.W

Return all severe and wind-related advisories within the rectangle specified with the top-left corner at 45.25, -95.25 and the bottom-right corner at 35.25, -85.25.
/advisories/within?p=45.25,-95.25,35.25,-85.25&filter=severe;wind

Returns all advisories within a circle with a center at zip code 55403 (Minneapolis) and a radius of 25 miles (the default).
NOTE: This functionality is similar to the closest search, thus you can pass radius as needed.
/advisories/within?p=55403

Return all tornado warnings.
/advisories/search?query=type:TO.W

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.


{
   "details":{
      "type":"FL.W",
      "name":"FLOOD WARNING",
      "loc":"ARC147",
      "body":"...FROM THE NATIONAL WEATHER SERVICE IN LITTLE ROCK...THE FLOOD \nWARNING CONTINUES FOR THE FOLLOWING RIVER IN ARKANSAS... \n\nCACHE RIVER NEAR PATTERSON AFFECTING JACKSON AND WOODRUFF COUNTIES\n\n\nRIVER FORECASTS ARE BASED ON CURRENT CONDITIONS AND RAINFALL \nFORECASTED TO OCCUR OVER THE NEXT 12 HOURS. DURING PERIODS OF \nFLOODING...EVENING FORECASTS ARE REISSUED WITH UPDATED RAINFALL \nFORECASTS.\n\nOBSERVED AND FORECASTED STAGE DATA PLOTS ARE AVAILABLE ON OUR \nADVANCED HYDROLOGIC PREDICTION SERVICE WEB PAGE AT...\nWWW.SRH.NOAA.GOV\/LZK\nUNDER THE CURRENT CONDITIONS SECTION...SELECT RIVER AND LAKES AHPS.\n\nSAFETY MESSAGE...REMEMBER TO TURN AROUND...DONT DROWN\nDO NOT DRIVE CARS THROUGH FLOODED AREAS.\n\nEVERYONE WITH PROPERTY OR OTHER INTEREST ALONG STREAMS AND RIVERS\nSHOULD REMAIN ALERT TO CHANGING WEATHER FORECAST. SHOULD CONDITIONS \nCHANGE...LOOK FOR RIVER FORECAST OR FLOOD WARNINGS FOR USE IN MAKING \nINFORMED DECISIONS TO PROTECT LIFE AND PROPERTY.\n\n\nTHE FLOOD WARNING CONTINUES FOR\nTHE CACHE RIVER NEAR PATTERSON.\n* FROM SUNDAY AFTERNOON UNTIL FURTHER NOTICE...OR UNTIL THE WARNING \nIS CANCELLED.\n* AT 10:00 AM FRIDAY THE STAGE WAS 6.5 FEET. \n* MINOR FLOODING IS FORECAST.\n* FLOOD STAGE IS 8.0 FEET. \n* FORECAST...RISE ABOVE FLOOD STAGE THIS WEEKEND AND \nCONTINUE TO RISE TO NEAR 9.0 FEET BY MONDAY EVENING.\n* IMPACTS AT 8.0 FEET...LOW SWAMPY TIMBERLAND ALONG THE RIVER BEGINS \nTO FLOOD. FLOOD GATES SHOULD BE CLOSED AND EQUIPMENT MOVED OUT OF \nTHE LOW GROUNDS ALONG THE RIVER AND TRIBUTARIES.\n\n\nFLD  OBSERVED                  FORECAST 6AM\nLOCATION     STG  STG  DAY TIME    SAT    SUN    MON    TUE    WED\n\nCACHE RIVER\nPATTERSON    8   6.5 FRI 10 AM    6.4    7.5    8.8    9.0    8.7",
      "bodyFull":"WGUS84 KLZK 181534\nFLSLZK\n\n\nFLOOD STATEMENT\nNATIONAL WEATHER SERVICE LITTLE ROCK AR\n1034 AM CDT FRI OCT 18 2013\n\n...FROM THE NATIONAL WEATHER SERVICE IN LITTLE ROCK...THE FLOOD \nWARNING CONTINUES FOR THE FOLLOWING RIVER IN ARKANSAS... \n\nCACHE RIVER NEAR PATTERSON AFFECTING JACKSON AND WOODRUFF COUNTIES\n\n\nRIVER FORECASTS ARE BASED ON CURRENT CONDITIONS AND RAINFALL \nFORECASTED TO OCCUR OVER THE NEXT 12 HOURS. DURING PERIODS OF \nFLOODING...EVENING FORECASTS ARE REISSUED WITH UPDATED RAINFALL \nFORECASTS.\n\nOBSERVED AND FORECASTED STAGE DATA PLOTS ARE AVAILABLE ON OUR \nADVANCED HYDROLOGIC PREDICTION SERVICE WEB PAGE AT...\nWWW.SRH.NOAA.GOV\/LZK\nUNDER THE CURRENT CONDITIONS SECTION...SELECT RIVER AND LAKES AHPS.\n\n\nPRECAUTIONARY\/PREPAREDNESS ACTIONS...\n\nSAFETY MESSAGE...REMEMBER TO TURN AROUND...DONT DROWN\nDO NOT DRIVE CARS THROUGH FLOODED AREAS.\n\nEVERYONE WITH PROPERTY OR OTHER INTEREST ALONG STREAMS AND RIVERS\nSHOULD REMAIN ALERT TO CHANGING WEATHER FORECAST. SHOULD CONDITIONS \nCHANGE...LOOK FOR RIVER FORECAST OR FLOOD WARNINGS FOR USE IN MAKING \nINFORMED DECISIONS TO PROTECT LIFE AND PROPERTY.\n\n\n&&\n\nARC067-147-190634-\n\/O.EXT.KLZK.FL.W.0043.131020T1930Z-000000T0000Z\/\n\/PTTA4.1.ER.131020T1930Z.131022T0000Z.000000T0000Z.NO\/\n1034 AM CDT FRI OCT 18 2013\n\n\n\nTHE FLOOD WARNING CONTINUES FOR\nTHE CACHE RIVER NEAR PATTERSON.\n* FROM SUNDAY AFTERNOON UNTIL FURTHER NOTICE...OR UNTIL THE WARNING \nIS CANCELLED.\n* AT 10:00 AM FRIDAY THE STAGE WAS 6.5 FEET. \n* MINOR FLOODING IS FORECAST.\n* FLOOD STAGE IS 8.0 FEET. \n* FORECAST...RISE ABOVE FLOOD STAGE THIS WEEKEND AND \nCONTINUE TO RISE TO NEAR 9.0 FEET BY MONDAY EVENING.\n* IMPACTS AT 8.0 FEET...LOW SWAMPY TIMBERLAND ALONG THE RIVER BEGINS \nTO FLOOD. FLOOD GATES SHOULD BE CLOSED AND EQUIPMENT MOVED OUT OF \nTHE LOW GROUNDS ALONG THE RIVER AND TRIBUTARIES.\n\n\n\n&&\n\n\nFLD  OBSERVED                  FORECAST 6AM\nLOCATION     STG  STG  DAY TIME    SAT    SUN    MON    TUE    WED\n\nCACHE RIVER\nPATTERSON    8   6.5 FRI 10 AM    6.4    7.5    8.8    9.0    8.7"
   },
   "timestamps":{
      "issued":1382110440,
      "issuedISO":"2013-10-18T10:34:00-05:00",
      "begins":1382297400,
      "beginsISO":"2013-10-20T14:30:00-05:00",
      "expires":1382164440,
      "expiresISO":"2013-10-19T01:34:00-05:00",
      "added":1382110472,
      "addedISO":"2013-10-18T10:34:32-05:00"
   },
   "poly":"",
   "includes":{
      "counties":[
         "ARC067",
         "ARC147"
      ],
      "fips":[
         "05067",
         "05147"
      ],
      "wxzones":[
         "ARZ025",
         "ARZ034"
      ],
      "zipcodes":[
         72005,
         72006,
         72014,
         72036,
         72043,
         72059,
         72074,
         72075,
         72101,
         72112,
         72123,
         72169,
         72431,
         72471,
         72473
      ]
   },
   "place":{
      "country":"us",
      "county":"147",
      "name":"woodruff county",
      "state":"ar"
   },
   "profile":{
      "tz":"America/Chicago"
   }
}
								

Response Properties

The following properties will be provided in every response object:

details.type (string) The valid-time event code (VTEC) for the advisory. Review the list of allowed Advisory Types.
details.name (string) The type name for the advisory.
details.loc (string) The weather zone for the advisory.
details.body (string) The shortened and formatted version of the advisory body text.
details.bodyFull (string) The complete, unmodified version of the advisory body text, including headers.
timestamps.issued (number) UNIX timestamp when the advisory was issued by the NWS.
timestamps.issuedISO (string) ISO 8601 date of the time when the advisory was issued.
timestamps.begins (number) UNIX timestamp when the advisory goes into effect.
timestamps.beginsISO (string) ISO 8601 date of the time when the advisory goes into effect.
timestamps.expires (number) UNIX timestamp when the advisory expires.
timestamps.expiresISO (string) ISO 8601 date of the time when the advisory expires.
timestamps.added (number) UNIX timestamp when the advisory was stored.
timestamps.addedISO (string) ISO 8601 date of the time when the advisory was stored.
poly (string) A comma-delimited string of latitude,longitude coordinates defining the boundary for this advisory; typically used for certain advisories, such as tornado and severe thunderstorm warnings.
includes.counties (array) List of US counties in the XXC### format, where XX is the state abbreivation and ### is the 3 digit county fips number.
includes.fips (array) List of US counties in the XX### format, where XX is the state two digit fips number and ### is the 3 digit county fips number.
includes.wxzones (array) List of US public weather zones in the NOAA XXZ### format, where XX is the state abbreivation and ### is the 3 digit public zone id.
includes.zipcodes (array) List of US zip codes that are affected by the advisory.
place.county (string) The FIPS code of the county in which the advisory is located.
place.name (string) The place or nearest place to the record.
place.state (string) The state abbreviation in which the record is located. This may be null depending on the country.
place.country (string) The country abbreviation in which the record is located.
profile.tz (string) The timezone name association with the record's location.