Endpoint: phrases/summary

The phrases/summary provides weather summary phrasing based on the latest observations and the forecast over the next few hours for the requested location. The limit parameter can be utilized to control the number of hours the summary phrase covers, the default is 6 hours and the maximum is 12 hours.

https://api.aerisapi.com/phrases/summary

Adjusting the Phrasing

The summary phrase is created based on a combination of the latest observations and the next few hours of the forecast. The following parameter may be utilized to adjust the phrasing.

  • The radius parameter may be utilized to control the maximum distance the API utilized to find a nearby observation station. The default is 50 miles.
  • The filter parameter can be used to determine which type of observation stations are used to help create the phrase.
  • The limit parameter can be used to control how many hours of forecast information are used when generating the phrase. This can be set to a value of 1 to 12. The default is 6.

Supported Actions

The following actions are supported with the phrases/summary 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.

Supported Parameters

The following parameters are optional unless otherwise noted:

p p=:place Defines the location to query data for. Refer to the list of supported place value formats.
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.
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", "25miles". If no unit is provided, your value is assumed to be in meters by default.

Most endpoints utilize a default radius of 50 miles, though some endpoints, such as lightning, may have tighter restrictions specified.
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.
format format=:string Defines the API output format. The available options include:
format=json - Standard JSON output. This is the default.
format=geojson - API will output GeoJSON.

If obtaining GeoJSON and using the fields parameter, be sure to include loc to ensure geographical references are available in the response.
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.
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.
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:

metar (default) Will utilize only METAR observation stations when generating the phrase.
pws Will utilize only PWS observation stations from PWSweather.com when generating the phrase.
mesonet Will utilize only MESONET observation stations when generating the phrase.
allstations Will utilize all available stations including personal weather stations when generating the phrase.
noob Prevents the API from using the latest observation from influencing the phrase, thus returning a forecast only phrase.

Examples

The /[:endpoint]/[:action]? portion within the query template below can be exchanged with any of the examples. Also, please note you will need to input your client credentials in the [ID] and [SECRET] fields which can be found under the Apps section of the members area.

https://api.aerisapi.com/[:endpoint]/[:action]?client_id=[ID]&client_secret=[SECRET]

Obtain the weather summary for Minneapolis, MN
/phrases/summary/minneapolis,mn?

Obtain the weather summary for Minneapolis, MN
/phrases/summary?p=minneapolis,mn&

Obtain the weather summary for the next 3 hours instead of the default 6 hours.
/phrases/summary/minneapolis,mn?limit=3&

Obtain the weather summary phrase for Toronto, Canada
/phrases/summary/toronto,canada?

Obtain the weather summary phrase for London, UK via a latitude / longitude combination
/phrases/summary/51.50853,-0.12574?

Obtain the weather summary for Minneapolis, MN, but since the radius is so small, the phrase will be based on the next 6 hours of forecast only.
/phrases/summary/minneapolis,mn?radius=0.001mile&

Obtain the weather summary for Minneapolis, MN and pull any of observations stations types, including Personal Weather Stations, when generating the phrase.
/phrases/summary/minneapolis,mn?filter=allstations&

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

{
    "success": true,
    "error": null,
    "response": [{
        "loc": {
            "lat": 30.06263,
            "long": 31.24967
        },
        "place": {
            "name": "cairo",
            "state": "",
            "country": "eg"
        },
        "profile": {
            "tz": "Africa\/Cairo"
        },
        "phrases": {
            "short": "Expect clear skies with temperatures falling to the upper 70s overnight.",
            "shortMET": "Expect clear skies with temperatures falling to 25 degrees overnight.",
            "long": "Expect clear skies with temperatures falling to the upper 70s overnight.",
            "longMET": "Expect clear skies with temperatures falling to 25 degrees overnight."
        }
    }]
}
								

{
    "type": "FeatureCollection",
    "features": [{
        "type": "Feature",
        "geometry": {
            "type": "Point",
            "coordinates": [31.24967, 30.06263]
        },
        "properties": {
            "loc": {
                "lat": 30.06263,
                "long": 31.24967
            },
            "place": {
                "name": "cairo",
                "state": "",
                "country": "eg"
            },
            "profile": {
                "tz": "Africa\/Cairo"
            },
            "phrases": {
                "short": "Expect clear skies with temperatures falling to the upper 70s overnight.",
                "shortMET": "Expect clear skies with temperatures falling to 25 degrees overnight.",
                "long": "Expect clear skies with temperatures falling to the upper 70s overnight.",
                "longMET": "Expect clear skies with temperatures falling to 25 degrees overnight."
            }
        }
    }]
}
								

Response Properties

The following properties will be provided in every response object:

phrases (object) Object containing the phrases
phrases.short (string) Short version of phrasing using imperial units
phrases.shortMET (string) Short version of phrasing using metric units
phrases.long (string) Long version of phrasing using imperial units
phrases.longMET (string) Long version of phrasing using metric units
loc.long (number) The longitude coordinate of the record.
loc.lat (number) The latitude coordinate of the record.
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.