Skip to the page

Google Custom Search JSON API retires Jan 1, 2027: drop-in /customsearch/v1 migration and benchmark report

Tarek, Founder & CEO

Search API · · 6 min read

On January 1, 2027, 31 days from today, Google shuts down the Custom Search JSON API (googleapis.com/customsearch/v1) for all existing customers. The API is already closed to new sign-ups, and Google's own suggested alternative (Vertex AI Search) caps site-scoped indexes at 50 domains with no self-serve drop-in replacement for open web search.

In our November 20, 2026 audit of public GitHub repositories (specstream.ai/studies/google-custom-search-shutdown-2026), 25,280 public code files still reference googleapis.com/customsearch/v1, 18,464 files read GOOGLE_CSE_ID, and 8,368 files depend on LangChain's GoogleSearchAPIWrapper alone. Across the open-source ecosystem, 457 repositories with 50+ stars (and 145 repositories with 1,000+ stars, including OmniRoute, litellm, llama_index, LocalAI, discourse, LibreChat, and microsoft/semantic-kernel) still carry active Google CSE integrations.

SpecStream exposes a wire-compatible drop-in route at https://api.specstream.ai/customsearch/v1 (and /customsearch/v1/siterestrict). Moving an existing client requires changing two values: the base host and the API key. Every call runs at $1.00 per 1,000 searches (one-fifth of Google's $5.00 per 1,000 list price), removes Google's hard 10,000 queries per day cap, and runs on the web search engine ranked #1 across 15 public web-search and extraction benchmarks.

Ecosystem exposure before the January 1, 2027 cutoff

Language or pattern Public GitHub files (Nov 20, 2026)
Total files calling googleapis.com/customsearch/v1 25,280
Files reading GOOGLE_CSE_ID 18,464
Python 10,208
LangChain GoogleSearchAPIWrapper 8,368
Inline customsearch/v1?key= URLs 7,072
JavaScript 5,008
TypeScript 3,028
PHP 659
Java 550
C# 352
Go 342
Ruby 155

Every single one of these integrations stops receiving search results on January 1, 2027 unless migrated.

Side-by-side comparison: Google CSE vs SpecStream drop-in

Capability Google Custom Search JSON API SpecStream /customsearch/v1
Status Shuts down Jan 1, 2027 (closed to new users) Live production, EU-sovereign Frankfurt infrastructure
Price per 1,000 searches (10 results) $5.00 (after 100 free/day) $1.00 (fast drop-in tier; $5.00 on default answer tier)
Daily query cap Hard 10,000 queries/day ceiling No daily cap
Programmable Search Engine (cx) config Required in Google console Accepted and echoed; zero console config required
Median latency (production) ~0.5 to 1.2 s 0.82 s on fast drop-in route
Web and image search (searchType=image) Supported Supported (with imgSize, imgType, imgColorType, imgDominantColor)
Partial response fields selector Supported Supported (a,b/c,d(e,f) and * wildcard masking)
Zero retention and EU-only egress Not available per key Supported per API key (zero_retention, eu_egress_only)
Starting credit Closed to new accounts $2 free credit on sign-up (2,000 drop-in searches, no card)

Complete parameter and JSON schema parity

A drop-in route only saves engineering time if existing parsers, SDKs, and edge-case clients keep working without code rewrites. SpecStream's /customsearch/v1 implementation (GET /customsearch/v1 and GET /customsearch/v1/siterestrict) implements Google's full request and response contract:

  • Authentication: Accepts your SpecStream key in key=<key>, X-Goog-Api-Key, or Authorization: Bearer <key>.
  • Pagination edge cases: Supports num (1 to 10, default 10) and start (up to reach 100), including start=0 normalized to page 1 (which microsoft/semantic-kernel sends by default). Emits queries.request, queries.nextPage, and queries.previousPage plus searchInformation.totalResults.
  • Query shaping operators: Translates siteSearch, siteSearchFilter (i / e), exactTerms, excludeTerms, orTerms, hq, fileType, dateRestrict (d[N], w[N], m[N], y[N]), lowRange, and highRange directly into native search operators.
  • Locale, safety, and sorting: Maps lr, hl, cr, gl, safe, and sort=date (newest dated results first).
  • Image search (searchType=image): Returns items[].link (image URL), image.contextLink (hosting page), width, height, thumbnailLink, thumbnailWidth, thumbnailHeight, and mime, enforcing imgSize, imgType, imgColorType, and imgDominantColor.
  • Response shape and pagemap: Returns kind: "customsearch#search", url.template, context, spelling (correctedQuery, htmlCorrectedQuery), and items[] with kind: "customsearch#result", title, htmlTitle, link, displayLink, snippet, htmlSnippet, formattedUrl, htmlFormattedUrl, mime, fileFormat, and pagemap (metatags and cse_image, required by strict parsers such as trpc-agent-go).
  • Google fields partial response masking and prettyPrint: Full tree-selector masking (used automatically by google-api-python-client and LangChain).
  • Canonical error codes: Maps HTTP statuses (400, 401, 402, 403, 429, 500, 503, 504) to Google's google.rpc.Code JSON error envelope (INVALID_ARGUMENT, UNAUTHENTICATED, FAILED_PRECONDITION, PERMISSION_DENIED, RESOURCE_EXHAUSTED), returning Retry-After on 429 with zero charge.
  • Retired no-op parameters: Accepts cx, linkSite, relatedSite, rights, filter, c2coff, and googlehost without error so legacy callers never break.

One-line migration examples

cURL

# Before (retires January 1, 2027)
curl -G "https://www.googleapis.com/customsearch/v1" \
  --data-urlencode "key=$GOOGLE_API_KEY" \
  --data-urlencode "cx=$GOOGLE_CSE_ID" \
  --data-urlencode "q=EU DORA subprocessor reporting rules"

# After (SpecStream drop-in, $1 per 1,000 searches)
curl -G "https://api.specstream.ai/customsearch/v1" \
  --data-urlencode "key=$SPECSTREAM_API_KEY" \
  --data-urlencode "q=EU DORA subprocessor reporting rules"

Python (requests)

import os, requests

resp = requests.get(
    "https://api.specstream.ai/customsearch/v1",
    params={
        "key": os.environ["SPECSTREAM_API_KEY"],
        "q": "EU DORA subprocessor reporting rules",
        "num": 10,
        "dateRestrict": "m6",
    },
    timeout=15,
)
items = resp.json().get("items", [])
for row in items:
    print(row["title"], row["link"])

JavaScript / TypeScript (fetch)

const url = new URL("https://api.specstream.ai/customsearch/v1");
url.searchParams.set("q", "PostgreSQL 18 release notes");
url.searchParams.set("num", "10");

const res = await fetch(url, {
  headers: { "X-Goog-Api-Key": process.env.SPECSTREAM_API_KEY ?? "" },
});
const data = await res.json();
console.log(data.items.map((item: { title: string; link: string }) => [item.title, item.link]));

Open WebUI and agent frameworks

In Open WebUI or any client that takes a Google PSE base URL, replace https://www.googleapis.com/customsearch/v1 with https://api.specstream.ai/customsearch/v1 and set your SpecStream key. You can also inspect any request rewrite interactively using the free Google CSE Migrator or Drop-In API Converter.

Search accuracy behind the drop-in route

Switching away from Google CSE does not mean trading down on retrieval quality. SpecStream's search infrastructure runs on our own 6.76-billion-page EU-sovereign index in Frankfurt paired with live web retrieval, ranking #1 across 15 public web-search and extraction benchmarks from one frozen build (75054770ec):

Benchmark SpecStream Published competitors
AA-Omniscience (all 600 questions) 82.67% Keenable 73%, Exa 73%, Perplexity 72%
SurfBench v2 (80 tasks x 3 rounds) 84.6 perplexity-fast 80.4, exa-lite 79.3, exa 77.9, parallel 76.6
WideSearch (200 tasks x 4 trials, Avg@4 item F1) 57.32% (single-trial 64.0%) Exa 56.1%, Tavily 55.9%, Brave 54.8%, Perplexity 54.0%, Parallel 53.7%
SimpleQA Verified 99 Parallel 97, Perplexity 95, Tavily 92, Exa 91
FRAMES (all 824 multi-hop questions) 90.78% Tongyi DeepResearch 90.6%
Seal-0 (all 111 conflicting-source questions) 66.7% Linkup 61%, Parallel Ultra 8x 56.8%, Exa 45.0%
cloro FreshQA (all 358 single-call questions) 84.9% (tie #1) Brave 84.9%, Exa 83.0%, Parallel 82.7%, Tavily 81.8%
TRACE Extract v6 (all 2,527 live URLs) 88.51% Context.dev 87.0%, Jina Reader 86.8%, Exa Contents 85.0%

Need full page passages or a verified factual answer on the same key? Pass specstream_speed=default ($5 per 1,000 calls) or call GET /v1/web-search with passages=true or POST /v1/extract ($0.80 per 1,000 pages).

Cutover checklist before January 1, 2027

  1. Create a SpecStream API key at specstream.ai/workspace ($2 free credit, no card required, covering 2,000 drop-in searches).
  2. Point staging from https://www.googleapis.com/customsearch/v1 (or https://customsearch.googleapis.com/customsearch/v1) to https://api.specstream.ai/customsearch/v1.
  3. Run your existing integration test suite against the response JSON (items[], queries.nextPage, pagemap, searchInformation).
  4. For production volume above 100,000 searches per month or custom SLA / committed capacity packs, email tarek@specstream.ai or configure auto top-up in the workspace.
  5. Complete production cutover ahead of December 31, 2026 so your service has zero downtime when Google retires /customsearch/v1 on January 1, 2027.

Full benchmark traces are published at specstream.ai/benchmarks and Hugging Face.

More from the blog

Every post