Stac Search
const url = 'https://example.com/services/stac/search';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"example","collections":["example"],"bbox":[1],"datetime_range":"example","limit":20,"token":"example","auth":{"method":"bearer","token":"example","username":"example","password":"example","header_name":"example","header_value":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/services/stac/search \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "url": "example", "collections": [ "example" ], "bbox": [ 1 ], "datetime_range": "example", "limit": 20, "token": "example", "auth": { "method": "bearer", "token": "example", "username": "example", "password": "example", "header_name": "example", "header_value": "example" } }'Search items in a STAC API with spatial/temporal filters.
Accepts a credential for a protected catalog, applied to this call.
Authorizations
Section titled “ Authorizations ”Request Body required
Section titled “ Request Body required ”object
STAC API root URL.
Maximum items to return.
How one request authenticates to the remote service it names.
object
How the credential is presented to the remote service. Omit the whole auth object for a public service.
Responses
Section titled “ Responses ”Successful Response
object
Matching items.
object
Item identifier.
Item title (falls back to ID).
Number of assets on this item.
Number of items in this response.
Example generated
{ "items": [ { "id": "example", "collection": "example", "item_href": "example", "title": "example", "bbox": [ 1 ], "datetime": "example", "datetime_start": "example", "datetime_end": "example", "epsg": 1, "gsd": 1, "cloud_cover": 1, "data_asset_href": "example", "data_asset_type": "example", "data_asset_key": "example", "data_asset_size_bytes": 1, "thumbnail_href": "example", "asset_count": 1 } ], "matched": 1, "returned": 1}Bad request — invalid payload
Unauthorized — missing or invalid credentials
Forbidden — caller lacks write access
Not found
Conflict — resource state prevents the operation
Validation error
Too many requests — retry after the advertised interval
Headers
Section titled “ Headers ”Seconds until the request may be retried
Internal server error
Bad gateway — an upstream provider failed
Service unavailable — the database could not serve the request