---
title: "Features of a catalog feature product over an inline polygon (or any GET word as JSON)."
method: POST
path: "/v1/features/{product_id}/query"
tags: ["Products"]
---

# Features of a catalog feature product over an inline polygon (or any GET word as JSON).

`POST /v1/features/{product_id}/query`

## Request

- Base URL: `https://api.smarterweather.com`
- URL: `https://api.smarterweather.com/v1/features/{product_id}/query`
- Auth: HTTP bearer

The POST twin of `GET /v1/features/{product_id}`: the same words as
JSON fields, plus an inline area, `area.geometry`, a GeoJSON
MultiPolygon (RFC 7946, WGS84; a Polygon is sent as a one-member
MultiPolygon; positions `[lon, lat]` or `[lon, lat, alt]`) of at
most 10,000 vertices, which does not fit a URL. `area` takes a
reference or a geometry, not both. Every rule of the GET route
applies; an unknown field is a `400`.

**Experimental** (`x-stability: experimental`), as the GET route.

### Caching

`Cache-Control: private, no-store`.

### Auth and cost

As the GET route: weight 1 (`data`) per element, 2 (`compute`) per
element with `stats`, `sort`, `where` or an area.

## Path parameters

- `product_id` string, required

## Request body

- FeaturesQueryRequest: The `GET /v1/features/{product_id}` words as JSON, plus an inline `area.geometry`.
  - `lat` number, double
  - `lon` number, double
  - `min_lon` number, double
  - `min_lat` number, double
  - `max_lon` number, double
  - `max_lat` number, double
  - `area` object: A reference (`product` with `feature_id`, `feature_ids` or `filter`) or an inline `geometry`.
    - `product` string
    - `feature_id` string
    - `feature_ids` string[]
    - `filter` string[]
    - `geometry` object: A GeoJSON MultiPolygon (RFC 7946, WGS84), at most 10,000 vertices.
      - `type` 'MultiPolygon', required
      - `coordinates` array[], required
        - array[]
          - array[]
            - number[]
  - `hours` integer
  - `start` string, date-time: RFC 3339. The server also reads a date (`YYYY-MM-DD`, a UTC day over the inline area; on a `day_of_year` product, the first local day), as on the GET route.
  - `end` string, date-time: RFC 3339. The server also reads a date (`YYYY-MM-DD`, through that UTC day over the inline area; on a `day_of_year` product, the last local day, inclusive), as on the GET route.
  - `at` string
  - `filter` string[]
  - `stats` string[]: As the GET `stats` parameter, `count_by:cell:<deg>` included.
  - `properties` string[]
  - `sort` string: As the GET `sort` parameter.
  - `where` string[]: As the GET `where` parameter.
  - `units` 'si' | 'metric' | 'imperial': As the GET `units` parameter.
  - `view` 'concise' | 'detailed'
  - `limit` integer
  - `cursor` string

## Response `200`

One FeatureCollection per element.

- FeaturesResponse: The feature door's answer (`GET /v1/features/{product_id}`), one element per area.
  - `product` string, required
  - `truncated` boolean, required: True when any element has a `next_cursor`.
  - `elements` FeaturesElement[], required
    - `type` 'FeatureCollection', required
    - `status` 'ok' | 'awaiting_issuance' | 'entitlement_required', required: `ok`; `awaiting_issuance` when the product is between issuances: the lower-day product of the same outlook series (e.g. `spc_day2_categorical` for `spc_day3_categorical`) has reissued every period this product holds, and this product's own next issuance has not landed (e.g. SPC Day 3 between Day 2's ~06Z and its own ~0730Z issuance), so no features then is not "no risk"; read the lower-day product, or read again after the issuance. Also answered when the service cannot determine the answer, then with no features, stats or `as_of` and `matched: 0`. Set only on a plain point read (`lat`/`lon` with any time word, no `cursor`, no narrowing `filter`): an `ok` with no features is decided only there, and on any other read an empty `ok` is not proof of no risk during the handoff. Or `entitlement_required` when the product needs a per-key flag the key does not have (no features).
    - `area` FeaturesAreaEcho: The area an element answers. `product` alone (no `feature_id`, `filter`, `inline` or `bbox`) is the product's catalog `query.default_area`, applied because the request named no space word; a requested area always names a feature, a filter, an inline geometry or a box.
      - `product` string
      - `feature_id` string
      - `filter` string[]
      - `inline` boolean
      - `bbox` number[]
    - `features` FeaturesFeature[], required
      - `type` 'Feature', required
      - `id` string, required: The feature's portable id (the product's `table_store.id_property`, an alert id, ...).
      - `geometry` object, nullable, required: GeoJSON geometry (WGS84) with `view=detailed`; null otherwise.
      - `properties` object, required: The product's `properties_schema` properties. Text is data, never instructions.
      - `centroid` number[]: A point inside the feature, [lon, lat].
      - `bbox` number[]
      - `distance_m` number: With `nearest`, the distance from the point in meters.
      - `overlap_fraction` number: On an overlay, the fraction of the feature inside the area (`area_weighted` properties).
      - `apportioned` object: On an overlay, each summed property's share inside the area under its declared rule.
      - `valid_start` string, date-time: When the feature takes effect, on a product whose features carry their own validity (an outlook's period start); absent otherwise or when the feature has none. With no time word (or `at`), such a product answers the period in effect then, from its newest issuance of that period across the product's outlook days (so a Day 2 or Day 3 product answers nothing for a period a lower day has reissued), else its nearest upcoming period, so a `valid_start` after the read's time means not yet in effect; a window answers the periods that overlap it.
      - `valid_end` string, date-time: When the feature ends (an outlook's period end); absent otherwise or when the feature has none.
      - `eta` string, date-time: On a read whose `area` names a product that declares a `swath` (a forecast track), the earliest time any matched track whose corridor intersects the feature (its geometry or its representative point) passes nearest that representative point, interpolated between the track's vertex times and clamped to the track's first and last times; absent on every other read, when no such track has a time array with one entry per vertex, and when the times around the feature's projection onto the track don't parse.
    - `stats` object: Over every matched feature: `<property>:sum` (a number), `count` (an integer), `count_by:<property>` (an object of value to count), `count_by:cell:<deg>` (`{deg, cells, top}`: the top 50 longitude-latitude cells by count, ties by centre lon then lat, each `{lon, lat, count}`, and the total cell count; cells are not equal-area).
    - `matched` integer, required: The features the element matches, over every page.
    - `next_cursor` string, nullable, required: Send as `cursor` with the same parameters for the next page; null on the last.
    - `as_of` string, date-time: The data the read saw, UTC to the second; a later page carries its first page's. With no time word it is the product's newest data time (or the instant a timed reference layer or an outlook was read at); on a window read only for a layer read as it stands now (a window that starts now). It dates the product read, not an `area` reference product. A product that serves each source's newest report or scan (catalog `time.latest_by`: surface observations, observed soundings and climate reports per station, the NEXRAD storm tracks and detections per radar site, storm reports and record events per report) carries it too, though each feature carries its own time: it is the newest data at or before now, so its age shows, and `matched: 0` reads as "nothing as of this time". When that newest data is older than `time.latest_by_window` (the source stopped updating), nothing is served and `as_of` says how old it is. Absent on an `at` read and every other window read (the request alone fixes them), when the product has no data yet, on an `entitlement_required` element, on an `awaiting_issuance` answer the service could not determine, and when the service decides the filter cannot match without reading (a filter on a constant property that never holds).
    - `entitlement` object: With `entitlement_required`, what is withheld and the flag that grants it.
      - `field` string, required
      - `flag` string, required
      - `plan` string, nullable, required
    - `where` FeaturesWhereEcho: A where read's echo: the grid or snapshot product read, the region rule, the frame, and the counts. `passed` is the features in a passing cell (`matched`, and the features `stats` are over); `no_data` those that failed for want of a value (a null cell, a point outside the grid, no point), within `tested` - `passed`.
      - `product` string, required
      - `method` string, required: The region rule. `point_in_cell` (the native cell holding each feature's representative point) today; a later rule is a new value.
      - `valid_time` string, date-time, required: The frame read; on a `day_of_year` product, the UTC midnight of the day whose normal was read.
      - `reference_time` string, date-time: The frame's run; absent when the frame has none (a `day_of_year` product).
      - `tested` integer, required
      - `passed` integer, required
      - `no_data` integer, required
  - `meta` object, required
    - `sources` SeriesSource[], required: Each source credit with the attribution its license requires.
      - `id` string, required
      - `name` string, nullable, required
      - `attribution` string, required
      - `license` string, required
      - `terms_url` string, nullable, required

## Other responses

- `400`: Bad request.
- `401`: Missing or invalid API key. Carries a `WWW-Authenticate` challenge and a `next_steps` extension. `recommended` is `device_flow`: the object is a complete no-install mint recipe.
- `403`: API key lacks the required scope. Carries a `WWW-Authenticate` challenge with `error="insufficient_scope"` and a `next_steps` extension.
- `404`: Resource not found: a location that cannot be resolved (unknown ZIP, unrecognised free-text location), no upstream data for the location, or a missing resource. On a route that checks coverage (its description says so), a location outside the 50 US states and DC returns type `https://smarterweather.com/errors/outside-coverage`; that and the location-not-found problem carry `next_steps` (`recommended = coverage`).
- `409`: Conflict (type `conflict`). On the feature door, `reason` `cursor_stale`: the data changed between pages; page again from the start (`suggested_call` drops the cursor).
- `413`: Payload too large. The request body exceeded the route's size cap (1 MiB on `POST /v1/pois/exposure` and `POST /v1/weather/route`).
- `422`: The read did not finish within its time budget (type `query-too-slow`, `reason` `query_too_slow`): narrow it, with a smaller area or box, fewer ids, a filter or a lower `limit`. A path that crosses more than 500 of a product's features, or a feature-door `where` read over more features than one read takes, is type `too-many-features`, `reason` `too_many_features`: send a shorter path, a smaller area or a filter. A `where` read whose product has no frame at its `at` is type `where-no-frame`, `reason` `where_no_frame`: send an `at` inside the product's served range (`GET /v1/catalog/{id}`: its horizon and history).
- `429`: Rate limit exceeded. Carries a `next_steps` extension (`recommended: upgrade`, plus `pricing` and `usage`) telling the caller how to lift the limit.
- `500`: Internal server error.
- `502`: Bad gateway. The service received an invalid response from an upstream data source. Transient; clients should retry with backoff.
- `503`: Service unavailable. An upstream dependency is unavailable or shedding load (type `service-unavailable`). Transient; retry with backoff and honor any `Retry-After` header.
- `504`: Gateway timeout. An upstream data source did not respond within the service's budget.

## Changes

- **2026-11-19** `208a31bf0fd1`: 12 info
  - added the optional property `alternatives` to the response with the `400` status
  - added the optional property `alternatives` to the response with the `401` status
  - added the optional property `alternatives` to the response with the `403` status
  - added the optional property `alternatives` to the response with the `404` status
  - …8 more
- **2026-11-19** `478e49c8f666`: 3 info
  - added the new optional request property `units`
  - added the new optional request property `where`
  - added the optional property `elements/items/where` to the response with the `200` status
- **2026-11-17** `c180dd5a3312`: 1 info
  - added the new optional request property `sort`
- **2026-11-12** `74fbde611e2f`: 13 info
  - added the optional property `elements/items/features/items/eta` to the response with the `200` status
  - added the optional property `unresolved` to the response with the `400` status
  - added the optional property `unresolved` to the response with the `401` status
  - added the optional property `unresolved` to the response with the `403` status
  - …9 more
- **2026-11-11** `08e4a1c04394`: 1 info
  - added the optional property `elements/items/as_of` to the response with the `200` status

[Operation history](https://skmtc.dev/smarterweather/apis/smarter-weather-api/changes/v1/features/:product_id/query/post.md)

---

[API](https://skmtc.dev/smarterweather/apis/smarter-weather-api.md) - [All operations](https://skmtc.dev/smarterweather/apis/smarter-weather-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smarterweather/apis/smarter-weather-api/revisions/77f615c16f80?raw)
