Endpoint: winter/snowdepth

The winter/snowdepth endpoint can provide estimated snow depth information for locations throughout the United States and portions of Canada.  The endpoint has a spatial resolution of approximately 1km.

Supported Actions

The following actions are supported with the winter/snowdepth 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 your request does not return results, you may try setting or increasing the radius being used.

Supported Parameters

The following parameters are optional unless otherwise noted:

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.
p p=:place Defines the location to query data for. Refer to the list of supported place value formats.
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.

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]

Returns the latest estimated snow depth for Whitefish, MT
/winter/snowdepth/whitefish,mt?

Returns the latest estimated snow depth for Whitefish, MT via a latitude/longitude combination.
/winter/snowdepth/48.41108,-114.33763?

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": 48.77734,
            "long": -121.8132
        },
        "place": {
            "name": "mount baker",
            "state": "wa",
            "country": "us"
        },
        "periods": [{
            "timestamp": 1528268400,
            "dateTimeISO": "2018-06-06T00:00:00-07:00",
            "snowDepthCM": 3276.7,
            "snowDepthIN": 1290.04
        }],
        "profile": {
            "tz": "America\/Los_Angeles"
        }
    }
}
								

{
    "type": "FeatureCollection",
    "features": [{
        "type": "Feature",
        "geometry": {
            "type": "Point",
            "coordinates": [-121.8132, 48.77734]
        },
        "properties": {
            "loc": {
                "lat": 48.77734,
                "long": -121.8132
            },
            "place": {
                "name": "mount baker",
                "state": "wa",
                "country": "us"
            },
            "periods": [{
                "timestamp": 1528268400,
                "dateTimeISO": "2018-06-06T00:00:00-07:00",
                "snowDepthCM": 3276.7,
                "snowDepthIN": 1290.04
            }],
            "profile": {
                "tz": "America\/Los_Angeles"
            }
        }
    }]
}
								

Response Properties

The following properties will be provided in every response object:

periods (array) Array of snow depth objects
periods[#].timestamp (number) UNIX timestamp of the day. Midnight local time.
periods[#].dateTimeISO (string) ISO 8601 date of the day. Midnight local time.
periods[#].snowDepthCM (number) The snow depth in centimeters.
periods[#].snowDepthIN (number) The snow depth in inches.
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.