GrounderGuides › What is a grounding API?

What is a grounding API? Web grounding for RAG and AI agents

Published · Last updated

A grounding API is the layer that connects a language model to live, verifiable sources at the moment it answers: it searches the web for relevant pages, fetches and cleans their content, ranks the passages that actually answer the query, and hands the model a cited evidence pack to read before it writes. The result is a model that answers from evidence it was just given, not from what it memorized in training - and every claim points back to a URL. This page defines the term, shows how a grounding API works step by step, explains why it beats a bare model, sets grounding apart from plain RAG, and names the popular options - including Grounder, one grounding API among several.

Transparency note: we build Grounder, one of the grounding APIs named here, so we have a commercial interest. We have aimed for accuracy and describe every other vendor by category, not by numbers we did not measure. The only hard numbers on this page are our own Grounder-vs-Tavily benchmark - and on that benchmark Tavily wins the coverage axis. Always verify current features, limits, and pricing against each vendor's official documentation before you build on them.

Quick reference (Grounder)

What it is
A grounding API: search + fetch + rank → token-capped cited pack
Free tier
1,500 pages/month (email only, no card)
Pricing
Flat monthly - $9 / $19 - not per-call metered
Answers per context
30 / 37 in 65.7k chars (Tavily 26 / 37 in 76.6k)
Interface
MCP server + REST, token-capped with max_tokens

What is a grounding API?

A grounding API is a service that runs the retrieval pipeline an LLM needs to answer from real sources instead of from memory. Left alone, a language model generates from its frozen training weights: it has no idea what happened after its cutoff, no source to cite, and no way to tell you when it is guessing. Grounding fixes that by putting the evidence in front of the model at inference time. A grounding API is the packaged form of that work - one call that turns a question into a set of ranked, cited passages the model reads before it responds.

Concretely, a grounding API does four things so you do not have to build them: it searches the open web for pages relevant to the query, fetches those pages and strips them to clean text, ranks the chunks that answer the query above the navigation and boilerplate, and returns them as a cited pack with the source URL attached to each passage. The model then paraphrases what it was handed, and every sentence traces back to a link you can open. That is the whole idea: replace "trust the weights" with "here is the page."

What is web grounding for AI agents?

Web grounding is grounding whose source of truth is the live web rather than a private, pre-built index. For an AI agent - a system that plans, calls tools, and acts in a loop - web grounding is the tool that lets it check reality: browse for current pages, read them, verify a claim against what it finds, and cite the sources it used. Without it, an agent's "knowledge" is whatever the underlying model memorized before its training cutoff, which is stale the day the model ships and silent about where any fact came from.

For agents specifically, web grounding matters on three axes beyond simple freshness:

How do web grounding APIs work?

Under the hood, a grounding API is a short pipeline. The names differ by vendor, but the stages are the same, and Grounder's four tools map onto them one to one:

1. Search - find candidate sources

The query goes to a search index and comes back as a ranked list of URLs with titles and snippets. This is the "find the sources" step. In Grounder this is web_search (Google results, snippets, people_also_ask, and a knowledge_graph panel), which returns links and does not call an LLM. The snippet alone often already states the answer.

2. Fetch - read and clean the page

A candidate URL is fetched and stripped from raw HTML to clean markdown - navigation, ads, and script noise removed. In Grounder this is fetch: one page to clean markdown, with an optional query that returns verbatim ranked passages instead of the whole page, and a max_tokens cap so the response fits your budget. A page it cannot read returns 422 fetch_failed with a reason and is not charged.

3. Chunk and rank - keep the passages that answer the query

Cleaned pages are split into chunks, scored against the query, and de-duplicated so the pack is diverse rather than five copies of the same paragraph. In Grounder this happens inside deep_search, which searches, reads up to ~10 of the top pages, chunks and MMR-ranks them, and returns a token-capped cited passage pack (with an optional include_answer). This is the step that turns "some pages" into "the evidence."

4. Assemble the cited pack - and, for hard questions, loop

The ranked passages are assembled into a single response, each tagged with its source URL, capped to a token budget so it drops cleanly into a prompt. For questions one pass cannot settle, an agentic loop plans, searches, reads, asks "what am I still missing?", and repeats. In Grounder this is research: a background, pollable job billed as one run against a monthly allowance. The model at the end reads the pack, not the raw web.

Grounding APIs at a glance

The category is broad. These are the main kinds of grounding API and what each one actually returns. Prices and free tiers change often - treat every one as "verify on their page," not as a quoted number:

API / categoryTypeReturnsLive web?CitationsFits a window?
Grounding with Google SearchProvider-native groundingGrounded model answer + citationsYesYesModel-managed
Tavily (baseline)Search API for LLMsResults + synthesized answerYesYesNo (uncapped)
ExaNeural/semantic search APIMeaning-based resultsYesYesNo (uncapped)
FirecrawlScrape + searchClean page markdownYesSource URLNo (full page)
VectaraGrounded-RAG platformGrounded answer over your dataYour corpusYesPlatform-managed
Brave Search API / SerperRaw search indexSearch results (links)YesLinks onlyNo (links)
Grounder (ours)Search + fetch + deep_search + researchReal page + token-capped cited packYesYes (per passage)Yes (max_tokens)

Benefits of grounding for AI agents

Why bolt a grounding API onto a model that already "knows" a lot? Because a bare model and a grounded one fail in very different ways. The concrete benefits:

Grounding vs plain RAG

Grounding and RAG are often used as synonyms, and grounding is a form of retrieval-augmented generation. The useful distinction is the corpus. Plain RAG usually means retrieving from a private index you built ahead of time - your own documents chunked into a vector database. Web grounding retrieves from the live web on demand: no pre-built index, a search-fetch-rank pass at query time over pages you do not own.

Plain RAG (private index)Web grounding
CorpusYour documents, pre-indexedThe live web, fetched on demand
FreshnessAs fresh as your last re-indexCurrent at query time
SetupBuild and maintain a vector storeOne API call, no index to own
Best forProprietary, internal knowledgeOpen-web facts, news, docs, prices
CoverageOnly what you ingestedAnything a search can reach

These are not rivals - most production systems run both. Use a private RAG store for your proprietary data and a grounding API for the open-web facts your documents do not contain. A grounding API like Grounder is the web-corpus half: it removes the index-building and the fetch-clean-rank plumbing so you only wire the call.

Popular grounding APIs

"Grounding API" spans several categories. Match the category to your job rather than picking a brand. Every specific limit or price below is "verify on their page," not a measured claim:

Provider-native grounding

The model provider grounds its own model for you. Grounding with Google Search (and Vertex AI / Gemini Enterprise, which now also accepts external search providers) is the clearest example, and the major model APIs ship built-in web-search tools of their own. Best for teams already committed to one provider who want grounding with the least wiring. The catch: it is coupled to that provider's model and routes every query through it - verify what is retained and priced before sending sensitive prompts.

Search APIs for LLMs

Tavily returns results plus a synthesized answer; Exa is a neural/semantic search API tuned for meaning-based recall; Linkup is a newer sourced-results API. Best for grounding any model you choose, since they return sources you feed yourself. The catch: results come back at whatever length, uncapped to a context budget, and are metered per call. See our Tavily alternatives guide for the full split.

Scrapers and grounded-RAG platforms

Firecrawl is read-first: it turns pages into clean markdown you chunk yourself, good for building a corpus. Vectara is a grounded-RAG platform that indexes your data and returns grounded answers over it. Best for extraction at scale (Firecrawl) or a managed RAG stack over your own documents (Vectara).

Raw search and self-hosted

Brave Search API runs its own index; Serper is a cheap Google SERP API; self-hosted SearXNG has no per-call fee at all. Best for the cheapest raw search leg you wire yourself. The catch: they return links only - the fetch, rank, and fit-to-window steps are still on you.

Grounder (ours)

Grounder returns a token-capped cited pack over MCP and REST: web_search for links, fetch for the real page as clean markdown, deep_search for a ranked cited evidence pack, and research for a multi-step agentic run - all capped to your window with max_tokens, on a flat monthly bill. Where it fits, and where it does not, is measured below.

Where Grounder fits, measured (and where Tavily wins)

Grounder is the token-capped, flat-billed grounding API. Here is the honest head-to-head against Tavily, including the axis where Tavily is the better choice. These are the only hard numbers on this page.

Hard pages read (of 19)Answers found (of 37)Context spent
Tavily132676.6k chars
Grounder103065.7k chars

Hard-page coverage: Tavily wins. On 19 deliberately hard targets, Tavily read 13, Grounder read 10. g2.com is the clearest case - Tavily returns it and Grounder cannot read it at any setting. If your grounding workload is dominated by bot-walled pages, Tavily is the better tool.

Answers per token: Grounder wins. Across 37 real pages scored on whether the sentence that answers the query survives into the returned passages, Grounder found 30 answers in 65.7k characters against Tavily's 26 in 76.6k. More answers, less context - which matters most where a small window cannot afford navigation and boilerplate.

Billing and privacy. Grounder is a flat monthly price with a page budget, so a grounding loop that reads hundreds of pages does not change your bill. It stores per-key billing counters and a domain on retrieval events, never the query, the path, or who asked. A page it could not read returns 422 fetch_failed with a reason and is not charged.

Known limitations (honest)

The section most vendor pages skip. Every one of these is a real reason to pick a different grounding API:

  1. Third on hard-page access. On the hard-web set, Grounder read 10/19 - behind Tavily (13) and Evomi (11), ahead of plain HTTP (9). If your targets are bot-walled, this gap is against you.
  2. Cannot read g2.com at any setting; Tavily can. Review-site-heavy grounding should use a tool that reaches those pages.
  3. Resells a discovery vendor. Grounder does not run its own search index like Brave or Tavily, so it inherits that upstream vendor's coverage limits.
  4. Near-zero distribution. Tavily has a large SDK ecosystem and many framework integrations; Grounder has an MCP server and a REST API and little else. If you want a big install base and community, that gap is real.
  5. Flat pricing is not cheapest-per-call. For tiny or occasional grounding, Serper or a self-hosted SearXNG costs less than a flat monthly plan.
  6. No neural/semantic recall. If you need meaning-based retrieval where the answer is phrased unlike the page, Exa is purpose-built for that and Grounder is not.

Grounding API in code: Python and Node

A grounding API should be two calls: search for candidate sources, then get a token-capped cited pack. Grounder is an MCP server and a plain REST API; below is the REST path with an environment key and explicit error handling.

Python (production-shaped: env key, timeout, error surface):

import os
import requests

BASE = "https://grounder.dev"
HEADERS = {
    "Authorization": f"Bearer {os.environ['GROUNDER_KEY']}",
    "Content-Type": "application/json",
}

def search(query: str, timeout: float = 30.0) -> dict:
    """Find candidate sources (links + snippets). Costs 1 page."""
    r = requests.post(
        f"{BASE}/v1/search",
        json={"query": query},
        headers=HEADERS,
        timeout=timeout,
    )
    r.raise_for_status()
    return r.json()

def deep_search(query: str, max_tokens: int = 600, timeout: float = 60.0) -> dict:
    """Return a token-capped, cited evidence pack for `query`."""
    r = requests.post(
        f"{BASE}/v1/deep_search",
        json={"query": query, "max_tokens": max_tokens},
        headers=HEADERS,
        timeout=timeout,
    )
    r.raise_for_status()          # 4xx/5xx -> exception, not silent bad data
    return r.json()

if __name__ == "__main__":
    hits = search("what is a grounding api")
    print(f"{len(hits.get('results', []))} candidate sources")

    pack = deep_search("what is a grounding api")
    for p in pack["passages"]:
        print(f"[{p['score']}] {p['url']}\n{p['text']}\n")

Node.js (same flow, native fetch, explicit error on non-2xx):

const BASE = "https://grounder.dev";
const HEADERS = {
  "Authorization": `Bearer ${process.env.GROUNDER_KEY}`,
  "Content-Type": "application/json",
};

async function post(path, body) {
  const res = await fetch(`${BASE}${path}`, {
    method: "POST",
    headers: HEADERS,
    body: JSON.stringify(body),
  });
  if (!res.ok) {
    throw new Error(`grounder ${res.status}: ${await res.text()}`);
  }
  return res.json();
}

// 1. find candidate sources
const hits = await post("/v1/search", { query: "what is a grounding api" });
console.log(`${(hits.results ?? []).length} candidate sources`);

// 2. get a token-capped, cited evidence pack
const pack = await post("/v1/deep_search", {
  query: "what is a grounding api",
  max_tokens: 600,
});
for (const p of pack.passages) {
  console.log(`[${p.score}] ${p.url}\n${p.text}\n`);
}

Over MCP, the same tools (web_search, fetch, deep_search, research) register in any MCP client, so an agent grounds itself with no HTTP glue. Full parameters are in the docs.

Which grounding API to pick, and when to use Grounder

Grounder is the right pick when you want the grounding layer decoupled from the model - to ground a local or open-weights model that has no built-in search, to keep the same grounding across several models, to cap exactly how much context each answer spends, and to keep query text out of a vendor's logs - on a predictable flat bill. It is the wrong pick when your workload is bot-walled pages (use Tavily), when you need semantic recall (use Exa), or when your grounding is tiny and occasional (raw search costs less per call).

The context-fit is the axis most grounding APIs leave to you. A search API hands back results at any length; a scraper hands back a whole page; native grounding manages it inside the model. Grounder caps the whole response to your window with max_tokens. We measured what that is worth: a token-capped pack took a local 7B model from 3/8 to 7/8 correct with zero overflows.

Try a token-capped grounding API

Grounder returns a cited evidence pack sized to your context window, over MCP or REST, on a flat monthly bill. Free tier: 1,500 pages a month, email only, no card.

Get a free key

Related guides

FAQ

What is a grounding API?

A service that connects an LLM to live, verifiable sources at inference time. It searches the web, fetches and cleans pages, ranks the passages that answer the query, and returns them as a cited pack the model reads before it writes - so the model answers from evidence, not memory, and every claim points to a URL.

What is the difference between grounding and RAG?

RAG is the general retrieve-then-generate pattern. Plain RAG usually retrieves from a private, pre-built index (your documents in a vector store). Web grounding is RAG whose corpus is the live web: it searches, fetches, and ranks fresh pages on demand instead of using an index you built ahead of time. Many systems use both.

How does a grounding API reduce hallucinations?

It puts the actual source text in front of the model at generation time and returns citations, so the model paraphrases evidence instead of inventing from frozen weights, and you can check every claim against a URL. It does not make hallucination impossible - a model can still misread a passage - but it replaces "trust the weights" with "here is the page."

What are the popular grounding APIs?

Provider-native grounding (Google's Grounding with Google Search / Vertex AI, and built-in model web-search tools); search APIs for LLMs (Tavily, Exa, Linkup); scrapers (Firecrawl); grounded-RAG platforms (Vectara); raw search you wire yourself (Brave, Serper, self-hosted SearXNG); and Grounder, a token-capped cited pack over MCP and REST. Verify current features and pricing on each vendor's docs.

Do I need a grounding API if my model has web search built in?

Not always. If you call one hosted model and its native search covers you, that is simplest. A standalone grounding API is worth it to keep retrieval independent of the model - to ground a local or open-weights model with no built-in search, to control which pages are read and how much context they spend, to reuse one grounding across models, or to avoid logging every query with a provider.

Does a grounding API store my queries?

It depends on the vendor - check each policy. As a concrete example, Grounder stores per-key billing counters and the domain on retrieval events, never the query text, the path, or who asked; a page it cannot read returns 422 fetch_failed and is not charged. Provider-native grounding routes your query through that provider, so verify what they retain.

Methodology: hard-page numbers from bench/hardweb.py, passage numbers from a 37-page rerank corpus, both run 2026-07-22. Every non-Grounder vendor is described by category; verify their current features and pricing on their own documentation. Grounder is a young product reselling a discovery vendor, with near-zero distribution next to Tavily's ecosystem - that gap is real and is the honest cost of picking it today. Last updated July 2026 - see the docs for current parameters.