Consecutive hours that meet activity criteria.
Changed onReturns runs of forecast hours that satisfy the caller's criteria, the REST twin of an MCP get_data window read (where and windows). The scan is deterministic: the criteria are where expressions on the window search GET /v1/series serves (windows), over the location's forecast that serves every variable the criteria test. An optional activity string may attach a favorability rating and limiting_factor to one window when activity rating is enabled for the service. When rating is off, or the scorer does not return a usable verdict, rating and limiting_factor are omitted and the windows stay in chronological order.
When a rating lands, the rated window is first and the remaining windows follow by duration (longer first).
Location selectors match GET /v1/weather: exactly one of lat+lon, zip, or location.
A location outside the 50 US states and DC returns 404 outside-coverage with next_steps, as on GET /v1/weather. An empty scan inside coverage may return windows: [] with message when no forecast series is available.
activity does not change the metered weight of the call.
Request
- Base URLhttps://api.smarterweather.com
- AuthHTTP bearer
Query parameters
Latitude (WGS84 decimal degrees). Give it with lon. On a route that also takes zip or location, give only one location form.
Longitude (WGS84 decimal degrees). Give it with lat. On a route that also takes zip or location, give only one location form.
5-digit US ZIP code. Mutually exclusive with lat/lon and location.
Free-text location name. Examples: "Boston, MA", "94043", "Denver", "KSLC". Resolved by the Smarter Weather geocoder (a station id resolves as on /v1/geocode/search). Mutually exclusive with lat/lon and zip.
Unit system for numeric response fields. imperial (default) uses °F, mph, inHg, mi, in; metric uses °C, kph, hPa, km, mm. See the Units schema returned with every response for the exact label set.
How far ahead to search, in hours.
Minimum consecutive hours that must meet the criteria.
When true (the default), hours outside sunrise–sunset are excluded when sun times are available. In polar night no hour is daylight, so windows is empty; under midnight sun every hour is. If sun times cannot be loaded, the daylight filter is skipped.
Drop hours whose precipitation probability exceeds this percent.
Drop hours colder than this, in the selected units.
Drop hours warmer than this, in the selected units.
Drop hours with sustained wind above this, in the selected units.
Drop hours with a gust above this, in the selected units.
Drop hours with visibility below this, in the selected units.
Drop hours with a cloud ceiling below this, in the selected units.
Free-text activity used only when activity rating is enabled. At most 200 characters. Accepted and ignored when rating is off.
Response
Windows that meet the criteria, possibly empty.
Resolved location.
Criteria echoed back in the requested units. Omitted fields were not set.
Present when daylight filtering used sunrise and sunset. Polar dates (midnight sun, polar night) have neither and are left out.
Set when windows is empty because the point is outside NBM coverage or no forecast series was available.
Example response
{
"location": {
"name": "Boston",
"region": "MA",
"country": "US",
"timezone": "America/New_York",
"county": "Suffolk",
"zip": "02108"
}
}Changes
- info
added the optional property
alternativesto the response with the status - info
added the optional property
alternativesto the response with the status - info
added the optional property
alternativesto the response with the status
6 more changes in this revision
- info