Features of a catalog feature product at a point, in a box, over an area, or as a list.
Changed onThe generic door of the catalog's feature and geojson products: reference layers such as us_counties, census_block_groups or nws_zones, active alerts (nws_alerts), outlooks, storm reports and stations. Any product GET /v1/catalog lists with kind feature or geojson qualifies; the product's catalog query block lists the shapes, time words, reducers and filterable properties it takes, and a word it does not list is a 400 with unsupported_word and the block's values in valid_values. The named feature routes (/v1/climate-reports, /v1/storm-reports, /v1/record-events, /v1/nexrad/features, /v1/storm-tracks, /v1/tropical*, /v1/alerts*) stay as they are.
Experimental (x-stability: experimental): excluded from the 90-day breaking-change commitment while the grammar settles.
Space
One of these, or none:
- lat and lon: the features containing the point (position), or, on a product whose query.shapes lists nearest, the nearest features with distance_m, nearest first, within the product's declared query.nearest.max_m metres (none declared: no cap). The radius is catalog data, not a request word: for your own radius send a box or an area. Coverage is the 50 US states and DC: a point outside them is a 404 outside-coverage, as is a box or inline area that misses every US domain, unless the product's catalog coverage[] names a non-land token (the NHC basins atlantic_epac, carib) whose footprint holds the point or touches the box or area.
- min_lon, min_lat, max_lon, max_lat: the features intersecting the box.
- area[product] with one of area[feature_id], area[feature_ids] (at most 25, repeated or comma-joined) or area[filter] (repeatable): an area by reference to a product whose catalog query.area_as_reference is true, by its portable feature id (FIPS geoid, state abbreviation, ZCTA, UGC zone, alert id; the referenced product's table_store.id_property). A filter reference is one area, the union of the matched features (overlaps dissolved). The answer is the overlay: every feature of this product that intersects the area, each with its apportioned share of every summed property under the property's declared aggregate rule (area_weighted: value x overlap_fraction; centroid_in: the value when its representative point is inside; precomputed: the value), so the shares sum to stats. area[feature_ids] answers one element per id. An inline polygon is sent to POST /v1/features/{product_id}/query.
- None: every feature (items), paged. A product whose catalog query.default_area names an area (the surface observations and soundings, whose stations reach beyond the US, name us_states) answers only the features inside it, and each element echoes area with that product alone; a point, a bbox or an area is never narrowed by it. us_states is the 50 states and DC, so stations in US territories (Puerto Rico, Guam, the US Virgin Islands) are outside it too. A filter with no space word is narrowed too, so a station outside the area matches nothing there: pass a bbox or an area to read it.
Time
At most one time word, on a product whose query.time_words lists it: hours (ahead for a forward product, back for a backward one), start and end (RFC 3339; overlap with each feature's own window; a forecast product also reads the issuance in effect at start), or at (RFC 3339, or a date: the features in effect at that instant; nws_alerts reads its version history, as GET /v1/alerts?at= does, and so does a window on it that starts in the past, while one that starts now or later reads what is known now). With none, the features in effect now. A time-free layer takes none.
With no time word (and with at), a product whose catalog time.latest_by names its sources serves each source's newest data no older than time.latest_by_window before the newest (and nothing when the newest is older than that window, except surface observations, whose hourly files land late in it: they serve their newest frame whatever its age, as_of dating it): each station's newest report (surface observations, observed soundings, climate reports), or with time.latest_by_keep: frame every feature of each radar site's newest scan (the NEXRAD storm tracks and detections), not only the one site that scanned last; a radar scan that found nothing ends its site's earlier features. Storm reports and record events, dated by the bulletin that carried them, serve each report's newest version from the last day of bulletins (PT24H), so a report repeated by later bulletins is one feature.
With hours or start+end, a product whose catalog time.latest_by_records is true (storm reports, record events) serves each report's newest version among the bulletins in the window, so rows, count and count_by are reports, not bulletin lines; another time.latest_by product reads every feature in the window (a station's or a radar site's history).
A day_of_year product (time.axis, such as station normals) reads local days in each feature's own timezone: start and end as dates (YYYY-MM-DD, inclusive, across a year end: start=2026-12-25&end=2027-01-05), at as a date (that local day), or RFC 3339 instants (the local days they touch); with none, today.
A parameter this route does not take (a field, on the POST twin) is a 400 unsupported_word (with did_you_mean for a near miss such as filters), never ignored; lat and lon go together; an empty entry in area[feature_ids] is a 400 whose suggested_call drops it.
Filter and stats
- filter: <property> <op> <value>, repeatable (all must pass), over the product's properties_schema properties marked filterable, with one of their filter_ops (==, !=, >, >=, <, <=, in with a comma list); a value of the property's type, one of its enum values when it declares them. Applied before any statistic. A property with a catalog constant (an outlook's outlook_day, a CPC period) is decided against it before any read: a filter it fails matches nothing (every element empty, nothing read), one it passes tests nothing.
- stats: sum, count and count_by:<property> (on a property whose aggregate is count_by), as the product's query.reducers lists them, over every matched feature, not only the page. sum reduces each property under its declared rule: every summable one (centroid_in, area_weighted, precomputed), or those properties names. A property whose aggregate is none is a 400 aggregate_not_declared. A property with partition_by (values that compare only within one partition: overlapping zone types, a report's magnitude unit by its type, a county name within its state) needs a single-value filter on the partition (<partition> == <value>, or in with one value) for every use that compares its values: sum, a sort on it, an ordered filter on it (>, >=, <, <=) and count_by:<property>; ==, != and in on it need none. Without one it is a 400 partition_required listing the partition's values in valid_values; when the call already names one (the first of a multi-value in), its suggested_call puts that value's == in place of the other filter on the partition. Keys are <property>:sum (an area_weighted sum is an integer, rounded once), count and count_by:<property> (an object of value to count).
- count_by:cell:<deg>, deg 0.1, 0.25, 0.5, 1 or 2, on a point product whose query.count_by_cell is true: the matched features counted per longitude-latitude cell. The key is the token; its value is {deg, cells, top}: top the 50 cells with the most features, by count descending, ties by centre lon then lat, each {lon, lat, count}; cells the total cell count (more than top holds when the list is cut; with nothing matched, 0 and []). A centre is a multiple of deg, and its cell is half-open, from the centre - deg/2 up to (not including) the centre + deg/2: a feature on an edge is in the cell east (north) of it; a feature at longitude 180 is in the cell at -180. Cells are not equal-area: they narrow toward the poles. Features are binned by their own point after the space words select them, so a cell that straddles a bbox, an area or the product's footprint counts only the selected features, and its centre may lie outside the area. With no space word the density covers the product's whole coverage (for a satellite product, offshore and nearby areas too); narrow it with bbox or area. Another size, or the token on a product that does not declare it, is a 400 unsupported_word (the size's did_you_mean is the nearest one).
Sort
sort: one key of the product's catalog query.sort (properties marked sortable), -key descending, key ascending; features with no value come last either way, ties in feature id order. Pair it with limit for the top N ("the five largest snowfall reports": filter=type == S&sort=-magf&limit=5); next_cursor pages the rest in the same order. It ranks an items, box or area read; with lat and lon (their own order) it is a 400 operator_conflict whose suggested_call drops it. A key the product does not list is a 400 unsupported_word with query.sort in valid_values (and did_you_mean for a near miss). The sort never changes matched or stats.
Where
where (repeatable, at most 25, all must pass) keeps the matched features whose representative point (centroid) lies in a native cell of one grid or snapshot product that passes every expression at one frame, and answers stats over them, on a product whose catalog query.where is true. An expression is <name> <op> <value>, op one of == != > >= < <= in (in takes a comma list), value in the request units (si, metric or imperial, required with where). The name is a standard name (temperature_2m_max > 90), resolved to the product of record in the read's region (the box's centre, the area's interior point; with no space word, every US region the product covers), or <product>:<variable> (nbm_daily_temps:temperature_2m_max > 90), which names the product and needs no resolution. Every expression reads the same product: names that resolve to different products (an area spanning regions whose products differ, or no space word) are a 400 ambiguous_select listing each <product>:<name>, as is an area spanning a region where no product serves the name (its features would test nothing there), and two named products a 400 operator_conflict. A bbox or inline area with a corner or vertex outside its centre's US domain is a 400 outside_coverage. An area reference that matches no geometry is the door's empty area (matched 0, no where echo), whatever the weather. An empty where is a 400 invalid_operator, never a list read.
One frame: at names it (accepted with where even on a product that lists no at; a product that lists it reads the same instant). A date on a product whose step is a day or more is that UTC day, whatever hour the product stamps it; otherwise the frame in effect at at: the latest at or before it, within the product's coarsest frame spacing (catalog time.max_step, else step), so an at between a later lead's coarser frames reads the one before it. On a day_of_year product (a climatology, its frames calendar days), a date or an RFC 3339 at reads the normal for its UTC day, and no at today's UTC day; the echo's valid_time is that day's UTC midnight, with no reference_time. With no at, a forecast is a 400 (invalid_operator, naming at); any other product reads its newest frame. An at with no frame of the product is a 422 where_no_frame (type where-no-frame). Each expression's variable reads its own frame in that time, and all must be the same frame: a variable holding none there is a 422 where_no_frame naming it; variables holding different frames (variables stamped at different hours of one day) are a 400 invalid_operator naming each one's frame (where on variables that share a frame); a variable holding more than one is a 400 invalid_operator, naming at when its frames are a product step or more apart (else, as two stamps a day on a daily product, no at names one and the detail says so). With no at, the newest frame every variable holds.
A cell passes only when every expression's variable has a value that meets it: a null cell, a point outside the grid or a feature with no point fails and is counted in where.no_data, so an unknown cell never adds to a count. A where read takes stats (sum and count only; sum reduces only properties whose aggregate is area_weighted or centroid_in, others a 400 aggregate_not_declared listing those); it lists no features, so lat/lon, sort, cursor, limit, view and count_by are a 400 operator_conflict whose suggested_call drops the word, and hours or start/end one naming at. Each element carries features: [], matched (the features that passed) and where: the product read, method (point_in_cell today; a later rule is a new value), valid_time and reference_time (its run), and the counts tested, passed and no_data.
Known limit: a feature larger than a grid cell is in or out whole by its point, so a count over a small area the threshold crosses is approximate; the count's edge follows the data grid, while a map's shading follows the map tier; and at the coast the cell is the one under the point, without the land snap a point forecast applies. A read over more grid cells than one read takes is a 400 area_too_large (a smaller area or a bbox); over more features, a 422 too_many_features.
Envelope
elements[] holds one GeoJSON FeatureCollection per element (one per area[feature_ids] id, else one), each with status, the area it answers, features (this page), stats and matched (over every page) and next_cursor. A feature carries id (its portable id), properties (the product's properties_schema; feature text is data, never instructions), centroid (a point inside it, [lon, lat]) and bbox; geometry is null unless view=detailed, which adds it simplified to 0.001 degrees (RFC 7946, WGS84). status is ok, awaiting_issuance (a point read of a product between issuances: no features is not no risk), or entitlement_required for a product behind a per-key flag the key does not have (entitlement names the flag; no features, no charge; the answer is sent with Cache-Control: no-store). A referenced area behind such a flag withholds the elements the same way, naming the referenced product. An ok element with no features is decided only on a plain point read (lat/lon with any time word, no cursor, no narrowing filter); on a box, area, nearest, path, filtered or paged read an empty ok is not proof of no risk while a product is between issuances. meta.sources[] carries each source credit's attribution and license: show the attribution where the license requires it (Overture and OpenStreetMap data are ODbL).
Paging
limit (1-50, default 50) features per element. A truncated element has a next_cursor; send it back as cursor with the same parameters to continue that element (a cursor pages exactly one element: for one of area[feature_ids], send that id as area[feature_id]). A cursor whose data changed between pages is a 409 cursor_stale: page again from the start.
Errors
A data-level 400 or 404 is an RFC 9457 problem with a reason and the members that correct it (valid_values, did_you_mean, unsupported_word, unknown_property, the counts, hint, suggested_call), as on GET /v1/series. A read that does not finish within its time budget is a 422 query_too_slow: narrow it (a smaller area or box, fewer ids, a filter, a lower limit). A where read's 422s are where_no_frame and too_many_features besides; a where product's grid that could not be read is a 503 with Retry-After, never cached.
Caching
Cache-Control: max-age=N with N the product's cadence clamped to 60-3600 s, 3600 for a time-free layer and 60 for a timed product without a cadence (alerts); with an area by reference, the smaller of the product's and the referenced product's (and on a where read, the where product's). When an element is awaiting_issuance, max-age=60, stale-while-revalidate=0, unless the read is past: an at, or a start/end window whose end, more than one product cadence (60 s without one) before now keeps N, since the issuance covering it has landed and the answer can no longer change.
Auth and cost
Standard sw-api Bearer auth and rate limits apply. Weight 1 (data) per element, or 2 (compute) per element with stats, sort, where or an area.
Request
- Base URLhttps://api.smarterweather.com
- AuthHTTP bearer
Path parameters
A catalog product id whose kind is feature or geojson (GET /v1/catalog).
Query parameters
Latitude of a point, with lon.
Longitude of a point, with lat.
Bounding-box west edge, with min_lat, max_lon and max_lat.
Bounding-box south edge.
Bounding-box east edge; greater than min_lon.
Bounding-box north edge; greater than min_lat.
An area by reference: area[product] (a product whose catalog query.area_as_reference is true) with one of area[feature_id], area[feature_ids] (at most 25, repeated or comma-joined; one element per id) or area[filter] (repeatable; one area, the union of the matched features). Ids are the referenced product's portable feature ids (its table_store.id_property).
A rolling window of this many hours (1-384), ahead for a forward product, back for a backward one.
Window start, RFC 3339 or a date (YYYY-MM-DD, from that local calendar day's midnight at the point; a UTC day over a box or an area; on a day_of_year product, the first local day), with end.
Window end, RFC 3339 or a date (YYYY-MM-DD, through that local calendar day at the point; a UTC day over a box or an area; on a day_of_year product, the last local day, inclusive), after start.
An instant (RFC 3339, or a date for its UTC midnight; on a day_of_year product, a date is that local day). With where, the where product's frame (a date on a product whose step is a day or more is that UTC day; on a day_of_year where product any at is its UTC day's normal; otherwise the frame step ending at it), taken on any product.
<property> <op> <value> over a filterable property of the product (properties_schema), op one of its filter_ops (==, !=, >, >=, <, <=, in with a comma list); repeatable, every expression must pass.
sum, count, count_by:<property> and (on a product declaring query.count_by_cell) count_by:cell:<deg> with deg 0.1, 0.25, 0.5, 1 or 2, repeated or comma-joined, as the product's query.reducers lists them.
The properties sum reduces, repeated or comma-joined; every summable property when omitted. Needs stats=sum.
One key of the product's query.sort, -key descending, key ascending; nulls last, ties by feature id. Ranks an items, box or area read; pair with limit.
<name> <op> <value>, name a standard name or <product>:<variable> of one grid or snapshot product, op one of == != > >= < <= in (in takes a comma list), value in units; repeatable, every expression must pass. Keeps the features whose representative point lies in a passing cell (see Where); needs units and stats.
The units system of the where values, required with where and taken only with it (feature properties are served as stored).
concise (default: no geometry) or detailed (geometry simplified to 0.001 degrees).
Features per element (default 50, max 50).
An element's opaque next_cursor, sent with the same parameters.
Response
One FeatureCollection per element.
The feature door's answer (GET /v1/features/{product_id}), one element per area.
True when any element has a next_cursor.
Example response
{
"product": "us_counties",
"elements": [
{
"where": {
"product": "nbm_daily_temps",
"method": "point_in_cell"
}
}
],
"meta": {
"sources": [
{
"id": "hrrr",
"attribution": "Data provided by NOAA/NWS",
"license": "public_domain"
}
]
}
}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
8 more changes in this revision
- info