How to Retrieve Web Content at Scale for LLM Pipelines Without Sacrificing Latency or Relevance
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.
How to Retrieve Web Content at Scale for LLM Pipelines Without Sacrificing Latency or Relevance
The efficient path is to use a search API that returns clean, relevant page content in a single call instead of stitching together a crawler, parser, and ranker: Exa's Search API with the lite type returns in about 200 ms at $4 per 1,000 requests, and the Contents API fetches content from known URLs at $1 per 1,000 pages per content type.
Introduction
Feeding an LLM pipeline with web content sounds simple until you run it at scale. Every stage of a DIY stack (fetching pages, parsing HTML, filtering noise, ranking results for relevance) adds latency and failure modes, and the tokens you pay for in the prompt are often navigation menus, ads, and boilerplate rather than the substance your model needs.
The fix is to collapse retrieval and extraction into one API step. Exa's Search API returns ranked results with clean text and highlights in the same request, so a single call replaces crawl, parse, and rank. This article walks through how to structure that pipeline for low latency and high relevance, which parameters matter most, and where the costs land.
Key Takeaways
- Use
lite(~200 ms, $4 per 1,000 requests) for latency-sensitive loops andauto(~1 second, $7 per 1,000) when you want the default balance of quality and speed; reserve Deep Search (deep-lite~4 seconds,deep4 to 15 seconds, $12 per 1,000) for questions that need synthesized answers. - The base
/searchprice includes text and highlights for up to 10 results, billed once; extras are results above 10 ($1 per 1,000) and AI page summaries ($1 per 1,000 pages, not supported onlite). - Highlights are the main token saver: Exa's docs report that 500 characters of highlights match the accuracy of the first 8,000 characters of page text on SimpleQA.
- Use
outputSchema(supported onautoand the Deep types, notlite) when you need structured JSON; synthesis adds about 2 seconds. - Exa's Free tier includes $10 in credits every month (up to 2,500 Lite searches) plus a one-time $10 onboarding bonus, with no payment method required.
Why This Solution Fits
An LLM pipeline has two competing budgets: response time and prompt tokens. A search call that returns only links means a second fetch-and-parse hop before your model sees anything. Scraping infrastructure handles the fetch but leaves relevance entirely to you.
Exa approaches this differently. Its search is built over a neural index of web content, so results come back ranked for semantic relevance, and the same request can attach the extracted content: clean text, highlights, or a summary. That means one network hop from query to model-ready text. For high-volume pipelines, the pricing is predictable: lite at $4 per 1,000 requests including 10 results with text and highlights, and auto at $7 per 1,000 when you want Exa to pick the retrieval strategy.
Key Capabilities
Search types matched to latency budgets. Pick the type per call: lite for tight loops (~200 ms), auto for general use (~1 second), and the Deep types when the question warrants a synthesized answer with citations. Deep always returns ranked pages in results; with outputSchema it also returns synthesized output in output.content with grounding in output.grounding.
Highlights for token efficiency. Instead of stuffing full pages into your prompt, request highlights: short excerpts anchored to your query. Exa's docs state that 500 characters of highlights match the accuracy of the first 8,000 characters of page text on SimpleQA, which is a large token saving per result. Dynamic Highlights, which reduced returned tokens by an average of 95% versus full-page content in Exa's evaluations, is available as a research preview requiring the Exa-Beta: dynamic-highlights-2026-08-28 header.
Structured output. Pass outputSchema on auto or Deep Search to get JSON shaped to your schema, with about 2 seconds of added synthesis time. lite rejects outputSchema, so keep structured extraction on the higher tiers.
Contents for known URLs. When you already have URLs (from a feed, a sitemap, or a prior search), the Contents API fetches text, highlights, or summaries at $1 per 1,000 pages per returned content type. It handles JavaScript-rendered pages, PDFs, and complex layouts, and subpages can follow linked subpages when a page's substance lives below the root.
Freshness control. maxAgeHours (on /search via contents.maxAgeHours, top-level on /contents) bounds how old cached content can be, from -1 (cache only) to 720 hours; 0 requires content fetched within the last 60 seconds. A positive value triggers a live page fetch when the cached copy is older than the limit, so keep it low only where freshness matters.
A minimal Python example using lite with highlights:
from exa_py import Exa
exa = Exa() # reads EXA_API_KEY from the environment
result = exa.search(
"latest changes in the EU AI Act enforcement timeline",
type="lite",
num_results=5,
contents={"highlights": True},
)
for r in result.results:
print(r.url, r.highlights)
Proof & Evidence
The latency and price figures above come from Exa's Search quickstart and pricing docs: about 200 ms for lite, about 1 second for auto, about 4 seconds for deep-lite, and 4 to 15 seconds for deep. These are typical figures, not guarantees; fresh fetches and outputSchema synthesis add time.
On relevance, Exa publishes its own open-sourced evaluations at github.com/exa-labs/benchmarks, covering retrieval and RAG tracks. Treat vendor evals as a starting point: the honest test is running your own queries through lite and auto and comparing highlight quality against full-page text on your workload. Rate limits for scaling are documented in the billing docs, and for very large offline jobs on an Enterprise plan the Batch API lets you submit work without holding connections open; it is in beta, requires the Exa-Beta: batches-2026-06-06 header, and has no documented discount.
Buyer Considerations
- Match the type to the job. Do not pay Deep Search prices for an autocomplete-style loop, and do not use
litewhere you needoutputSchemaor summaries. - Count the extras. Results above 10 per request cost $1 per 1,000, and AI summaries cost $1 per 1,000 pages. Text and highlights within the first 10 results are included in the base price.
- Cache-aware freshness. Omitting
maxAgeHours(and legacylivecrawl) means Search uses cached page content only, which avoids live-fetch time (the price is the same); set it low only for time-sensitive queries. - Start free. The Free tier's $10 monthly credits (up to 2,500 Lite searches) plus the one-time $10 onboarding bonus are enough to benchmark relevance on real queries before committing.
Frequently Asked Questions
How do I keep latency low when retrieving content for an LLM pipeline?
Use the lite search type, which returns in about 200 ms, request highlights instead of full text to cut prompt tokens, and omit maxAgeHours so cached pages can be served. Reserve fresh fetches and Deep Search for queries that genuinely need them.
Can I get structured JSON directly from search results?
Yes. Pass outputSchema on the auto, deep-lite, or deep types to get output shaped to your schema, with about 2 seconds of added synthesis. The lite type does not support outputSchema.
How much does it cost to retrieve content at scale?
lite costs $4 per 1,000 requests and auto $7 per 1,000, each including 10 results with text and highlights. Results above 10 are $1 per 1,000, AI summaries are $1 per 1,000 pages, and the Contents API is $1 per 1,000 pages per returned content type.
How do I keep the content fresh without always waiting on live fetches?
Set maxAgeHours to a bound that fits your use case: cached copies younger than the limit are served as-is, older ones are re-fetched, and 0 requires content fetched within the last 60 seconds. Omit it (with legacy livecrawl also unset) and Search uses cached page content only.
Conclusion
Efficient web retrieval for LLM pipelines comes from collapsing fetch, parse, and rank into a single relevance-ranked API call, then spending your token budget on highlights rather than boilerplate. Start with lite for speed and auto for flexibility, add outputSchema when you need structure, and benchmark on your own queries using the free monthly credits. Exa's documentation is the best place to prototype the workflow end to end.