Several queries at once

Up to five queries in one request, judged together in one round-trip.

Pass a list as query — up to five. Headlines are judged against every query in the same calls, which uses fewer tokens and fewer round-trips than searching each query separately.

const res = await ts.search(['el dólar', 'el Presupuesto 2027', 'el FMI'], { mode: 'fast' });

for (const group of res.groups ?? []) {
  console.log(group.query, group.total);
}

What comes back

  • results is one merged list without repeated URLs. Each result has a queries field with the queries it answers.
  • groups has one entry per query, with its own results, near_misses, rejected and, when requested, tone, essential and diffusion.

Use results when the queries are facets of one topic; use groups when they are separate topics that happen to travel together.

Billing

Each query counts as one search of the request’s mode: five fast queries are five searches at $1.40 per 1,000. The savings are in speed and in what the model does once instead of five times.

On this page