API Actions

The following are the supported actions with the AerisWeather API. Note that some actions are not supported for certain endpoints. Refer to each endpoint documentation for a list of supported actions for that endpoint.

Action Description
: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.
affects The affects action requests all places affected by a particular type of event, such as earthquake or storm cell. The query for places affected is unique for each endpoint it belongs to and can be a polygon (e.g., storm cell forecasts or warnings) or a circle with the center being the location of the event (e.g., earthquakes or fires). Instead of returning an array of objects specific to the endpoint, the affects action will always return an array of place objects in the same format as the within action on the places endpoint.

Note: Not all endpoints support this action, so refer to each endpoint's complete documentation to determine if supported and its usage.
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 your request does not return results, you may try setting or increasing the radius being used.
contains The contains action returns data that a specified location is contained within. This action is normally associated with endpoints that contain polygon data, allowing to return only the polygons a point / geometry is contained in. This action can be considered the opposite of the within endpoint.
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.
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.
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.