Search
One request to POST /v1/search goes to several search providers at once and comes back as one answer: each provider's results with its status and cost, and on request one merged list of pages that says which providers found each one.
curl -s https://api.jevlin.ai/v1/search \
-H "Authorization: Bearer $JEVLIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "state of grid-scale battery storage 2026", "tier": "balanced", "view": "merged"}'
The fields are the same ones the binary sends; Request options shows them in use from a shell. The full schema of the request and the answer is the OpenAPI document.
Request fields
Only query is required.
| field | what it does |
|---|---|
query | The search query. Not empty, at most 4,096 bytes. |
tier | fast, balanced (the default) or max: how wide the search goes, and the per-query cost ceiling. An unclaimed agent may use fast only. |
providers | Run exactly these arms, by the names below. Needs balanced or max; on fast it is a 400. An unknown name is a 400, never silently left out. |
fast_set | Which fast preset to run, from GET /v1/fast-sets. Only on the fast tier; omitted, the router's default. An unknown name is 400 invalid_fast_set, listing the valid ones. |
domain_filter | Up to 16 bare hostnames, with no scheme or path, such as ["developer.mozilla.org"]; lowercased, and a subdomain of one matches. See the filters. |
recency | day, week, month or year: 1, 7, 31 or 366 days back from the request. See the filters. |
as_of | An RFC 3339 time with a zone, such as "2026-11-05T00:00:00Z": search the web as it was saved at or before then, up to 365 days back. Not with recency or search_queries, and not on the stream. See Dated search. |
max_results | Results asked of each provider. The tier's default is 8 (15 on max); clamped to at most 25. The Tavily arms return at most 20. |
view | "merged" adds the merged view to the answer and changes nothing else. See The merged view. |
merged_limit | The merged view's window, 1 to 50 pages: 12 by default, 24 on max, for each search_queries form. Needs the merged view. |
max_chars | A total character budget for the merged pages' excerpts; excerpts_trimmed says whether anything was cut. Needs the merged view. |
page_chars | The per-page excerpt cap, 200 to 4,000 characters, in place of the default (2,000 on max, otherwise 1,200). With merged_limit it trades pages for depth at the same total: 20 pages of 600 characters instead of 10 of 1,200. Needs the merged view; does not combine with excerpt_mode. |
objective | What you are trying to find out, in your own words. Sent to the providers that take one and kept on the trace; never used to rank. |
search_queries | Up to four rewordings of the query, run beside it in the same call by every arm that batches. Each form is billed as one query per arm. |
cache | "default", or "refresh" to skip the router's cached answer to the same search and run it live, billed as live. See The cache. |
session_id | Groups consecutive queries, also accepted as the X-Session-Id header. The answer echoes a session block: query_index, and reformulation_of with its similarity when the query rewords one from the last 5 minutes (half or more of their words in common). Grouping only: no context carried, no caching, no billing effect. It does not build the Threads view; trace.session_id does. |
trace | An optional lineage object, at most 64 KiB, that threads this search into a session trajectory. Nothing in it changes how the search runs, and a malformed one is dropped, never a reason the search fails. See Threads. |
rollout | Tags the search with the rollout it belongs to: question_id, rollout_id and an optional group_id. A bad one is 400 rollout_invalid, never dropped. It changes nothing about how the search runs, is cached or is billed. See Rollouts. |
policy | A plain-text routing hint. Recorded only; it does not change routing. |
excerpt_mode | Experimental: "split" spends one excerpt budget on more, shorter pages. Needs the merged view, and balanced or max. |
merge_mode, excerpt_style, exclude | Experimental presentation controls, off on the hosted service: any of them is 400 invalid_request there. Where a deployment turns them on, merge_mode: "interleave" orders pages round-robin across providers, excerpt_style: "single" keeps one excerpt per page, and exclude leaves out up to 100 pages named by source_id or URL. |
Two optional headers go with the body: X-Session-Id, the same as session_id, and X-User-Id, an opaque reference to your own end user, kept on the trace.
A field the router does not know is a 400, not ignored. So is a body over 64 KiB, a query over 4,096 bytes, or anything after the body's one JSON value, all before any provider is called (malformed_json for the body).
query, tier, providers, the filters, view and the merged view's window and budget, session_id, trace and Idempotency-Key are frozen: safe to depend on. fast_set, cache, page_chars, objective, search_queries, policy, as_of, rollout and the experimental controls are moving: they may still change.
Tiers and providers
What each tier runs and roughly what it costs is on Providers and tiers. Omit providers and the tier chooses. GET /v1/fast-sets lists the fast presets, each with its arms and the router's cost estimate, and which one is the default; reading it spends nothing.
The names providers takes on the hosted service:
| arms | runs |
|---|---|
exa, telem, brave, serper, parallel-search, perplexity-search, tinyfish | The core indexes. telem asks two indexes, Ceramic and Seltz. |
exa-lite, parallel-fast | Extended: a lighter Exa read, and Parallel's fast mode. They run in the fast presets, and otherwise only when named. |
tavily, tavily-advanced | Extended and in no tier or preset: Tavily at basic and at advanced search depth, $0.005 and $0.010 a search, only when named. At most 20 results each, and no publication dates. The two are one index group: a page both find counts once. |
To add Tavily, name it beside the arms you want:
{"query": "…", "tier": "balanced", "providers": ["exa", "brave", "tavily"]}
The research arms (parallel, tavily-research, pplx-agent, octen) exist only on self-hosted deployments with their own provider keys; naming one on the hosted service is a 400. tavily-research is not the tavily search arm.
A tier is also a per-query cost ceiling, checked against the router's estimate before anything is called: $0.035 for fast, $0.08 for balanced and $0.15 for max on the hosted service, for each search_queries form. A set of arms over it is trimmed, not refused, and decision.trimmed names what went. When no set fits at all the answer is 402 budget_exceeded: ask for less, with a cheaper tier, fewer providers or fewer search_queries.
The filters
domain_filter and recency are enforced by the router. Each is sent to every arm whose provider takes it, and then the router checks every result itself: a host outside your list, or a page dated before your window, is dropped before the merge, whatever the provider did with the filter. A result with no date is kept under recency.
With either filter the answer carries filters_applied. For each filter it lists the arms it was sent to (sent_to), the arms it was not (not_sent), and how many results the router's own check removed (dropped).
The cache
A repeat of the same search within 15 minutes is answered from the router's cache, with no provider called:
- What counts as the same. The query, its
search_queriesrewordings, theobjective,max_results, the arms that would run, the tier, and the filters.view, the merged view's window and budget, andsession_idare not part of it, so they can differ. - What it costs. Nothing:
usage.cache_hitistrueandusage.cost_microsis0. The candidates keep the cost of the call that filled the cache, so bill fromusage, never from the sum of the candidates. - Who shares it. Every project that asks the same search, except a zero-retention project, whose results are never cached. Fast presets that resolve to the same arms share it too. A dated search is cached for the asking project alone.
cache: "refresh"runs the search live, billed as live (usage.cache_refresh: true), and writes the fresh result for the next caller. A fresh result with fewer usable arms than the cached one is returned to you but not written.
Dated search
as_of searches the web as it was saved at or before an instant, instead of as it is now:
{"query": "latest stable Kubernetes release", "tier": "balanced", "as_of": "2026-06-01T00:00:00Z"}
- The cutoff is an RFC 3339 time with a zone (
Zor an offset), at least a minute in the past and at most 365 days back. The answer echoes it, in UTC to the second, asas_of. - Where the results come from. Each result is the page's latest copy saved at or before the cutoff, from Perplexity's saved copies only: never a live result, and no other index's results are merged in. A page with no saved copy is left out, so fewer results, or none, is a valid answer.
- What it runs on.
balancedormax, orperplexity-searchnamed inproviders. The fast presets have no arm that serves it, so afastdated search is422 as_of_unsupported_for_selection. Onmaxthe results are ranked, with no written synthesis. - The cutoff is held. The router drops any result published on a day after the cutoff's day, and counts them in
filters_applied.as_of.dropped. An undated result is kept. - What combines with it.
domain_filterandcache: "refresh"do;recency(400 as_of_with_recency),search_queriesand the stream (400 as_of_conflict) do not. - Repeats are the same. On a project that keeps search content, the same dated search again (the same query,
objective, tier,providers,domain_filter,max_resultsand cutoff) is served from that project's own cache for up to 24 hours at no cost, so repeated runs of one question see the same pages. The cache is held in the router's memory: a restart starts it again, and the next call is a fresh one that may return different pages, because the saved copies change over time. A dated result is never shared with another project, even one in the same organization, andcache: "refresh"makes a fresh dated call. - One a second. Dated searches share one call a second across the service. Past it the answer is
429 as_of_rate_limitedwithRetry-After; send the same request again after it. That refusal is not stored under anIdempotency-Key, so the retry runs. - The platform's key only. An account whose own Perplexity key would carry the call gets
403 as_of_requires_platform_key. - What it costs. $0.005 a dated search, Perplexity's price, whatever the tier, since only Perplexity runs. A repeat served from the project's cache costs nothing.
A malformed or out-of-range as_of is a 400 with an as_of_* code; it is never answered as a live search. For a live search, leave the field out. Every code is on Errors. To read a page from a dated search in full, send the same as_of to fetch.
The answer
A well-formed request answers 200 even when every provider failed; each candidate's status carries the detail.
| field | what it holds |
|---|---|
request_id | The trace id, a UUIDv7, also sent as the X-Request-Id header before any body bytes. |
candidates[] | One per arm, ranked; see the candidates. |
chosen | The index of the chosen candidate, or -1 in return-all mode or when every candidate failed. |
no_usable_result | Present, and true, only when no candidate returned anything usable. Check this for "nothing came back", not chosen. |
decision | The tier, the arms that ran, requested when you named them, trimmed[], fast_set on the fast tier, and build (the router's version and config_hash). |
usage | cost_micros, what the call cost in millionths of a dollar, latency_ms, cache_hit, and pending. |
filters_applied | With a filter or as_of, as above. |
as_of | On a dated search only: the cutoff it was served at. |
The rest of the answer (signals, the session block, usage.deadline_hit and byok, decision.mode and provider_set) is in the OpenAPI document.
The candidates
| field | what it holds |
|---|---|
provider | The arm's name, as providers takes it. |
kind | retrieval (ranked results) or answer (prose with citations). |
tier | The arm's own tier, core or extended; not the search's tier. |
status | ok; timeout (the provider's own deadline); deadline (the search's shared deadline came first); auth (the provider refused the credential); quota (the provider is rate-limited or out of budget, so try later); error (anything else, with error saying what); skipped (no credential, a breaker open, or the budget); pending (a slow-lane arm still running). Treat a status you don't know as a failure. |
citations[] | The results: each with its url, domain, title, snippet, rank, excerpts and, where the provider gives one, published. |
answer | An answer engine's prose. |
latency | ttfb_ms and total_ms. |
cost_micros, cost_source | What the arm cost. reported means the provider's own figure, which wins over the rate card (modeled); ignore any cost inside a candidate's raw provider data. |
route | Moving: for an arm with more than one way to its index, the way that answered, such as telem or the vendor's own API. |
A candidate is usable only when its status is ok and it has an answer or at least one citation.
usage.pending above 0 means a slow-lane arm is still running. It was sent with the request but not waited for; it lands on the trace afterwards, billed under the same request id, so usage.cost_micros is a floor until it does. The hosted service has no slow-lane arm, so nothing is pending there. See Webhooks.
The merged view
"view": "merged" adds merged[], indexes, coverage, merged_limit, merged_total and, when the excerpt budget cut something, excerpts_trimmed.
merged[] is one entry per page across every usable arm, cut to merged_limit. It is ordered by votes, highest first, then best_rank, lowest first, then first appearance. Each page has:
| field | what it holds |
|---|---|
result_id | The page in this search. |
source_id | The page in any search: the same page under any spelling has the same one. Use it to read the page in full. |
url | The page's address as the first provider gave it. Cite this. |
canonical_url | The key the page was merged under. Informational; never cite it. |
title, domain, published | The first ones the providers gave. |
found_by[] | The providers that found it, each with its rank, and its form when only a reformulation found it. |
best_rank | The best of those ranks. |
groups, votes | How many independent index groups found it, and how many group-and-wording pairs listed it. votes is the order's first key. |
excerpts[], excerpt | Every distinct text the providers gave for the page, and the same joined, cut to the page's cap. |
matched_terms | The query's identifiers found on the page: paths, snake_case and camelCase names. |
exclusive, score and compact are there too, and moving.
indexes says how each arm ended: selected (the arms that ran), ok, pending, and one by_provider[] row per arm with its status, results (its citation count, 0 when it found nothing, which is still ok), latency_ms, error, and a reason when the router decided the arm's fate without an answer (no_credential, breaker_open, provider_capacity, deadline_elapsed, served_from_cache, snapshot_rate_limited among them; treat an unknown one as opaque).
coverage is what the union found that no single index did: pages, exclusive, corroborated, groups, and per group. With search_queries, by_form and reformulation_only count what the rewordings found.
Streaming
POST /v1/search/stream takes the same body and runs the same search; only the reply differs. It is application/x-ndjson, one JSON event per line, flushed as it happens:
start → agent and candidate, in the order they happen → done → late candidates → complete
Every line has a type:
type | carries |
|---|---|
start | Always first: request_id, query, tier, mode, providers, provider_set, fast_set, trimmed, deadline_ms. |
agent | A research arm's thinking as it runs: provider, elapsed_ms, kind, text. |
candidate | One arm's candidate as it finishes, under candidate, with elapsed_ms; late: true for a slow arm that landed after done. |
done | The answer under response, exactly as POST /v1/search would return it. Without a slow lane, the last line. |
complete | Only with a slow lane, last: elapsed_ms, late_arms, total_cost_micros. |
An error type is defined but not sent today; treat one as the end. On a cache hit the cached candidates are replayed at once. Hanging up does not stop the search, its trace or its bill. The hosted service has no slow lane, so there done is always the last line.
The 200, X-Request-Id, the rate-limit headers and Cache-Control: no-store go out before any provider is called, so a problem in the middle of the stream cannot change the status. A request refused for its tier, query or budget is refused before the stream starts, with a normal JSON error. Idempotency-Key is ignored on the stream, and a dated search (as_of) is refused there with 400 as_of_conflict.
Threads
Send the same trace.session_id on every search of one conversation, and the platform shows the session as a path under Threads: what was said before each search, what was asked and what came back, turn by turn.
{"query": "…", "tier": "balanced",
"trace": {"v": 1, "harness": "my-agent",
"session_id": "9f1c0a5b7d3e4f60a1b2c3d4e5f60718",
"turn_id": "turn-0042", "call_id": "call-0007",
"window": "none", "seq": 7,
"history": [{"role": "assistant", "text": "Let me look that up."}]}}
| key | what it is |
|---|---|
session_id | One id per conversation, 1 to 128 characters from [A-Za-z0-9_-]. Anything else is stored but not threaded. Compared within your project only. |
parent_session_id | Only for a subagent: the session that started it. The platform draws the subagent under its parent. |
turn_id | One id per user prompt; groups a turn's searches. |
call_id | One id per search tool call. |
window | The context-compaction generation, "none", then "1", "2" and on; a change shows as a compaction. |
seq | A counter your process bumps on every call; a skipped number shows as a call that left no record. |
history | One entry: the assistant's text just before this search, up to 32 KiB. The only conversation text the object carries. |
The ids, window and seq are kept for every project; history only when the project keeps search content. There is no endpoint that reads a trajectory back yet; it is read on the platform. How the binary fills this in, and what it hashes first, is on Trajectory observability. How a turn ended is a separate, optional call: POST /v1/turns.
Retrying safely
A retry of a search that already ran is a second search and a second bill. Send an Idempotency-Key header to make it safe; see Limits, keys and headers.