Published
Google Custom Search JSON API Shutdown: Dates, Limits, and How to Migrate
Google's Custom Search JSON API, the official way to get Google web results as JSON, is being shut down. Google's documentation now says the API "is closed to new customers," and that existing customers "have until January 1, 2027 to transition to an alternative solution."
If you have code that calls customsearch/v1, it will stop working at the start of 2027. This guide covers what Google says, what the API offered, and how to move to a replacement.
The key dates and limits
- New customers: no longer accepted. Google's notice doesn't say when the closure began.
- Existing customers: service is discontinued on January 1, 2027.
- Free tier: 100 queries per day.
- Paid tier: $5 per 1,000 queries, up to 10,000 queries per day.
- Results per request: 1 to 10, set with
num. - Results per query: at most 100. The API returns an error when
startplusnumgoes past 100.
What Google recommends instead
For searching your own sites, Google points to Vertex AI Search, which it describes as "a favorable alternative for searching up to 50 domains." That covers site search for a company's own properties. It does not cover searching the whole web.
For full web search, the notice asks customers to contact Google through a form. Google doesn't name a public, self-serve replacement for results from the whole web. Microsoft made a similar move in 2025 when it retired the Bing Search APIs.
What the Custom Search JSON API never gave you
The Custom Search JSON API returned results from a Programmable Search Engine you configured, as a list of titles, links, and snippets. Teams often used it as a substitute for Google results, but it was never the page a searcher sees on google.com. It didn't return AI Overviews, People also ask, local packs, shopping results, or the other SERP features that now take up much of a results page, and its rankings could differ from google.com.
When you migrate, decide what you actually need:
- Site search for your own domains: Vertex AI Search is the closest match.
- A list of relevant web pages for a query: any web search API will do, including independent indexes.
- What Google shows a searcher, with rankings and SERP features for a location and device: you need a SERP API.
Migrating to a SERP API
A SERP API returns the results page Google serves for a query, parsed into JSON. Most Custom Search parameters have a direct equivalent. This table maps them to the PrismCrawl Google Search API:
| Custom Search JSON API | PrismCrawl Google Search | Notes |
|---|---|---|
q | query | The search query |
key, cx | x-api-key header | No search engine ID needed |
gl | gl | Country |
hl | hl | Interface language |
lr | lr | Restrict results by language |
start | start | Result offset for the next page |
safe | safe | SafeSearch |
siteSearch | site: in the query | For example pricing site:example.com |
| (not available) | location | City or region targeting |
| (not available) | device | Desktop, tablet, or mobile |
And the response fields:
| Custom Search JSON API | PrismCrawl Google Search |
|---|---|
items[].title | data.content.results[].title |
items[].link | data.content.results[].url |
items[].snippet | data.content.results[].snippet |
items[].displayLink | data.content.results[].domain |
| (not available) | data.content.results[].rank and position |
| (not available) | data.content.serp_features |
A minimal Python migration looks like this:
import os
import requests
# Before: Custom Search JSON API
# requests.get("https://www.googleapis.com/customsearch/v1",
# params={"key": KEY, "cx": CX, "q": query, "gl": "us", "start": 1})
def search(query: str, start: int = 0) -> list[dict]:
response = requests.post(
"https://api.prismcrawl.com/v1/google/search",
headers={"x-api-key": os.environ["PRISMCRAWL_API_KEY"]},
json={"query": query, "gl": "us", "hl": "en", "start": start},
timeout=60,
)
response.raise_for_status()
results = response.json()["data"]["content"]["results"]
return [r for r in results if r["type"] == "organic"]
Two differences to watch:
- Offsets start at 0. Custom Search's
startwas 1-based. Google's ownstartoffset is 0-based, so the second page isstart: 10. - Results include more than organic links. Filter on
typeif your code expects only web results.
What it costs
Custom Search charged $5 per 1,000 queries after the free 100 per day, with a cap of 10,000 queries per day. PrismCrawl charges $0.30 to $0.15 per 1,000 successful requests, with a $5 minimum and no subscription. Our Custom Search API alternatives page, free SERP API comparison, and buyer's guide cover other providers if you want to compare.
A migration checklist
- Find every call to
googleapis.com/customsearch/v1in your code and scheduled jobs. - Decide which of the three needs above each call serves.
- Map parameters and response fields using the tables above.
- Adjust pagination for 0-based offsets.
- Run both APIs side by side on a sample of real queries and compare the results before switching.
- Remove the old API key and search engine ID from your configuration after the switch.
Don't leave this until December. Google hasn't said whether calls will fail with an error or return empty results after January 1, 2027, and a silent empty response is easy to miss.
Frequently asked questions
When does the Google Custom Search JSON API shut down?
Existing customers have until January 1, 2027 to move to another solution. The API is already closed to new customers.
What is Google's replacement for the Custom Search JSON API?
For searching up to 50 of your own domains, Google suggests Vertex AI Search. For search across the whole web, Google asks customers to contact it through a form. It doesn't name a public, self-serve replacement.
How much did the Custom Search JSON API cost?
It included 100 free queries per day. Additional queries cost $5 per 1,000, up to 10,000 queries per day.
Can a SERP API replace the Custom Search JSON API?
Yes, for most web search uses. A SERP API returns the results Google shows for a query, including organic results and SERP features, with location and device targeting. Most Custom Search parameters, such as q, gl, hl, lr, start, and safe, have direct equivalents.
Does the Custom Search JSON API return the same results as google.com?
Not necessarily. It returns results from a Programmable Search Engine configuration, as titles, links, and snippets, without SERP features such as AI Overviews or local packs. Its rankings can differ from what a searcher sees on google.com.