Short answer: Google's Custom Search JSON API is closed to new customers, and everyone already using it has until January 1, 2027 to move off. Google points people who search a few of their own sites to Vertex AI Search, and tells everyone who needs the whole web to "contact us." If you used Custom Search the way most developers did, as a cheap "give me web results as JSON" API, your replacement is an independent search API or a SERP API. On published rates those cost between $0.80 and $5 per 1,000 queries, and some have a free tier that beats Google's 100 a day.
| What you get back | Price per 1,000 queries | Free tier | Pick it if you | |
|---|---|---|---|---|
| Google Custom Search JSON API | Google results through a Programmable Search Engine | $5 after 100 free a day, capped at 10,000 a day | 100 a day | already have a key and only need until January 1, 2027 |
| Vertex AI Search | Results from your own sites (up to 50 domains) | Usage-based, Google Cloud pricing | Google Cloud credit | want search over sites you own |
| browserfoundry | Ranked web results as JSON: snippets, scores, dates | $0.80–$2.40 (fast); unlimited slow search on paid plans | 1,250 credits a month, no card | want web search for an app or an agent, plus extraction and browsers on the same key |
| Brave Search API | Results from Brave's own index | $5 | $5 of credit a month (card required) | want an independent index with broad coverage |
| Serper | Google's results as JSON | about $0.30–$1.00 (prepaid) | 2,500 queries, once | need Google's exact ranking, cheaply |
| SerpApi | Google plus 80+ other engines, every SERP feature parsed | about $9–$25 | 250 searches a month | need ads, shopping, maps and the rest of the results page |
Prices are each provider's published list rates in October 2026; sources are at the end.
The two-sentence history of a beloved API
For about fifteen years, Custom Search was the closest thing the internet had to an official "search Google from code" button. You made a Programmable Search Engine, told it to search the whole web, got a key, and suddenly your side project had Google results for $5 per 1,000 queries. Then Google closed the doors and set a date.
What exactly is shutting down?
The Custom Search JSON API, the REST endpoint at googleapis.com/customsearch/v1. Google's overview page says, without much ceremony:
"The Custom Search JSON API is closed to new customers... Existing Custom Search JSON API customers have until January 1, 2027 to transition to an alternative solution."
Until that date, existing projects keep the old terms: 100 queries a day free, then $5 per 1,000, up to 10,000 queries a day.
Three things are easy to mix up here:
- The Programmable Search Element (the embeddable search box with Google's own results page) is not part of the shutdown. Google's January 2026 announcement calls it the right tool for a search box on your own site covering up to 50 domains.
- The Site Restricted JSON API gets its own migration guide, to Vertex AI Search.
- "Search the entire web" is gone for new engines. Since January 20, 2026, new Programmable Search Engines must list the sites they search, up to 50 domains.
Gotcha. Google gives a date but no time of day, and says nothing about what requests return afterwards. Don't plan a midnight cutover on December 31. Finish weeks early.
Who is affected?
Anyone whose code calls the JSON API. In practice, three kinds of project:
- Apps and agents using it as a web search API. This is most people, and they need a new provider, because nothing from Google replaces "send a query, get web results."
- Site search behind a custom UI. Vertex AI Search is Google's intended answer.
- Rank trackers, SEO tools and research scripts that need Google's exact ordering. These want a SERP API.
If all you do is embed Google's search box widget on your site, you can stop reading and go have a coffee.
Is Vertex AI Search a drop-in replacement?
No, and this is where most migrations go wrong. Vertex AI Search builds an index of the domains you give it and answers from that index. It is excellent at searching your own docs, help center or store. It does not return the open web, and it is a different integration entirely: a Google Cloud project, a data store, a search app, service accounts, new response shapes.
Google is clear about it: Vertex is "a favorable alternative for searching up to 50 domains." If your code searches the web, Vertex is the wrong door.
Your real options
Option 1: an independent search API (most apps and agents)
These run their own index or retrieval network and return results as JSON. The results won't match Google position for position, and for an app or agent that rarely matters. What matters is relevant, fresh results with snippets your code or your model can use.
browserfoundry has several search endpoints behind one key:
/api/v2/search/fast: fresh multi-engine results in about a second, up to 50 per call. 1 credit per query (half that on paid plans during the v2 beta), which is about $0.80 to $2.40 per 1,000 at full price depending on plan./api/v2/keiro: queries against browserfoundry's own web index, answered in 100 ms to 1 s when the query is already indexed./api/v2/search/slow: free and unlimited for paying customers under a fair-use policy, for bulk and background jobs that can wait.
The free plan gives 1,250 credits a month with no card. The same key also covers page extraction and cloud browsers.
Brave Search API charges $5 per 1,000 requests from its own index, with $5 of free credit each month (about 1,000 searches). It needs a card, and the credit requires attribution.
Option 2: a SERP API (when you need Google's exact results)
These fetch Google's results page and return it as JSON, so you keep Google's ranking:
- Serper sells prepaid packs from $50, working out at about $1 per 1,000 down to $0.30 at its largest pack. Credits expire six months after purchase.
- SerpApi covers 80+ engines and parses every SERP feature: ads, shopping, maps, knowledge panels. It runs from $25 a month for 1,000 searches to about $9 per 1,000 on larger plans, with hourly throughput caps.
- browserfoundry also has a Google SERP endpoint, which returns Google's results with country and language targeting on the same key as everything else. See the docs for parameters and pricing.
A 20-second decision guide
| If you... | Use |
|---|---|
| feed results to an LLM agent | an independent search API |
| show search results inside your app | an independent search API |
| track rankings or need Google's exact order | a SERP API |
| need ads, shopping or map packs | SerpApi |
| search only your own sites | the Programmable Search Element, or Vertex AI Search |
What does switching cost?
At 1,000 queries a day (about 30,000 a month), on published list rates:
| Provider | Monthly cost | The math |
|---|---|---|
| Google Custom Search, while it lasts | about $135 | 27,000 billable after 3,000 free, × $5 per 1,000 |
| browserfoundry fast search | $50 | the Pro plan's 37,500 credits cover 30,000 queries |
| browserfoundry slow search | $30 | unlimited on any paid plan, if your queries can wait |
| Brave Search API | about $145 | $150 less the $5 monthly credit |
| Serper | about $30 of usage | from a $50 prepaid pack |
| SerpApi | $275 | its 30,000-search plan |
The cheapest answer depends on whether your code needs results right now, and whether it needs Google's exact ordering.
Migrating the code
A typical Custom Search call in Python:
import requests
r = requests.get(
"https://www.googleapis.com/customsearch/v1",
params={"key": API_KEY, "cx": ENGINE_ID, "q": "open source llm benchmarks", "num": 10},
timeout=30,
)
for item in r.json().get("items", []):
print(item["title"], item["link"], item["snippet"])
The same search on browserfoundry:
import os, requests
r = requests.post(
"https://api.keirolabs.cloud/api/v2/search/fast",
headers={"Authorization": f"Bearer {os.environ['KEIRO_API_KEY']}"},
json={"query": "open source llm benchmarks", "maxResults": 10},
timeout=30,
)
r.raise_for_status()
for result in r.json()["results"]:
print(result["title"], result["url"], result["snippet"])
In Node:
const r = await fetch("https://api.keirolabs.cloud/api/v2/search/fast", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.KEIRO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ query: "open source llm benchmarks", maxResults: 10 }),
});
if (!r.ok) throw new Error(`search failed: ${r.status}`);
const { results } = await r.json();
A drop-in shim, so the rest of your code doesn't notice
If Custom Search's response shape is spread through your codebase, wrap the new call so it returns the old one:
def custom_search(q, num=10):
"""Old Custom Search shape, new provider underneath."""
r = requests.post(
"https://api.keirolabs.cloud/api/v2/search/fast",
headers={"Authorization": f"Bearer {os.environ['KEIRO_API_KEY']}"},
json={"query": q, "maxResults": num},
timeout=30,
)
r.raise_for_status()
data = r.json()
return {
"items": [{"title": x["title"], "link": x["url"], "snippet": x.get("snippet", "")} for x in data["results"]],
"searchInformation": {"totalResults": str(data.get("total_results", len(data["results"])))},
}
Field mapping
| Custom Search JSON API | browserfoundry /search/fast |
Notes |
|---|---|---|
key + cx query parameters |
Authorization: Bearer header |
one key, no engine ID |
q |
query |
up to 500 characters |
num (max 10 per page) |
maxResults |
up to 50 in one call |
start (paging, 100 results max) |
not needed | ask for what you need in one request |
items[] |
results[] |
|
items[].title |
results[].title |
|
items[].link |
results[].url |
|
items[].snippet |
results[].snippet |
|
| none | results[].score |
relevance, 0 to 1 |
| none | results[].published_date |
when the page was published |
searchInformation.totalResults |
total_results |
The migration checklist
- Find every call site. Search the codebase for
customsearch, and list every Google Cloud project with the API enabled. - Measure real volume. If you pooled several engine IDs to get past the 10,000-a-day cap (a popular trick), your true volume is higher than any one key shows. Size the new plan for that.
- Decide what you actually need: web results, Google's exact order, or your own sites.
- Run both side by side on a sample of real queries, and check the results your product depends on, not just the top three.
- Add retries and timeouts. Every API fails sometimes; Custom Search's quota errors trained many codebases to swallow failures silently.
- Cut over well before January 1, 2027, and delete the old key so nothing falls back to it.
Bing went first
Microsoft retired the Bing Search APIs on August 11, 2025, and pointed developers at "Grounding with Bing Search" inside Azure AI Agents, an LLM feature rather than a results API. With Custom Search closing, neither major search engine now sells a first-party web results API. That is the gap independent search APIs exist to fill.
If you're building an agent, the other half of the decision is whether to let the model search by itself: see what web search costs inside the OpenAI, Claude, Gemini and Perplexity APIs. And if your fallback plan was "we'll just scrape DuckDuckGo," read why that breaks first.
How we put this together
Every date and price comes from the provider's own pages as published in October 2026: Google's Custom Search JSON API overview and Vertex AI Search migration guide, Microsoft's Bing Search API retirement notice, Brave Search API, Serper, SerpApi pricing, and browserfoundry's pricing and API docs. Monthly costs are arithmetic on those list prices, without discounts. Prices change, so check the live pages before committing; we update this post when they move.
FAQ
Is the Google Custom Search JSON API discontinued?
Yes. Google's overview page says the Custom Search JSON API is closed to new customers, and that existing customers have until January 1, 2027 to move to an alternative.
Can I still get a Custom Search API key?
Not as a new customer. Only projects that already use the API can keep calling it, at 100 free queries a day and $5 per 1,000 after that, up to 10,000 queries a day, until the shutdown.
Is Vertex AI Search a drop-in replacement?
No. Google suggests it for searching up to 50 of your own domains. It indexes those sites and returns results from them; it is not an API for general Google web results.
What is the cheapest alternative for full web search?
On published rates, independent search APIs and pay-as-you-go SERP APIs land between roughly $0.25 and $5 per 1,000 queries, against $5 per 1,000 on Custom Search. browserfoundry's lite search is $0.25 per 1,000 on paid plans, and Serper starts around $1 per 1,000.
Does the embedded Programmable Search Element still work?
Google's January 2026 announcement says the Search Element remains the recommended option for a search box on your own site with up to 50 domains. The JSON API behind custom UIs is what is going away.