Moving off Google Search grounding to cut cost
Google Search grounding is the best retrieval available and priced accordingly — $14 per 1,000 search queries on Gemini 3.x, $35 on 2.5 models, with one prompt able to trigger several billed queries.
Grounding with Google Search costs $14 per 1,000 queries on Gemini 3.x, and $35 on Gemini 2.5.
Why teams are moving
- Per-query billing on top of tokens compounds quickly for agents that make several retrieval calls per turn.
- Grounding only works inside Gemini, so retrieval and model choice are coupled.
- You cannot filter, sort or deduplicate — the model decides what to search and what to use.
The migration
Get a key
10,000 free requests a month, no card.
Make retrieval explicit
Replace the built-in tool with your own retrieval step: call /search or /assemble_context, then pass the result into the model. More code, and the retrieval becomes inspectable, cacheable and testable.
Add the filters you could not have before
Restrict by content type, require corroboration by several independent hosts, sort by graph centrality, collapse syndicated stories. None of this is expressible through a grounding tool.
Measure the difference
Run both against the same questions. Where Google’s index wins, it will win clearly — and you will know exactly where, rather than paying $14 per 1,000 across the board for it.
# Before — Grounding with Google Search
# After — unlob
curl -H "x-api-key: $UNLOB_API_KEY" \
"https://api.unlob.com/search?q=your+query&limit=10&collapse=story"Parameter mapping
Most of this is renaming. The entries marked with a dash are the ones that need a different approach rather than a different name.
| Grounding with Google Search | unlob | Note |
|---|---|---|
google_search tool | GET /search | An explicit call rather than a tool the model invokes on its own. |
Automatic query generation | Your query | You control the query, so you can log it, cache it and test it. |
groundingMetadata citations | The result set itself | Every hit carries url, host, published_at and trust signals. |
— | assemble_context | The closest equivalent: a packed context set with a reason attached to each passage. |
Per-query billing on top of tokens | One request | No token component and no multiplier per prompt. |
What you will lose
A migration guide that claims a clean swap is not a migration guide. These are the things that genuinely do not map.
- Google’s index is far larger and fresher on breaking consumer topics.
- You now own the retrieval step, which is more code to write and maintain.
- No automatic query generation — your agent has to decide what to search for, which is usually an improvement but is work.
What it costs after
Grounding with Google Search
$14
per 1,000 queries
unlob
$0.40
per 1,000 queries
Difference
35×
cheaper per query
Frequently asked questions
How much does Google Search grounding actually cost?
$14 per 1,000 search queries on Gemini 3.x after 5,000 free prompts a month, and $35 per 1,000 on Gemini 2.5 models after 1,500 free requests a day. Note that one prompt can trigger multiple billed queries, so effective cost is usually above the headline rate.
Will result quality drop?
On broad consumer queries, probably — Google’s index is larger and fresher, and we would rather say so. On domain-specific retrieval where filtering, corroboration and deduplication matter, controlled retrieval frequently produces better context than an ungoverned grounding tool.
Port it on the free tier first
10,000 requests a month, no card. Enough to run both APIs side by side against your own queries before you change anything in production.