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

# Search STAC items with full-featured filtering.

`POST /search`

## Request

- Base URL: `https://geoservice.dlr.de/eoc/ogc/stac/v1`
- URL: `https://geoservice.dlr.de/eoc/ogc/stac/v1/search`
- Auth: none declared
- TypeScript: <https://skmtc.dev/dlr/apis/eoc-eo-products-service/docs/search/post.ts> (a function with typed inputs; its response is checked against the schema)

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

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

## Request body

- SearchBody: Allows users to query properties for specific values
  - `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. Example: The bounding box of the New Zealand Exclusive Economic Zone in WGS 84 (from 160.6°E to 170°W and from 55.95°S to 25.89°S) would be represented in JSON as `[160.6, -55.95, -170, -25.89]` and in a query as `bbox=160.6,-55.95,-170,-25.89`.
  - `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: "2018-02-12T23:20:50Z" * A closed interval: "2018-02-12T00:00:00Z/2018-03-18T12:31:12Z" * Open intervals: "2018-02-12T00:00:00Z/.." or "../2018-03-18T12: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` union
    - PointGeoJSON
      - `type` 'Point', required
      - `coordinates` number[], required
    - MultipointGeoJSON
      - `type` 'MultiPoint', required
      - `coordinates` array[], required
        - number[]
    - LinestringGeoJSON
      - `type` 'LineString', required
      - `coordinates` array[], required
        - number[]
    - MultilinestringGeoJSON
      - `type` 'MultiLineString', required
      - `coordinates` array[], required
        - array[]
          - number[]
    - PolygonGeoJSON
      - `type` 'Polygon', required
      - `coordinates` array[], required
        - array[]
          - number[]
    - MultipolygonGeoJSON
      - `type` 'MultiPolygon', required
      - `coordinates` array[], required
        - array[]
          - array[]
            - number[]
    - GeometrycollectionGeoJSON
      - `type` 'GeometryCollection', required
      - `geometries` GeometryGeoJSON[], required
  - `collections` string[]: Array of Collection IDs to include in the search for items. Only Items in one of the provided Collections will be searched.
  - `ids` string[]: Array of Item ids to return. All other filter parameters that further restrict the number of search results are ignored
  - `limit` integer: The maximum number of results to return (page size). Defaults to 10
  - `sortby` object[]: An array of objects containing a property name and sort direction.
    - `field` string, required
    - `direction` 'asc' | 'desc', required
  - `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[]
  - `query` string: Define which properties to query and the operations to apply

## Response `200`

A feature collection.

- ItemCollection: A GeoJSON FeatureCollection augmented with foreign members that contain values relevant to a STAC entity
  - `type` 'FeatureCollection', required
  - `features` Item[], required
    - `stac_version` string, required
    - `stac_extensions` union[]
      - union
        - string, uri
        - string
    - `id` string, required: Provider identifier, a unique ID, potentially a link to a file.
    - `bbox` number[], required: 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. Example: The bounding box of the New Zealand Exclusive Economic Zone in WGS 84 (from 160.6°E to 170°W and from 55.95°S to 25.89°S) would be represented in JSON as `[160.6, -55.95, -170, -25.89]` and in a query as `bbox=160.6,-55.95,-170,-25.89`.
    - `geometry` union, required
      - PointGeoJSON
        - `type` 'Point', required
        - `coordinates` number[], required
      - MultipointGeoJSON
        - `type` 'MultiPoint', required
        - `coordinates` array[], required
          - number[]
      - LinestringGeoJSON
        - `type` 'LineString', required
        - `coordinates` array[], required
          - number[]
      - MultilinestringGeoJSON
        - `type` 'MultiLineString', required
        - `coordinates` array[], required
          - array[]
            - number[]
      - PolygonGeoJSON
        - `type` 'Polygon', required
        - `coordinates` array[], required
          - array[]
            - number[]
      - MultipolygonGeoJSON
        - `type` 'MultiPolygon', required
        - `coordinates` array[], required
          - array[]
            - array[]
              - …
      - GeometrycollectionGeoJSON
        - `type` 'GeometryCollection', required
        - `geometries` GeometryGeoJSON[], required
    - `type` 'Feature', required: The GeoJSON type
    - `properties` ItemProperties, required: provides the core metatdata fields plus extensions
      - `datetime` string, date-time, nullable, required: The searchable date and time of the assets, in UTC. It is formatted according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). `null` is allowed, but requires `start_datetime` and `end_datetime` from common metadata to be set.
    - `links` Link[], required
      - `href` string, required
      - `rel` string
      - `type` string
      - `hreflang` string
      - `title` string
      - `length` integer
    - `assets` ItemAssets, required
  - `links` Link[]: An array of links. Can be used for pagination, e.g. by providing a link with the `next` relation type.
    - `href` string, required
    - `rel` string
    - `type` string
    - `hreflang` string
    - `title` string
    - `length` integer
  - `context` ItemCollectionContext
    - `returned` integer, required
    - `limit` integer, nullable
    - `matched` integer

## Other responses

- `default`: An error occurred.

---

[API](https://skmtc.dev/dlr/apis/eoc-eo-products-service.md) - [All operations](https://skmtc.dev/dlr/apis/eoc-eo-products-service/llms.txt) - [OpenAPI document](https://skmtc.dev/dlr/apis/eoc-eo-products-service/revisions/fe923bc9f22c?raw)
