One query in words. The right platforms, merged.

Universal search picks the platforms, sends each a search that fits its rules, runs them in parallel and merges the answers by rank. The plan and the price are in the answer, and you can see both before anything runs.

One question, five stages

Every call runs up to five stages. The response lists all five with a status, the milliseconds each took and the credits each cost.

universal search · one query, five stages

inq=rust "async runtime" on hackernews and devto

  1. 1 · planDeterministic planner

    The hints in the text choose the platforms. Each sub-query is fitted to that endpoint's own rules.

    • hackernewsrust "async runtime"
    • devtorust
    0 credits
  2. 2 · fan_outParallel legs

    One search per platform, up to 12 in parallel. One failing leg does not fail the call.

    per leg that succeeded
  3. 3 · fuseRRF, k = 60

    Each row scores 1 / (60 + rank) on every list it appears in, then the lists merge.

    • #10.016393
    • #20.016129
    • #30.015873
    0 credits
  4. 4 · rerankRelevance rerank

    Judges each row against the query when asked (relevance=).

    optional, not enabled yetorder stays pure RRF
  5. 5 · clusterTF-IDF clusters

    Groups rows by their terms (themes=true). Naming the groups needs a model.

    naming: not enabled yetunnamed groups: Theme 1, 2, 3
Server-sent events, in order
  1. 1event: planthe plan
  2. 2event: legone per platform, as it settles
  3. 3event: fusedthe merged list
  4. 4event: enrichone per optional step
  5. 5event: donemetadata.pipeline + credits_remaining

event: donepipeline[]: plan okfan_out okrerank skippedfuse okcluster skipped

An illustrative run of q=rust "async runtime" on hackernews and devto. The stage names, k = 60, the 12-platform cap and the event names are the real ones. Stages are drawn in stream order; metadata.pipeline lists them as plan, fan_out, rerank, fuse, cluster.

The same five stages as a list

In: q=rust async runtime on hackernews and devtoOut: data.fused, metadata.plan, metadata.pipeline

  1. stage 1plan

    Reads the query, picks the platforms, fits a sub-query to each search.

    Works today. Free.
  2. stage 2fan_out

    One search per platform, in parallel. A failing platform does not fail the call.

    Works today. Each leg that succeeded.
  3. stage 3rerank

    Judges each row against the query (relevance=). Only when asked.

    Not enabled yet
  4. stage 4fuse

    Merges the platforms by rank (reciprocal rank fusion, k = 60).

    Works today. Free.
  5. stage 5cluster

    Groups the rows into named themes (themes=true). Only when asked.

    Not enabled yet
Every response lists all five stages with a status, the milliseconds each took and the credits each cost. Dashed stages are optional AI steps.

Try the plan for 0 credits#

Add dry_run=true and nothing runs and nothing is charged. You get the plan, each search that would run with its price, and your balance. Recorded on the dev API (shortened), for a query with two platform hints:

shell
curl "https://api.onekey.dev/v1/search/universal?q=rust%20async%20runtime%20on%20hackernews%20and%20devto&dry_run=true" \
  -H "x-api-key: YOUR_API_KEY"
json
{
  "success": true,
  "data": {
    "plan": {
      "method": "deterministic",
      "cleaned": "rust async runtime",
      "selection": "hints",
      "platforms": ["hackernews", "devto"],
      "subqueries": { "hackernews": "rust async runtime", "devto": "rust" },
      "adapted": { "devto": "first keyword only" }
    },
    "legs": [
      { "platform": "hackernews", "endpoint": "hackernews.search", "params": { "q": "rust async runtime" }, "credits": 1.0, "worst_case_credits": 1.0 },
      { "platform": "devto", "endpoint": "devto.search", "params": { "q": "rust" }, "credits": 5.0, "worst_case_credits": 5.0 }
    ],
    "credits": { "legs_worst_case": 6.0, "legs_list_price": 6.0, "ai": null },
    "ai_enabled": false
  },
  "metadata": { "recipe": "search_universal", "dry_run": true, "legs": 2, "credits_charged": 0.0 }
}

Read it: the words "on hackernews and devto" chose the platforms and were removed from the query. Hacker News got the whole query. The DEV Community search accepts only one tag-style word, so it got the first keyword, and the plan says so in adapted. The whole call would cost at most 10 credits. Remove dry_run to run it.

What runs today, and what does not#

PartTodayCost
Planner (platform hints, keywords, fitting the query to each search)Works. Rules and string matching, the same plan for the same query.Free
Fan-out (one search per platform, in parallel, failures isolated)Works.Each leg that succeeded, at its endpoint's price
Fusion (reciprocal rank fusion, k = 60)Works.Free
Streaming (Accept: text/event-stream)Works. Frames: plan, one leg per platform, fused, done.Same as JSON
Relevance (relevance=score or filter), themes (themes=true), AI planning (plan=ai)Not enabled yet.Metered per judged row when enabled

With AI not enabled, a request that asks for relevance or themes and keeps the default strict=true is refused with AI_UNAVAILABLE before anything is fetched, so it costs nothing. With strict=false you get the fused list back unjudged. plan=ai falls back to the deterministic plan and says why in plan.ai. Details and the pre-release test figures are on AI pricing. This page makes no claim about the quality of AI results, because there are none to show.

19 platforms have a search endpoint today. Without hints, the planner picks among them in a fixed order: stable before beta, then cheaper first, then by id, capped at max_platforms (default 6, at most 12). Name platforms with platforms=, hint them in the query ("on reddit", "from hn and devto"), or restrict by category=. The generated table is on the docs page.

Streaming#

Send Accept: text/event-stream and each platform's result arrives as its search settles, after the plan and before the merged list. Anything refused up front (bad parameters, an unsupported platform, a worst case above your balance) is an ordinary JSON error, never a stream. See Streaming.

What it costs#

1,000 free credits cover the open-platform endpoints. Hard-to-reach platforms (X, TikTok, Instagram, Reddit, and others marked on their page) need a verified email and a purchased pack.

Limits, honestly#