search

Run a search against a configured search tool.

The tool is taken from search_tool_name, which may be omitted when exactly one tool is configured.

Authentication modes:

  • Master key: the user field is required and may name any existing user.
  • API key: usage and spend bind to the key's own user. A user field naming a different user is rejected with 403 (or ignored, when the key's own reject_user_mismatch is false, or the deployment-wide setting is disabled and the key does not override it); it is never billed to that user.
  • Service key: a user field names one of the key owner's end users, created on first use on the budget Otari-End-User-Budget names (or the key's default), and is billed and rate limited as that end user, as on chat completions.
post/api/v1/search

Request

  • The document declares no server URL.
  • Auth: one of:
    • API key in header Otari-Key
    • API key in header x-api-key

Request body

countrystring nullable

Two-letter ISO country code to localize results to

max_resultsinteger nullable

Maximum number of results to return

max_tokens_per_pageinteger nullable

Approximate cap on the page content returned per result

querystring required

The search query

search_domain_filterstring[] nullable

Restrict results to these domains; prefix a domain with '-' to exclude it instead

search_tool_namestring nullable

Configured search tool to run against. Optional when exactly one tool is configured, and ignored on POST /api/v1/search/{search_tool_name}.

userstring nullable

User ID for usage attribution

Example request

{
  "max_results": 5,
  "query": "otari llm gateway"
}

Response

Successful Response

object'search'
search_toolstring required

The configured search tool that served the request

Changes