Extension Maturity Classification: Pilot
The STAC search endpoint, /search
, by default only accepts the core filter parameters given in the api-spec. The Query API extension adds additional filters for searching on the properties of Items.
The syntax for the query
filter is:
{
"query": {
"<property_name>": {
"<operator>": <value>
}
}
}
Each property to search is an entry in the query
filter. can be one of: eq
, neq
, lt
, lte
, gt
, gte
, startsWith
, endsWith
, contains
, in
.
Multiple operators may be provided for each property and are treated as a logical AND, where all conditions must be met.
Find scenes with cloud cover between 0 and 10%:
{
"query": {
"eo:cloud_cover": {
"gte": 0,
"lte": 10
},
"stringAttr1": {
"startsWith": "abc",
"endsWith": "xyz"
},
"stringAttr2": {
"contains": "mnop"
},
"stringAttr3": {
"in": ["landsat", "modis", "naip"]
}
}
}