---
title: "Search STAC items with full-featured filtering."
method: POST
path: "/stac/search"
tags: ["STAC"]
---

# Search STAC items with full-featured filtering.

`POST /stac/search`

retrieve items matching filters. Intended as the standard, full-featured query API.

This method is mandatory to implement if `GET /stac/search` is implemented. If this endpoint is implemented on a server, it is required to add a link with `rel` set to `search` to the `links` array in `GET /stac` that refers to this endpoint.

## Request body

- SearchBody — Sort the results
  - `bbox` number[] — Only features that have a geometry that intersects the bounding box are selected. The bounding box is provided as four or six numbers, depending on whether the coordinate reference system includes a vertical axis (elevation or depth): * Lower left corner, coordinate axis 1 * Lower left corner, coordinate axis 2 * Lower left corner, coordinate axis 3 (optional) * Upper right corner, coordinate axis 1 * Upper right corner, coordinate axis 2 * Upper right corner, coordinate axis 3 (optional) The coordinate reference system of the values is WGS84 longitude/latitude (http://www.opengis.net/def/crs/OGC/1.3/CRS84) unless a different coordinate reference system is specified in the parameter `bbox-crs`. For WGS84 longitude/latitude the values are in most cases the sequence of minimum longitude, minimum latitude, maximum longitude and maximum latitude. However, in cases where the box spans the antimeridian the first value (west-most box edge) is larger than the third value (east-most box edge). If a feature has multiple spatial geometry properties, it is the decision of the server whether only a single spatial geometry property is used to determine the extent or all relevant geometries.
  - `datetime` string — Either a date-time or an interval, open or closed. Date and time expressions adhere to RFC 3339. Open intervals are expressed using double-dots. Examples: * A date-time: "2019-04-12T23:20:50Z" * A closed interval: "2019-04-12T00:00:00Z/2019-08-18T21:31:12Z" Only features that have a temporal property that intersects the value of `datetime` are selected. If a feature has multiple temporal properties, it is the decision of the server whether only a single temporal property is used to determine the extent or all relevant temporal properties.
  - `intersects` GeometryJson — unresolved $ref
  - `next` string — The token to retrieve the next set of results, e.g., offset, page, continuation token. Defaults to 0
  - `limit` integer — The maximum number of results to return (page size). Defaults to 50
  - `query` Query — Define which properties to query and the operatations to apply
  - `fields` Fields — The include and exclude members specify an array of property names that are either included or excluded from the result, respectively. If both include and exclude are specified, include takes precedence. Values should include the full JSON path of the property.
    - `include` string[]
    - `exclude` string[]
  - `sort` object[] — An array of objects containing a property name and sort direction.
    - `field` string, required
    - `direction` 'asc' | 'desc'

## Response `200`

A feature collection.

## Other responses

- `default` — An error occurred.

## Changes

- **2019-10-29** `25d8aefdfd21` — 1 warning, 3 info
  - removed `#/components/schemas/collectionsFilter, #/components/schemas/idsFilter` from the request body `allOf` list
  - the `limit` request property default value `50` was added
  - the `next` request property default value `0` was added
  - media type `application/json` was changed to a more specific media type `application/geo+json` for the response status `200`
- **2019-10-29** `6fc647b75148` — 1 breaking
  - media type `application/geo+json` was changed to a more general media type `application/json` for the response status `200`
- **2019-10-28** `45f21c7c4c25` — 1 breaking, 2 info
  - added `#/components/schemas/collectionsFilter, #/components/schemas/idsFilter` to the request body `allOf` list
  - the `limit` request property default value `50` was removed
  - the `next` request property default value `0` was removed

[Change history](https://skmtc.dev/developmentseed/apis/the-sat-api-pg-stac-api/changes/stac/search/post.md)

---

[API](https://skmtc.dev/developmentseed/apis/the-sat-api-pg-stac-api.md) · [All operations](https://skmtc.dev/developmentseed/apis/the-sat-api-pg-stac-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/developmentseed/the-sat-api-pg-stac-api/revisions/d77351000251/schema)
