Skip to the page

Google Custom Search API shutdown 2027: migration guide

SpecStream

Search API · · 4 min read

Google ends the Custom Search JSON API on January 1, 2027, 36 days from November 26, 2026. Its overview page says the API "is not available for new customers" and that "Existing Custom Search JSON API customers have until January 1, 2027 to transition to an alternative solution." Every call to https://www.googleapis.com/customsearch/v1 stops working that day. The fastest move is SpecStream's drop-in address: change the host to https://api.specstream.ai and the key to a SpecStream key, and the same request returns the same items[] reply, at $1 per 1,000 searches against Google's $5 per 1,000.

SpecStream is the live web data engine. It is state of the art on the live web, setting a new bar in research, extraction and search. On WideSearch it outscores every search API at under a tenth of the cost, with 64.0 item F1 on all 200 tasks against 57.6 for Parallel and 56.1 for Exa. It scores 66.7 on Seal-0, where sources conflict, and 99 on SimpleQA Verified (benchmarks).

On November 20, 2026, GitHub code search counted 25,280 files that still call the Custom Search address, 10,208 of them in Python and 8,368 through LangChain's GoogleSearchAPIWrapper (the count). Paste your own call into the migrator and it writes the new code for you.

Google Custom Search and SpecStream, side by side

Google Custom Search JSON API SpecStream drop-in address
Address https://www.googleapis.com/customsearch/v1 https://api.specstream.ai/customsearch/v1
Status Ends January 1, 2027, closed to new customers Open to every account
Price $5 per 1,000 queries after 100 free a day $1 per 1,000 searches of up to 10 results
Daily cap 10,000 queries None
Reply items[].title, link, snippet, displayLink The same fields, plus specstream on each item
Parameters q, num, start, siteSearch, dateRestrict, gl, hl, lr, safe, sort, searchType, exactTerms, excludeTerms, fileType The same parameters, read the same way
cx engine ID Required Accepted and not needed
Sign-up Closed $10 of credit, no card

Python

Before, on Google:

import os
import requests

res = requests.get(
    "https://www.googleapis.com/customsearch/v1",
    params={
        "key": os.environ["GOOGLE_API_KEY"],
        "cx": os.environ["GOOGLE_CSE_ID"],
        "q": "open source vector databases",
        "num": 10,
        "siteSearch": "github.com",
    },
)
items = res.json().get("items", [])

After, on SpecStream. Two lines change: the host and the key.

import os
import requests

res = requests.get(
    "https://api.specstream.ai/customsearch/v1",
    params={
        "key": os.environ["SPECSTREAM_API_KEY"],
        "cx": os.environ["GOOGLE_CSE_ID"],
        "q": "open source vector databases",
        "num": 10,
        "siteSearch": "github.com",
    },
)
items = res.json().get("items", [])

JavaScript

const params = new URLSearchParams({
  key: process.env.SPECSTREAM_API_KEY,
  cx: process.env.GOOGLE_CSE_ID,
  q: "open source vector databases",
  num: "10",
  siteSearch: "github.com",
});
const res = await fetch(`https://api.specstream.ai/customsearch/v1?${params}`);
const { items = [] } = await res.json();

curl

curl -G https://api.specstream.ai/customsearch/v1 \
  -d key=$SPECSTREAM_API_KEY -d cx=$GOOGLE_CSE_ID \
  --data-urlencode "q=open source vector databases" \
  -d num=10 -d siteSearch=github.com

The native Search API, for new code

New code can call GET /v1/web-search directly. Add speed=fast for the $1 per 1,000 price, and write a site restriction as site: in the query.

import os
import requests

res = requests.get(
    "https://api.specstream.ai/v1/web-search",
    headers={"Authorization": f"Bearer {os.environ['SPECSTREAM_API_KEY']}"},
    params={"q": "site:github.com open source vector databases", "num": 10, "speed": "fast"},
)
for source in res.json()["data"]["sources"]:
    print(source["title"], source["url"], source["snippet"])
Google field SpecStream /v1/web-search
items[].title data.sources[].title
items[].link data.sources[].url
items[].snippet data.sources[].snippet
items[].displayLink data.sources[].site
start=11 page=2
siteSearch=github.com site:github.com in q

The native reply also carries answer for a question with one answer, the publish date of each source where the page states it, and passages=true for the text of each result. Reading the pages themselves runs through the Extract API at $0.80 per 1,000 pages.

  • LangChain GoogleSearchAPIWrapper and LlamaIndex GoogleSearchToolSpec build Google's address in code. Point them at the drop-in address, or swap the tool for SpecStream's.
  • LiteLLM reads the address from GOOGLE_PSE_API_BASE: set it to https://api.specstream.ai/customsearch/v1 (guide).
  • Open WebUI and GPT Researcher have step by step guides: Open WebUI, GPT Researcher.

The full list of open source apps that still call it is in 16 open source AI apps still call Google's Custom Search API, and every date and quote from Google is on the shutdown page.

Start

Get a key with $10 of credit, no card, then change the host. The migration guide covers every parameter, and the API docs cover the native Search API.

More from the blog

Every post