Skip to main content
POST
/
v1beta
/
namespaces
/
{namespace}
/
search
JavaScript
import Jetti from 'jetti';

const client = new Jetti({
  apiKey: process.env['JETTI_API_KEY'], // This is the default and can be omitted
});

const response = await client.beta.namespaces.search('namespace', {
  objective:
    "Construct a detailed chronology of major regulatory, legal, and investor-facing events related to Acme Therapeutics' Phase III trial for AT-217 between 2015-01-01 and 2024-12-31. Include FDA letters (e.g., clinical holds, complete response letters), SEC filings that change risk disclosures, and significant litigation documents such as class actions or settlements. Emphasize documents that materially affect investor risk exposure.\n",
  max_results: 10,
  mode: 'chronology',
});

console.log(response.results);
{
  "results": [
    {
      "id": "<string>",
      "reasoning": "<string>",
      "publish_date": "<string>",
      "excerpts": [
        "<string>"
      ]
    }
  ]
}

Path Parameters

namespace
string
required

ID of the namespace to search within.

Body

application/json

Search request parameters.

objective
string
required

Natural-language search query. May include guidance about preferred sources or freshness.

mode
enum<string> | null

Applies a retrieval strategy tailored to specific retrieval tasks.

"chronology" — Optimizes search for building timelines. Optimizes retrieval for constructing timelines by prioritizing temporally informative documents and adjusting ranking/recall defaults to surface a coherent sequence of events.

Available options:
chronology
max_results
integer | null
default:10

Upper bound on the number of results to return.

stream
boolean
default:false

Whether to stream the response as server-sent events.

Response

Successful response. When stream: false (default), returns JSON. When stream: true, returns Server-Sent Events.

Output for the Search API.

results
SearchResult · object[]
required

A list of SearchResult objects, ordered by decreasing relevance.