search

Search content

Searches through indexed content using query.

Required scope: `knowledge:read`

post/search

Request body

querystring required

Search query string

tagsstring[]

target tag names to be obtained

tag_idsstring[]

target tag IDs to be obtained

tag_filter_logic'AND' | 'OR'

Logical operator for combining filter conditions

source_group_idstring uuid

Source group ID to search within. For crawl data, specify the crawl_id returned by the crawl API.

source_typesSourceType[]
file_typesFileType[]
date_frominteger

Start date for content search (Unix timestamp in seconds)

date_tointeger

End date for content search (Unix timestamp in seconds)

domainsstring[]

Array of domains to search within (supports partial matching)

limitinteger

Maximum number of results to return

offsetinteger

Number of results to skip

use_postfilterboolean

Whether to bypass LanceDB prefilter and apply WHERE after the vector search (IVF_PQ) returns top-K. Significantly faster for broad filters that cover most of the table, but may return fewer than limit results when the hit rate is low.

authz_policystring

(reserved for future use) Name of the registered authz policy to evaluate for this request. Defaults to the reserved "default" policy when omitted. Ignored when authz is disabled. An unknown or malformed name returns 400.

principal_idstring

Identifier of the end-user (principal) on whose behalf this request is made. Used to look up the principal's authz subject attributes for policy evaluation. When omitted, subject attributes are empty (most restrictive). Ignored when authz is disabled.

Example request

{
  "query": "machine learning and artificial intelligence",
  "date_from": 1735639200,
  "date_to": 1735639200,
  "domains": [
    "example.com",
    "blog.example.com"
  ],
  "limit": 10,
  "authz_policy": "external-chatbot",
  "principal_id": "user-123"
}

Response

Successful search results

createdinteger required

The Unix timestamp (in seconds) of when the search was performed

Example response

{
  "created": 1677649420
}

Changes

Changed in 14 of the 71 revisions of this API.103050

    • added the optional property // to the response with the status

      response-optional-property-added

    • added the new optional request property

      new-optional-request-property

    • added the new optional request property

      new-optional-request-property

    • added the new optional request property

      new-optional-request-property

    • added the new optional request property

      new-optional-request-property

    • added the new optional request property

      new-optional-request-property

    • added the new datetime enum value to the request property ///

      request-property-enum-value-added

    • added the new datetime enum value to the request property ///

      request-property-enum-value-added

    • added the new optional request property

      new-optional-request-property

    • added the new optional request property

      new-optional-request-property

    • added the new optional request property

      new-optional-request-property

  • e5a84cf9391111See the full diff
    • added the new aac enum value to the // response property for the response status

      response-property-enum-value-added

    • added the new aac enum value to the request property /

      request-property-enum-value-added

  • 43d49afc6c3811See the full diff
    • added the new jsonl enum value to the // response property for the response status

      response-property-enum-value-added

    • added the new jsonl enum value to the request property /

      request-property-enum-value-added

Of the 71 revisions, 18 have no diff computed.