Interface StacSearchRequest

Subset of the STAC core API search request shape.

interface StacSearchRequest {
    allowPostFallback?: boolean;
    bbox?: readonly [number, number, number, number];
    collections?: readonly string[];
    datetime?: string;
    fields?: {
        exclude?: readonly string[];
        include?: readonly string[];
    };
    filter?: string | Readonly<Record<string, unknown>>;
    filterLang?: "cql2-text" | "cql2-json";
    ids?: readonly string[];
    intersects?: Record<string, unknown>;
    limit?: number;
    next?: string;
    nextBody?: Readonly<Record<string, unknown>>;
    nextParams?: Readonly<Record<string, string>>;
    offset?: number;
    signal?: AbortSignal;
    sortby?: string | readonly StacSortField[];
    stacBasePath?: string;
    usePost?: boolean;
}

Hierarchy (view full)

Properties

allowPostFallback?: boolean

When false, a failed first POST is surfaced instead of replayed as GET. Dynamic workflow callers use this for an explicitly requested POST; discovered auto POST support leaves fallback enabled.

bbox?: readonly [number, number, number, number]
collections?: readonly string[]
datetime?: string
fields?: {
    exclude?: readonly string[];
    include?: readonly string[];
}

Subset of asset / item properties to return.

filter?: string | Readonly<Record<string, unknown>>
filterLang?: "cql2-text" | "cql2-json"
ids?: readonly string[]
intersects?: Record<string, unknown>
limit?: number
next?: string

Server-driven page token. Optional support for STAC servers that advertise an opaque ?next=… token instead of offset.

nextBody?: Readonly<Record<string, unknown>>

Opaque continuation body members captured from a POST rel="next" link ({ "method": "POST", "body": { "token": "next:…" }, "merge": true }). Merged over the serialized POST /search body.

nextParams?: Readonly<Record<string, string>>

Opaque continuation query params captured verbatim from a server rel="next" link whose cursor is neither offset nor next (pgstac / stac-fastapi emit ?token=next:…). Merged over the serialized search params so the next page is requested exactly the way the server asked.

offset?: number

Numeric page offset. honua-server's /stac/search uses offset as the canonical paging token (its rel=next link href carries ?offset=N). Prefer this over next for honua-server compatibility.

signal?: AbortSignal
sortby?: string | readonly StacSortField[]
stacBasePath?: string

Path prefix the STAC endpoints are mounted under. Defaults to /stac (the Honua Server facade). Backend-agnostic callers pointing at a raw STAC API root (e.g. Earth Search at .../v1) pass "" so the search and collection paths resolve directly under the client baseUrl.

usePost?: boolean

When true, the adapter posts the body to /search.