Endpoint: precip/summary

This endpoint has been deprecated! We recommend migrating to the newer Conditions/Summary endpoint.

The precip/summary endpoint will provide high resolution estimated precipitation totals for locations within the Continental US. Precipitation data is available in daily summaries (local midnight to midnight) and during the last 72 hours, summaries are available for customized time intervals. The precipitation data is updated hourly, with a 1 to 2-hour delay. All values are the estimated liquid-equivalent precipitation amounts.

 

Use our wizard to try out this endpoint

Supported Actions

The following actions are supported with the precip/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 endpoint'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.
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

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.
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 250.
pskip pskip=:number Applied only on the periods property, used to skip over a specific number of periods in the data set.
psort psort=:string Applied only on the periods property, used to sort results based on certain fields contained within the periods.

Supported Filters

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

mdnt2mdnt (default) Provides daily summaries using midnight to midnight local time.
#hr Provides # hour summaries, available for the last 72 hours.
For Example: 1hr = hourly summaries, 3hr = 3 hour summaries.
fullrange Provides a single summary covering the entire from/to range, available for the last 72 hours only.

Sortable Fields

Default Sort: psort

You can use the following fields to sort data. Review the sorting docs page for more information on the sort functionality.

dt Sort results based on the date / time of the summary valid time
precip Sort results based on the total precip in each summary interval

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 a summary of the estimated precipitation so far today for Queens, NY
/precip/summary/queens,ny?

Returns a summary of the estimated daily precipitation for the 2 previous days through today for Queens, NY
/precip/summary/queens,ny?from=-2days&to=now&plimit=3

Returns a summary of the estimated hourly precipitation for the past 24 hours for Queens, NY
/precip/summary/queens,ny?from=-24hours&to=now&filter=1hr&plimit=24

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

{
   "loc":{
      "lat":40.711559,
      "long":-73.742091
   },
   "place":{
      "name":"queens village",
      "state":"ny",
      "country":"us"
   },
   "periods":[
      {
         "summary":{
            "timestamp":1524628800,
            "dateTimeISO":"2018-04-25T00:00:00-04:00",
            "range":{
               "fromTimestamp":1524628800,
               "fromDateTimeISO":"2018-04-25T00:00:00-04:00",
               "toTimestamp":1524715199,
               "toDateTimeISO":"2018-04-25T23:59:59-04:00",
               "count":12
            },
            "precip":{
               "totalMM":8.88,
               "totalIN":0.35,
               "count":12
            }
         }
      }
   ],
   "profile":{
      "tz":"America\/New_York"
   }
}
								

{
   "type":"FeatureCollection",
   "features":[
      {
         "type":"Feature",
         "geometry":{
            "type":"Point",
            "coordinates":[
               -73.742091,
               40.711559
            ]
         },
         "properties":{
            "loc":{
               "lat":40.711559,
               "long":-73.742091
            },
            "place":{
               "name":"queens village",
               "state":"ny",
               "country":"us"
            },
            "periods":[
               {
                  "summary":{
                     "timestamp":1524628800,
                     "dateTimeISO":"2018-04-25T00:00:00-04:00",
                     "range":{
                        "fromTimestamp":1524628800,
                        "fromDateTimeISO":"2018-04-25T00:00:00-04:00",
                        "toTimestamp":1524715199,
                        "toDateTimeISO":"2018-04-25T23:59:59-04:00",
                        "count":12
                     },
                     "precip":{
                        "totalMM":8.88,
                        "totalIN":0.35,
                        "count":12
                     }
                  }
               }
            ],
            "profile":{
               "tz":"America\/New_York"
            }
         }
      }
   ]
}
								

Response Properties

The following properties will be provided in every response object:

periods (array) An array of summary objects.
periods[#].summary (object) A Summary object
periods[#].summary.timestamp (number) UNIX timestamp of the summary of the start of the summary period.
periods[#].summary.dateTimeISO (string) ISO 8601 date of the summary of the start of the summary period.
periods[#].summary.range.fromTimestamp (number) UNIX timestamp of the start of the summary period.
periods[#].summary.range.fromDateTimeISO (string) ISO 8601 date of the start of the summary period.
periods[#].summary.range.toTimestamp (number) UNIX timestamp of the end of the summary period.
periods[#].summary.range.toDateTimeISO (string) ISO 8601 date of the end of the summary period.
periods[#].summary.range.count (number) The total number of hours that precipitation occurred during the summary period.
periods[#].summary.precip (object) The summary precipitation object
periods[#].summary.precip.totalMM (number) The total liquid equivalent precipitation in millimeters. Null if not available.
periods[#].summary.precip.totalIN (number) The total liquid equivalent precipitation in inches. Null if not available.
periods[#].summary.precip.count (number) The total number of hours that precipitation occurred during the summary period.
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.

Last modified: August 19, 2021