brime

Search

POST /v1/search — fast SERP search with snippets and a synthesised answer.

POST /v1/search runs a SERP query and returns ranked snippets plus a short synthesised answer in well under two seconds.

There is no depth selector — the gateway runs a single tuned instant flow. Semantic intent filters (topic, time range, domains) are still honoured.

Quick example

from brime import Brime

client = Brime()
result = client.search(
    query="Apple Q4 2025 earnings highlights",
    max_results=5,
)
print(result.answer)
for r in result.results:
    print(f"- {r.title}  {r.url}")
import { Brime } from "@brime-ai/brime";

const client = new Brime();
const result = await client.search({
  query: "Apple Q4 2025 earnings highlights",
  max_results: 5,
});
console.log(result.answer);
for (const r of result.results) {
  console.log(`- ${r.title}  ${r.url}`);
}
curl https://api.brime.dev/v1/search \
  -H "Authorization: Bearer $BRIME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "Apple Q4 2025 earnings highlights",
    "max_results": 5
  }'

Request

FieldTypeDefaultDescription
querystringrequiredNatural-language search query (1–1,000 chars).
topic"general" | "news" | "finance""general"Recency hint. news clamps cache TTL to 30 s.
max_resultsinteger51–20.
time_range"day" | "week" | "month" | "year"—Restrict to recency window.
start_dateYYYY-MM-DD—Lower bound on published_date.
end_dateYYYY-MM-DD—Upper bound on published_date.
include_answerbooltrueReturn synthesised answer string.
include_imagesboolfalseReserved.
domainsstring[]—Domain allow-list.
exclude_domainsstring[]—Domain deny-list.

The historical depth field (and LLM tuning knobs like model, token_mode, ranking) are accepted but ignored — the gateway always runs the instant tier.

Latency & cost

Single tier: ~500 ms p50, 0.5 credits per call. Errors are not charged.

Response

{
  "query": "Apple Q4 2025 earnings highlights",
  "answer": "Apple reported $98.4B in Q4 2025 revenue, up 6% YoY, led by Services and Vision Pro 2 launch quarter sales...",
  "results": [
    {
      "title": "Apple Q4 2025 Earnings — Reuters",
      "url": "https://www.reuters.com/technology/apple-q4-2025-results",
      "content": "Apple's fiscal Q4 2025 revenue rose 6% to $98.4B, beating consensus by $1.2B...",
      "score": 0.92,
      "published_date": "2025-10-30"
    }
  ],
  "request_id": "req_01J...",
  "credits_used": 0.5,
  "latency_ms": 643
}
FieldTypeNotes
querystringEchoes the request.
answerstring | nullLLM-synthesised answer; null when no results.
resultsSearchResultItem[]Top-max_results ranked.
request_idstringGlobally unique; useful for audit and refund tickets.
credits_usednumberThis call's debit.
latency_msnumberWall-clock from receive to send.

SearchResultItem

FieldTypeNotes
titlestringPage title.
urlstringCanonical URL.
contentstringSERP snippet.
scorenumber | nullSERP relevance score (when available).
published_datestring | nullISO-8601 if known, else null.

Edge cases

  • No results: results: [], answer: null. We don't error.
  • Empty query: 400 invalid_request.
  • max_results > 20: silently clamped to 20.
  • Conflicting filters (e.g., time_range=week + start_date 2 years ago): start_date/end_date win.

Errors

StatuscodeMeaning
400invalid_requestMalformed body or empty query.
401unauthorizedMissing/revoked API key.
429rate_limitedPer-key budget hit.
502upstream_errorSERP or LLM provider degraded.

See Errors for the full catalog and retry guidance.