The normals endpoint provides access to the 30-year climate normals for US locations. This endpoint allows the receipt of up to one month of information per request.
Use our wizard to try out this endpoint
Max Limits: |
|
plimit: | 31 |
The following actions are supported with the normals 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 endpoint'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. |
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), rectangle (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. |
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. |
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. |
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. The maximum limit for this endpoint is 250. |
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. |
minradius | minradius=:distance:unit |
When requesting the closest results within a circle, the minradius determines how far from the specified location to search to begin searching results. A valid unit value must be included in your minimum radius value, e.g., "5mi", "10km", or "25miles". If no unit is provided, your value is assumed to be in meters by default. When combined with the radius parameter, donut style queries can be made for point data, such as lightning. |
query | query=:string |
Used to filter results based on certain fields in the data set. See Advanced Queries for more details. |
sort | sort=:string |
Used to sort results based on certain fields in the data set. See Sorting for more details. |
skip | skip=:number |
Used to skip over a specific number of results in the data set. |
from | from=:string |
Returns the results starting from the value specified. For best practices we recommend using the to parameter as well to define a specific time frame.Supports a UNIX timestamp or a specific date string. Alternatively, common date formats supported by the PHP strtotime() function will be accepted; however, commas are not accepted. Examples: from=tomorrow from=friday from=1302883980 from=MM/DD/YYYY from=YYYY/MM/DD from=+2hours from=2017-02-27 5:00 PM |
to | to=:string |
Returns the results between now and the value specified. For best practices we recommend using the from parameter as well to define a specific time frame. 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 or a specific date string. Alternatively, common date formats supported by the PHP strtotime() function will be accepted; however, commas are not accepted. Examples: to=+6hours to=+5days to=1302883980 to=MM/DD/YYYY to=YYYY/MM/DD to=2017-02-27 5:00 PM |
plimit | plimit=:total |
Applied only on the periods property, the total number of periods to return as an integer. The maximum plimit for this endpoint is 31. |
psort | psort=:string |
Applied only on the periods property, used to sort results based on certain fields contained within the periods. |
pskip | pskip=:number |
Applied only on the periods property, used to skip over a specific number of periods in the data set. |
pfilter | pfilter=:string |
Predefined filters for limiting the results. The filter value can be a single, comma-delimited or a semicolon delimited string of filter names. |
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. |
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. |
The following filters can be passed to the filter parameter to reduce the results that are returned:
daily | (default) Return daily normals. |
monthly | Return monthly normal summary. |
annual | Return annual/yearly normal summary. |
hastemp | Return normals that have a temperature. Note that some normal stations could only have precip info. |
hasprecip | Return normals that have a precipitation information. |
hassnow | Return normals that have a snowfall information. |
Use the following supported property keys when creating custom queries for your requests:
id | Query normals for a specific co-op/station ID. |
state | Query normals for a specific state. |
country | Query normals for a specific country (US only). |
md | Query normals for a month/day combination (no leading zeros). |
mon | Query normals for a month number (1-12). |
day | Query normals for a day of month (1-31). |
tmax | Query normals based on the normal maximum temperature (F). |
tmin | Query normals based on the normal minimum temperature (F). |
tavg | Query normals based on the normal average temperature (F). |
hdd | Query normals based on the normal heating degree days. |
cdd | Query normals based on the normal cooling degree days. |
pmtd | Query normals based on the normal precipitation for the month to date (inches). |
pytd | Query normals based on the normal precipitation for the year to date (inches). |
smtd | Query normals based on the normal snowfall for the month to date (inches). |
sytd | Query normals based on the normal snowfall for the year to date (inches). |
name | Query normals based on the co-op/station name. |
Default Sort: md (asc)
You can use the following fields to sort data. Review the sorting docs page for more information on the sort functionality.
id | Used with the sort parameter. Sort on the co-op/station ID. |
md | Used with the psort parameter. Sort on the month day combination. March 9 = 309, Dec 25 = 1225 |
mon | Used with the psort parameter. Sort on the month. |
day | Used with the psort parameter. Sort on the day. |
name | Used with the sort parameter. Sort on the co-op/station name. |
state | Used with the sort parameter. Sort on the co-op/station's state. |
country | Used with the sort parameter. Sort on the co-op/station's country. |
tmax | Used with the psort parameter. Sort on the normal maximum temperature. |
tmin | Used with the psort parameter. Sort on the normal minimum temperature. |
tavg | Used with the psort parameter. Sort on the normal average temperature. |
hdd | Used with the psort parameter. Sort on the normal heating degree days. |
cdd | Used with the psort parameter. Sort on the normal cooling degree days. |
pmtd | Used with the psort parameter. Sort on the normal month to date precipitation. |
mytd | Used with the psort parameter. Sort on the normal year to date precipitation. |
smtd | Used with the psort parameter. Sort on the normal month to date snowfall. |
sytd | Used with the psort parameter. Sort on the normal year to date snowfall. |
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 today's normals for the closest station to Minneapolis, MN./normals/minneapolis,mn?
Returns today's normals for co-op station USC00214884./normals/usc00214884?
Returns the next 7 days of normals for zip code 55403 (Minneapolis, MN)./normals/55403?to=+1week&
Returns today's normals for the 5 closest stations to zip code 55403./normals/closest?p=55403&limit=5&
Returns today's normals for the closest station to zip code 55403 that has snowfall information available./normals/closest?p=55403&filter=hassnow&
Returns the current month's summary for the 5 closest locations to zip code 55403./normals/closest?p=55403&limit=5&pfilter=monthly&
Returns daily normals in Minneapolis, MN for each day of June by passing relevant parameters. For example, passing 'from=first day of june&to=last day of june' will need to be URL encoded as shown below./normals/minneapolis,mn?from=first%20day%20of%20june&to=last%20day%20of%20june&
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.
{
"success": true,
"error": null,
"response": {
"id": "usc00050848",
"loc": {
"long": -105.266,
"lat": 39.9919
},
"place": {
"name": "boulder",
"state": "co",
"country": "us"
},
"periods": [{
"type": "daily",
"mon": 6,
"day": 6,
"timestamp": 1528243200,
"dateTimeISO": "2018-06-06T00:00:00+00:00",
"temp": {
"maxF": 78.3,
"maxC": 25.72,
"minF": 48.7,
"minC": 9.28,
"avgF": 63.5,
"avgC": 17.5
},
"prcp": {
"ytdIN": 10,
"ytdMM": 254,
"mtdIN": 0.56,
"mtdMM": 14
},
"snow": {
"ytdIN": 53.3,
"ytdCM": 135.4,
"mtdIN": 0,
"mtdCM": 0
},
"hdd": 3,
"cdd": 2
}],
"profile": {
"tz": "America\/Denver"
},
"relativeTo": {
"lat": 40.01499,
"long": -105.27055,
"bearing": 171,
"bearingENG": "S",
"distanceKM": 2.597,
"distanceMI": 1.614
}
}
}
{
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"id": "usc00050848",
"geometry": {
"type": "Point",
"coordinates": [-105.266, 39.9919]
},
"properties": {
"id": "usc00050848",
"loc": {
"long": -105.266,
"lat": 39.9919
},
"place": {
"name": "boulder",
"state": "co",
"country": "us"
},
"periods": [{
"type": "daily",
"mon": 6,
"day": 6,
"timestamp": 1528243200,
"dateTimeISO": "2018-06-06T00:00:00+00:00",
"temp": {
"maxF": 78.3,
"maxC": 25.72,
"minF": 48.7,
"minC": 9.28,
"avgF": 63.5,
"avgC": 17.5
},
"prcp": {
"ytdIN": 10,
"ytdMM": 254,
"mtdIN": 0.56,
"mtdMM": 14
},
"snow": {
"ytdIN": 53.3,
"ytdCM": 135.4,
"mtdIN": 0,
"mtdCM": 0
},
"hdd": 3,
"cdd": 2
}],
"profile": {
"tz": "America\/Denver"
},
"relativeTo": {
"lat": 40.01499,
"long": -105.27055,
"bearing": 171,
"bearingENG": "S",
"distanceKM": 2.597,
"distanceMI": 1.614
}
}
}]
}
The following properties will be provided in every response object:
Last modified: September 14, 2023