Vertex AI grounding with your search API
Live web at $1 per 1,000.
Grounding with Google Search on Vertex AI, now Gemini Enterprise Agent Platform, costs $14 per 1,000 grounding queries past 5,000 free a month. Grounding with your search API takes any endpoint that answers Google's SIMPLE_SEARCH schema.
SpecStream answers that schema at https://api.specstream.ai/vertex/search. Set it as the endpoint of externalApi and your SpecStream key as apiKeyString. Gemini grounds in the live web at $1 per 1,000 searches, with no gateway to deploy.
SpecStream is the live web data engine for teams and agents. Its Search API scores 97.9 F-score on all 1,000 SimpleQA Verified questions. A new account gets $10 of credit, no card, which covers 10,000 searches.
New accounts get $10 of credit, no card. It covers 10,000 searches.
Web grounding sources for Gemini on Vertex AI, from each company's own pages on Nov 12, 2026
| SpecStream | Grounding with Google Search | Web Grounding for Enterprise | Grounding with Parallel | Grounding with Exa | |
|---|---|---|---|---|---|
| Price per 1,000 | $1 per 1,000 searches of up to 10 results | $14 per 1,000 grounding queries on Gemini 3 and Gemini 4. $35 per 1,000 grounding prompts on Gemini 2.0 and 2.5 | $14 per 1,000 grounding queries, on the same price line as Google Search | From $1 per 1,000 requests on Parallel's Search API | $7 per 1,000 auto searches on Exa's API |
| Free to start | $10 of credit, no card, which covers 10,000 searches | 5,000 grounding queries a month | 5,000 grounding queries a month, counted with Google Search | Up to $80 at sign up and $5 a month on Parallel's own plans | $10 in credits on sign up, up to 2,500 Lite searches |
| Who bills you | SpecStream, from a prepaid balance that never expires | Google, on your Cloud bill | Google, on your Cloud bill | Google Cloud Marketplace, or Parallel on your own Parallel key | Exa, on your own Exa key |
| How you connect | externalApi with api_spec SIMPLE_SEARCH, https://api.specstream.ai/vertex/search as endpoint and your key as apiKeyString | A grounding tool built into the Gemini request | A grounding tool built into the Gemini request | Subscribe on Google Cloud Marketplace, or bring your own Parallel API key | Get an API key from Exa's site and put it in the request |
| What answers the search | The whole live web, read at the moment of the call. 97.9 F-score on all 1,000 SimpleQA Verified questions, 978 correct | Google's web index | A web index for highly regulated industries, with compliance controls | Parallel's search API over billions of web pages | Exa's search API |
| When a search is billed | Each search. A call stopped by a 429 is not charged | Only when a grounding prompt returns at least one source URL | Only when a grounding prompt returns at least one source URL | Per request on Parallel's price list | Per request. The base price covers the first 10 results |
Why Vertex AI users ground Gemini with SpecStream
One tool block, and nothing to deploy
Google's guide to grounding with your search API has you build an endpoint and put it behind API Gateway. SpecStream is that endpoint already, for the whole live web. Add one retrieval tool to the request and keep the rest of your code.
# pip install --upgrade google-genai
# export GOOGLE_CLOUD_PROJECT=your-project GOOGLE_CLOUD_LOCATION=global GOOGLE_GENAI_USE_ENTERPRISE=True
import os
from google import genai
from google.genai.types import ExternalApi, GenerateContentConfig, HttpOptions, Retrieval, Tool
client = genai.Client(http_options=HttpOptions(api_version="v1"))
specstream = Tool(
retrieval=Retrieval(
external_api=ExternalApi(
api_spec="SIMPLE_SEARCH",
endpoint="https://api.specstream.ai/vertex/search",
api_auth={"apiKeyConfig": {"apiKeyString": os.environ["SPECSTREAM_API_KEY"]}},
)
)
)
response = client.models.generate_content(
model="gemini-2.5-flash",
contents="Who won the most recent Formula 1 race?",
config=GenerateContentConfig(tools=[specstream]),
)
print(response.text)The same tool in a REST request to generateContent:
{
"contents": [{"role": "user", "parts": [{"text": "Who won the most recent Formula 1 race?"}]}],
"tools": [{
"retrieval": {
"externalApi": {
"api_spec": "SIMPLE_SEARCH",
"endpoint": "https://api.specstream.ai/vertex/search",
"apiAuth": {"apiKeyConfig": {"apiKeyString": "YOUR_SPECSTREAM_KEY"}}
}
}
}]
}The call Gemini sends, and what comes back
Gemini sends POST with the JSON body {"query": "..."} and adds your key to the address as ?key=. SpecStream answers with the JSON array Google's schema asks for: one object per result, each with snippet and uri, and an empty array when nothing matches. Each call returns up to 10 results. Errors come back in Google's error form.
# The call Gemini sends: the query in the body, your key as key= in the address
curl "https://api.specstream.ai/vertex/search?key=$SPECSTREAM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "who won the most recent Formula 1 race"}'
# [{"snippet": "...", "uri": "https://..."}, ...]$1 per 1,000 searches, on every Gemini model
Each search Gemini makes through this endpoint costs $0.001. Grounding with Google Search costs $14 per 1,000 grounding queries on Gemini 3 and Gemini 4 past 5,000 free a month, and $35 per 1,000 grounding prompts on Gemini 2.0 and 2.5. SpecStream bills from a prepaid balance that never expires, and a new account starts with $10 of credit.
The most accurate web search API in the world
On SimpleQA Verified the SpecStream Search API scores 97.9 F-score on all 1,000 official questions, 978 of them correct. On WideSearch it scores 64.0 item F1 and 43.4 row F1 on all 200 official tasks. The Extract API scores 0.908 F1 on WCXB. Every score and its method is on the benchmarks page.
Use it beside Google Search or your own data
A generation request takes up to 10 grounding sources. Keep Grounding with Google Search, Vertex AI Search or Elasticsearch where they serve you, and add SpecStream as one more retrieval tool for the live web.
You decide what is kept, on each key
Give Gemini a key with zero_retention and a search made with it keeps no request text and no answer after the reply. It is not in the history and its log lines carry neither. The charge keeps the account, the key, the request ID, the price and the time. spend_cap_cents is the most the key can spend.
curl -X POST https://api.specstream.ai/v1/account/keys \
-H "Authorization: Bearer $SPECSTREAM_API_KEY" -H "Content-Type: application/json" \
-d '{"name": "vertex-grounding", "scopes": ["account:read", "finds:spend"], "spend_cap_cents": 500000, "zero_retention": true}'Search, pages and rows on one key
The same key reads up to 20 pages or documents a call with the Extract API at $0.80 per 1,000 pages, and a page with no text is not charged. Deep Search takes a request in plain words and returns every match on the live web as structured rows, at 5¢, 15¢ or $1 a row, with a source URL on every value.
The other web grounding sources on Vertex AI, and what each costs
Grounding with Google Search
Google's own index, built into Gemini. $14 per 1,000 grounding queries on Gemini 3 and Gemini 4 after 5,000 free a month, billed only when a prompt returns a source. SpecStream grounds the same models at $1 per 1,000 searches. More on the Grounding with Google Search alternative page.
Web Grounding for Enterprise
A web index Google offers to highly regulated industries, with compliance controls, on the same $14 per 1,000 price line as Google Search. SpecStream keeps nothing from a search made with a zero_retention key and costs $1 per 1,000.
Grounding with Parallel
Parallel's search API, sold on Google Cloud Marketplace or on your own Parallel key, from $1 per 1,000 requests. SpecStream costs $1 per 1,000 searches through any project that can call an endpoint, and scores 97.9 F-score on SimpleQA Verified.
Grounding with Exa
Exa's search API on your own Exa key, at $7 per 1,000 auto searches. SpecStream costs $1 per 1,000 searches and reads the live web at the moment of the call.
How SpecStream scores
The same numbers as the benchmarks page, from the official tasks and scorers.
How to ground Gemini on Vertex AI with SpecStream
1. Create a key under Agents & API in the SpecStream workspace. A new account gets $10 of credit, no card, which covers 10,000 searches. Turn on zero_retention on the key if your searches must leave no trace.
2. Check the key from a terminal with the call Gemini sends. A 200 with a JSON array of snippet and uri means Gemini will get the same.
curl "https://api.specstream.ai/vertex/search?key=$SPECSTREAM_API_KEY" -H "Content-Type: application/json" -d '{"query": "test"}'3. In your Gemini request, add a retrieval tool with externalApi: api_spec set to SIMPLE_SEARCH, endpoint set to the address below, and your key in apiAuth.apiKeyConfig.apiKeyString.
https://api.specstream.ai/vertex/search4. Send a question about something that happened today. The answer's groundingMetadata lists the uri of each result Gemini used.
5. Each search shows up in your SpecStream request log with its price.
Frequently asked questions
Something we didn't answer? Talk to a human
How do I ground Gemini on Vertex AI with my own search API?
retrieval tool with externalApi, api_spec SIMPLE_SEARCH, your endpoint and your key as apiKeyString. With https://api.specstream.ai/vertex/search as the endpoint, each search costs $0.001.How much does Grounding with Google Search cost on Vertex AI?
What must a search API return for Vertex AI grounding?
snippet and uri, and an empty array when nothing matches. Gemini sends POST with {"query": "..."} and the key as key= in the address. SpecStream answers in exactly that form.Do I need API Gateway or Cloud Run to use grounding with my search API?
key Gemini adds, so there is nothing to deploy.Can I use SpecStream and Google Search grounding together?
Which Gemini models support grounding with your search API?
Sources
SpecStream wrote this page. The setup comes from Google's grounding docs, and each provider's figure from that company's own page.
- Google Cloud, Grounding with your search APIdocs.cloud.google.com/vertex-ai/generative-ai/docs/grounding/grounding-with-your-search-api, read Nov 12, 2026
- Google Cloud, Grounding overviewdocs.cloud.google.com/vertex-ai/generative-ai/docs/grounding/overview, read Nov 12, 2026
- Google Cloud, Agent Platform pricingcloud.google.com/vertex-ai/generative-ai/pricing, read Nov 12, 2026
- Google Cloud, Grounding with Parallel Web Searchdocs.cloud.google.com/vertex-ai/generative-ai/docs/grounding/grounding-with-parallel, read Nov 12, 2026
- Google Cloud, Grounding with Exa web searchdocs.cloud.google.com/vertex-ai/generative-ai/docs/grounding/grounding-with-exa, read Nov 12, 2026
- Parallel pricingparallel.ai/pricing, read Nov 12, 2026
- Exa pricingexa.ai/docs/admin/pricing, read Nov 12, 2026
- SpecStream benchmarksspecstream.ai/benchmarks, read Nov 12, 2026
- SpecStream pricingspecstream.ai/pricing, read Nov 12, 2026
- SpecStream for agentsspecstream.ai/agents.md, read Nov 12, 2026




