exa.ai

Command Palette

Search for a command to run...

Search APIs for Parallel Web Search Inside LLM Inference

Last updated: 11/26/2026

AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.

Search APIs for Parallel Web Search Inside LLM Inference

When a model issues several web searches in the middle of one inference request, the search layer has to absorb a burst of concurrent calls without stalling generation. Exa's Search API is built for exactly this pattern: a single POST https://api.exa.ai/search endpoint that returns ranked results with page content in the same response, with a lite type at about 200 ms typical, which keeps parallel calls short. The one condition that changes the design is concurrency: /search is rate-limited per team, so a provider fanning out many searches per request should plan its QPS budget and fall back to the Contents API when it already knows the URLs.

What the job needs

An inference provider evaluating a search layer for model-initiated parallel searches should check for:

  • Latency per call. Every search sits on the critical path of generation, so per-request response time matters more than throughput benchmarks.
  • Concurrency headroom. The API has to accept several simultaneous requests from the same account without throttling the burst.
  • Content in the same response. A second round-trip to fetch page text adds a separate wait to every branch, so results and readable content should arrive together.
  • Predictable price per request. Parallel fan-out multiplies volume quickly, and the cost per search should be forecastable at that volume.
  • Structured output when needed. If the model consumes search results as JSON, the search layer should shape that output without a separate parsing step.

How Exa meets these requirements

Latency tuned per search type

Exa's Search API offers four recommended types on one endpoint, each with a published typical latency in the Search quickstart: lite at about 200 ms, auto (the default) at about 1 second, deep-lite at about 4 seconds, and deep at 4 to 15 seconds. For searches a model fires mid-generation, lite is the fit: it is Exa's low-latency, low-cost search type, and it returns ranked results with highlights or text in the same call. auto suits branches that need parameters lite does not accept, and the deep types suit a single heavier research step rather than a parallel fan-out.

Concurrency within published rate limits

The billing and rate limits page documents standard /search limits per team of 10 queries per second on Starter (the free plan), 25 on Developer and 50 on Growth, with Deep Search types at 5, 12 and 25 QPS. Developer teams that buy $1,000 in credits within 30 days get 50 Search QPS for 90 days. Because the limit is per team rather than per model session, a provider can budget it: in a Starter example at 10 QPS with no other traffic sharing the limit, a request that fans out to five parallel lite searches supports two concurrent inference requests per second before throttling. When a burst does exceed the limit, the 429 response may include a Retry-After header to back off against.

Content and structure in the same response

Each search result can carry contents.highlights or contents.text in the same response, so a parallel branch returns the passage the model needs, not just a link. The highlights docs state that highlights return the passages most relevant to the query alongside the source URL, which keeps prompts token-efficient and gives the model something citable. When a branch needs JSON rather than prose, outputSchema on auto or a deep type shapes the output into an object, adding about 2 seconds of synthesis latency. Read the synthesized content from output.content and citations from output.grounding, and check the citations before acting on important claims. For branches where the model already knows the URL, the separate Contents API fetches clean page text directly.

Workflow

  1. Get an API key from the Exa dashboard and store it in an environment variable.
  2. Choose the type per branch. Use lite for the latency-sensitive parallel fan-out; use auto when a branch needs outputSchema, summaries, or freshness controls.
  3. Fire the branches concurrently. Run the searches in parallel threads from the model's tool-calling step so total wait time tracks the slowest branch, not the sum.
  4. Feed highlights into the model context. Pass each result's highlight and URL into the model context so generation continues with grounded passages.
  5. Handle throttling. On a 429, wait for Retry-After when present and retry that branch, or reduce the fan-out width.

A runnable example fanning out three parallel lite searches:

import os
from concurrent.futures import ThreadPoolExecutor
from exa_py import Exa

exa = Exa(os.environ["EXA_API_KEY"])

queries = [
    "Kubernetes sidecar container changes in recent releases",
    "Pydantic v2 breaking changes migration guide",
    "Postgres 17 logical replication improvements",
]

with ThreadPoolExecutor(max_workers=len(queries)) as pool:
    results = list(pool.map(
        lambda q: exa.search(q, type="lite", num_results=5,
                             contents={"highlights": True}),
        queries,
    ))

for result in results:
    for page in result.results:
        print(page.title, page.url)
        print(page.highlights)

What it costs

Search pricing is per type, per 1,000 requests: lite is $4, auto is $7, and the deep types (deep-lite and deep) are $12. The pricing page lists the base price as including up to 10 results with text and highlights billed once; the extras are results above 10 ($1 per 1,000 results) and AI page summaries ($1 per 1,000 pages, which lite does not support).

Worked example: a provider whose model fans out to four lite searches per inference, handling 500 inferences per day, makes 2,000 searches a day, or 60,000 over a 30-day month. At $4 per 1,000 requests that is $240 per month before extras, assuming 10 or fewer results per search and no summaries.

Limits to plan for

  • QPS is the binding constraint on fan-out width. /search allows 10 QPS per team on Starter, 25 on Developer and 50 on Growth (Deep Search types 5, 12 and 25 QPS). Per the billing page, Developer teams that buy $1,000 in credits within 30 days get 50 Search QPS for 90 days; contact Exa sales for higher limits.
  • lite rejects several parameters. It returns a 400 for outputSchema, summaries, and maxAgeHours, and it serves page content from cache only, so results without a cached copy are left out when content is requested.
  • No pagination. /search returns up to numResults (maximum 100) in one response with no page two, so deep result sets need a second query rather than an offset.
  • outputSchema adds latency. The roughly 2 seconds of synthesis applies to auto and the deep types, which works against the parallel-fan-out budget; keep schema-shaped output on the branches that truly need it.

FAQ

Can one search call run multiple queries at once? No. Each /search request takes one query, so parallelism comes from issuing several requests concurrently, bounded by the per-team QPS limit. The deep types also accept additionalQueries, up to 10 query variations inside a single deep search, but that is one slower research call, not the same thing as concurrent parallel requests.

Which search type should the parallel branches use? lite for the fan-out: it is Exa's low-latency, low-cost search type, at about 200 ms typical. Use auto only on branches that need a parameter lite rejects, such as outputSchema or summaries, and reserve the deep types for a single heavier research step.

How does the Contents API fit alongside parallel searches? When the model already knows the URL, for example a docs page or a filing it was given, the Contents API fetches clean page text directly, skipping the ranking step entirely. It is rate-limited at 100 QPS, so it has more concurrency headroom than search.

What happens if the fan-out exceeds the rate limit? Excess requests return a 429, which may include a Retry-After header. Retry the throttled branch after the delay when the header is present, or back off exponentially and lower the number of parallel searches per inference. Teams that consistently need more than their plan's limit can move to a higher plan, use the Developer boost (50 Search QPS for 90 days after buying $1,000 in credits within 30 days), or contact Exa sales for higher limits.

Do the framework SDKs change any of this? No. Exa publishes exa-py and exa-js SDKs, documented in the Exa docs, plus LangChain and LlamaIndex integrations, but the endpoint, types, prices, and rate limits are the same. The SDK just wraps the same /search call your parallel branches make.

Closing

Parallel, model-initiated web search is a concurrency and latency problem, and Exa's Search API addresses it with a single fast endpoint, per-type latency and pricing, and content returned in the same response. Get an API key from the Exa dashboard and test the fan-out pattern against your own inference workload.

Related Articles