Search objects
Ranks the objects or passages of one target against a text. The target is a bucket with indexing enabled, or a dataset from List datasets. Each result is an object and the spans in it that matched: pages of a document, characters of a text file, or seconds of a video or a recording. A span holds no text: read it with Read spans. Read the whole object of a bucket from the storage API with its key and versionId. Scope the search with keys, keyPrefix, or a metadata filter. Requires the viewer role. An empty bucket returns no results and the warning index_empty. Nothing is stored.
/v1/workspaces/{workspaceId}/searchAuthentication
Send your Graphon API key with every request. The value is the whole API key that Graphon showed when you created it. See Authentication.
Authorization: Bearer <GRAPHON_API_KEY>Path parameters
workspaceIdstringThe workspace id.
Request body
targetstringWhat to query: a bucket id (bkt…) of this workspace with indexing enabled, or a dataset id (dst…) from List datasets.
querystringThe text to search for. It must contain text. At most 32,000 characters.
modestring (optional)hybrid: Use it for most searches. It matches exact words and meaning together. About a second. keyword: Use it for exact words, such as an ID, a code, or an error message. The quickest mode. Defaults to hybrid. One of: hybrid, keyword.
resultTypestring (optional)The kind of result. object: one result per object, with up to 3 spans. passage: one span per result, so an object can appear more than once. Both have the same shape. Defaults to object. One of: object, passage.
limitinteger (optional)Results on one page, 1 to 100. Defaults to 10.
cursorstring (optional)nextCursor from the previous page. Send it with the same body. It works for 40 minutes.
keysstring[] (optional)Use only these object keys. At most 50. With keyPrefix, an object must match both. Defaults to every object of the bucket.
keyPrefixstring (optional)Use only the objects whose key begins with this text, for example videos/2026/. Defaults to every object of the bucket.
filterobject (optional)Use only the objects whose metadata matches. A clause is { field, op, value } on a metadata field that the bucket lists. text takes every operator. number and time take eq, neq, gt, gte, lt, and lte. bool takes eq and neq. A value is text, a number or a decimal string, an RFC 3339 time, or true or false; in takes an array of 1 to 100 values. and, or, and not combine clauses, at most 4 levels deep and 32 clauses in all. neq and not keep objects that have no value for the field. With keys or keyPrefix, an object must match all of them. A field that is still indexing after a change fails with metadata_field_indexing.