Skip to the page

Google search API for AI agents

Keep the call, change the address.

An agent has three Google search APIs in 2026. Custom Search JSON is closed to new customers and ends on January 1, 2027. Vertex AI Search covers up to 50 domains, and Gemini grounding returns a model answer in place of results.

SpecStream answers Google's call. Point the agent at https://api.specstream.ai/customsearch/v1 with a SpecStream key in key=, or connect it to the MCP server at https://api.specstream.ai/mcp, and it searches the whole live web.

97.9 F-score on all 1,000 SimpleQA Verified questions and 64.0 item F1 on all 200 WideSearch tasks, the top published scores, on the benchmarks page. $5 per 1,000 searches.

New accounts get $10 of credit, no card. It covers 2,000 searches.

The Google search APIs an agent can call, next to SpecStream

SpecStreamCustom Search JSON APIVertex AI Search (Agent Search)Gemini grounding with Google Search
Open to a new agentYes. A key takes a minute and starts with $10 of credit, no cardNo. Closed to new customers. Existing customers have until January 1, 2027Yes, in a Google Cloud project, with 10,000 free queries per account a month on the trialYes, in the Gemini API, with 5,000 free search requests a month on Gemini 3 and newer
How the agent calls itGoogle's GET /customsearch/v1 at https://api.specstream.ai, GET /v1/web-search, or the search_web tool on the MCP serverGET /customsearch/v1 with a key and the cx of a Programmable Search EnginePOST to a serving config of an engine in your Google Cloud projectA tool inside a Gemini model request. The model decides which queries to run
What it searchesThe whole live web, read at the moment of the callThe Programmable Search Engine you configuredUp to 50 domains. For full web search Google asks you to contact itGoogle Search, through the queries the model runs
What comes backOn the Google route, Google's items[]. On /v1/web-search, the answer with the page it was read from and its read time, rows, every source read and, with passages=true, the text of the top pagesAn items array with the URL, title and text snippets of each resultSemantic retrieval on Standard. Enterprise adds generative answersA model response grounded in the search results, with search suggestions as HTML to render
Price per 1,000$5 for searches of up to 10 results$5 per 1,000 queries after 100 free a day, for existing customers$1.50 per 1,000 queries on Standard, $4.00 on Enterprise$14 per 1,000 search requests after the free 5,000
What one unit isOne call of up to 10 results, $0.005. Each started block of 10 more results adds $0.006One query, up to 10,000 a dayAny API call to Enterprise Search, direct or through an integration or the consoleEach search query the model decides to run, so one request can be several

Why agents search through SpecStream

The Google search APIs, one by one

How SpecStream scores

The same numbers as the benchmarks page, from the official tasks and scorers.

How to give your agent Google's call on SpecStream

1. Create a key under Agents & API in the workspace. A new account gets $10 of credit, no card, which covers 2,000 searches.

2. Set the base address of the agent's search tool to https://api.specstream.ai and put the SpecStream key in key=. q, num and start work as on Google, and cx is accepted and not used.

import requests

def google_search(query: str) -> list[dict]:
    reply = requests.get(
        "https://api.specstream.ai/customsearch/v1",  # was https://www.googleapis.com
        params={"key": SPECSTREAM_KEY, "q": query, "num": 10},
        timeout=30,
    ).json()
    return [{"title": i["title"], "url": i["link"], "snippet": i["snippet"]} for i in reply["items"]]
const reply = await fetch(
  `https://api.specstream.ai/customsearch/v1?key=${SPECSTREAM_KEY}&q=${encodeURIComponent(query)}&num=10`
).then((r) => r.json());
const results = reply.items.map((i) => ({ title: i.title, url: i.link, snippet: i.snippet }));

3. For an MCP client, add the server https://api.specstream.ai/mcp with OAuth or the API key. The search_web tool takes {"q": "<the question>"} and is billed as one search.

Frequently asked questions

Something we didn't answer? Talk to a human

Does Google have a search API for AI agents?
Three, each with a limit. Custom Search JSON is closed to new customers and ends on January 1, 2027, Vertex AI Search covers up to 50 domains, and Gemini grounding returns a model answer at $14 per 1,000 searches. SpecStream answers Google's Custom Search call on the whole live web at $5 per 1,000.
What is the best Google search API alternative for AI agents?
SpecStream, with 97.9 F-score on all 1,000 SimpleQA Verified questions and 64.0 item F1 on all 200 WideSearch tasks. It answers Google's GET /customsearch/v1 call in Google's JSON, at $5 per 1,000 searches, with a median of 0.82 s on production.
Is the Google Custom Search JSON API shutting down?
Yes, on January 1, 2027. Google's overview page says the API is closed to new customers and that existing customers have until that date to move.
How much does Gemini grounding with Google Search cost?
$14 per 1,000 search requests on Gemini 3 and newer, after 5,000 free a month, and each query the model decides to run is billed. A SpecStream search costs $5 per 1,000 with no token charge.
How much does Vertex AI Search cost?
$1.50 per 1,000 queries on Standard and $4.00 on Enterprise, with 10,000 free queries per account a month on the trial. Google names it for searching up to 50 domains.
Can my agent use SpecStream through MCP?
Yes. Connect to https://api.specstream.ai/mcp with OAuth or an API key, and the search_web tool runs a search at $5 per 1,000. The agent spends inside the limits you set on the key.

Sources

SpecStream wrote this page. Each Google figure comes from Google's own page.

  1. Google Custom Search JSON API overviewdevelopers.google.com/custom-search/v1/overview, read Nov 10, 2026
  2. Google Custom Search JSON API, using RESTdevelopers.google.com/custom-search/v1/using_rest, read Nov 10, 2026
  3. Agent Search pricing, Google Cloudcloud.google.com/generative-ai-app-builder/pricing, read Nov 10, 2026
  4. Agent Search REST reference, servingConfigs.searchcloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines.servingConfigs/search, read Nov 10, 2026
  5. Grounding with Google Search, Gemini APIai.google.dev/gemini-api/docs/google-search, read Nov 10, 2026
  6. SpecStream benchmarksspecstream.ai/benchmarks, read Nov 10, 2026
  7. SpecStream for agentsspecstream.ai/agents.md, read Nov 10, 2026