Google Custom Search API Alternative for the 2027 Shutdown
Google's Custom Search JSON API ends on January 1, 2027. SnoopScan returns web search results as JSON from one POST request. Each parameter is mapped below, with before and after code in curl, Python and JavaScript.
1,500 credits a month free, which is 750 searches at 2 credits each. No card.
What Is Changing and When
Read on Google's own pages on 23 Nov 2026.
- January 1, 2027: the API is discontinued. Google's Custom Search JSON API overview says its pricing applies to existing customers "until the service discontinuation on January 1, 2027."
- No new customers. The same page says "This API is not available for new customers." New projects cannot sign up for it.
- Whole-web engines end on the same date. Google's Programmable Search Engine blog, dated January 20, 2026, says existing engines "can continue to use the “Search the entire web” option until January 1, 2027." New engines are limited to a list of sites.
- What stays until then. Google's page lists 100 free queries a day, then $5 per 1,000 queries, up to 10,000 queries a day.
If your code calls customsearch.googleapis.com, it needs a new source of results before that date. If your Programmable Search Engine covers a fixed list of sites, search those sites with a site: query. If it covers the entire web, drop the engine ID.
Custom Search Parameters in SnoopScan
The cse.list parameters most code uses, next to their fields in the Search API (POST /v1/search) and in the Google SERP API (POST /v1/serp, the googleSerp tool on MCP). Use Search for links and snippets. Use the SERP API for Google's own ranking order or the AI Overview.
| Custom Search | What it does | Search | SERP | Notes |
|---|---|---|---|---|
q | The search text. | query | keyword | Copy it across as is. |
cx | The search engine ID, which holds the list of sites to search. | Not needed. Searches the web. | Not needed. | To limit a search to some sites, add site: to the query. See below. |
num | Results per request, 1 to 10. | limit, 1 to 50 | depth, 1 to 100 | Keep the same number, or raise it and make fewer calls. |
start | Index of the first result. Google caps start plus num at 100. | page, counting from 1 | None. Raise depth to read further down. | With num 10, start 11 is page 2: page = floor((start − 1) / num) + 1. |
gl | The end user's country, as a two-letter code. Google uses it to boost results from that country. | location.country, such as {"country": "US"} | country, such as us | The search is run from that country. |
lr | Restrict results to a language, such as lang_en. | language, such as en | language, such as en | Drop the lang_ prefix. |
siteSearch and siteSearchFilter | Include (i) or exclude (e) one site. | Add site:example.com or -site:example.com to query | The same, in keyword | An operator in the query, so check the results on your own searches. |
dateRestrict | Results from the last d[n] days, w[n] weeks, m[n] months or y[n] years. | freshness: hour, day, week, month or year | None. | Fixed windows only. d1 is day, w1 is week, m1 is month and y1 is year. A window such as d3 or m6 has no match. |
Searching Only Some Sites
SnoopScan has no saved engines, so there is no cx. Put the site restriction in the query:
{ "query": "site:docs.example.com OR site:blog.example.com pricing" }
Test a few of your own queries: results depend on what the search index holds for those sites.
Reading the Response
| Custom Search answer | SnoopScan search answer |
|---|---|
items[].link | data.results[].url |
items[].title | data.results[].title |
items[].snippet | data.results[].description |
items[].displayLink and formattedUrl | Not returned. Read the host from url. |
The order of items | data.results[].position |
queries.nextPage | Send the same request with page plus 1. |
searchInformation.totalResults | Not returned. |
spelling.correctedQuery | Not returned. autoCorrect: false stops the query being corrected. |
Not in the old answer | data.relatedSearches: the searches Google lists as related. |
Migration Code, Before and After
The same search: page 2 of ten results for "web scraping api", from the US, in English, from the last month.
Before: Google Custom Search JSON API
curl -G 'https://customsearch.googleapis.com/customsearch/v1' \ --data-urlencode 'key=GOOGLE_API_KEY' \ --data-urlencode 'cx=SEARCH_ENGINE_ID' \ --data-urlencode 'q=web scraping api' \ --data-urlencode 'num=10' \ --data-urlencode 'start=11' \ --data-urlencode 'gl=us' \ --data-urlencode 'lr=lang_en' \ --data-urlencode 'dateRestrict=m1'
import requestsr = requests.get( 'https://customsearch.googleapis.com/customsearch/v1', params={ 'key': 'GOOGLE_API_KEY', 'cx': 'SEARCH_ENGINE_ID', 'q': 'web scraping api', 'num': 10, 'start': 11, 'gl': 'us', 'lr': 'lang_en', 'dateRestrict': 'm1', },)for item in r.json().get('items', []): print(item['link'], item['title'], item['snippet'])
const params = new URLSearchParams({ key: 'GOOGLE_API_KEY', cx: 'SEARCH_ENGINE_ID', q: 'web scraping api', num: '10', start: '11', gl: 'us', lr: 'lang_en', dateRestrict: 'm1',});const r = await fetch(`https://customsearch.googleapis.com/customsearch/v1?${params}`);const { items = [] } = await r.json();for (const item of items) console.log(item.link, item.title, item.snippet);
After: SnoopScan Search
curl -X POST https://api.snoopscan.com/v1/search \ -H 'Authorization: Bearer sk_YOUR_KEY' \ -H 'Content-Type: application/json' \ -d '{ "query": "web scraping api", "limit": 10, "page": 2, "location": { "country": "US" }, "language": "en", "freshness": "month"}'
import requestsr = requests.post( 'https://api.snoopscan.com/v1/search', headers={'Authorization': 'Bearer sk_YOUR_KEY'}, json={ 'query': 'web scraping api', 'limit': 10, 'page': 2, 'location': {'country': 'US'}, 'language': 'en', 'freshness': 'month', },)for item in r.json()['data']['results']: print(item['url'], item['title'], item['description'])
const r = await fetch('https://api.snoopscan.com/v1/search', { method: 'POST', headers: { Authorization: 'Bearer sk_YOUR_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ query: 'web scraping api', limit: 10, page: 2, location: { country: 'US' }, language: 'en', freshness: 'month', }),});const { data } = await r.json();for (const item of data.results) console.log(item.url, item.title, item.description);
Keep the Old Code Reading items
If much of your code reads items, link and snippet, reshape the answer once at the edge.
# Same call, with the answer reshaped to the old items listcurl -s -X POST https://api.snoopscan.com/v1/search \ -H 'Authorization: Bearer sk_YOUR_KEY' \ -H 'Content-Type: application/json' \ -d '{"query": "web scraping api", "limit": 10}' \ | jq '{items: [.data.results[] | {link: .url, title: .title, snippet: .description}]}'
def to_cse_items(data): """Reshape a search answer into the items list the old code reads.""" return [ {'link': x['url'], 'title': x['title'], 'snippet': x['description']} for x in data['data']['results'] ]items = to_cse_items(r.json())
const toCseItems = ({ data }) => data.results.map((x) => ({ link: x.url, title: x.title, snippet: x.description }));const items = toCseItems(await r.json());
The Python and JavaScript clients make the same call.
Price Per 1,000 Searches
List prices from each vendor's own page, read on 23 Nov 2026. Prices change.
| Service | Per 1,000 | Terms |
|---|---|---|
| Google Custom Search JSON API | $5.00 | 100 free queries a day, then up to 10,000 a day. Closes to new customers now and ends on January 1, 2027. |
| Brave Search API | $5.00 | $5 in free credits every month. Prepaid credits, no subscription. |
| SpecStream | $5.00 | $1 per 1,000 on its fast tier. $10 of credit on sign-up. |
| Serper | $1.00 | Prepaid: 50,000 queries for $50. Down to $0.30 per 1,000 at 12.5 million queries. |
| Bright Data SERP API | $1.50 | Pay as you go. 5,000 free requests a month. |
| SnoopScan Search | $0.90 to $2.40 | 2 credits a search. The low figure is the Scale plan and the high figure is Starter. 1,500 free credits a month. A search that needs a paid source costs more. |
Our figures are the rate card and plan prices at full use of a month's credits. The Credits page explains what each call costs. A Google SERP API response carries a cost field with the charge. See Compare for side-by-side pages on other tools.
Use It From an AI Agent
The MCP server gives Claude, Cursor and other MCP clients a search tool and a googleSerp tool.
Use SnoopScan to search the web for web scraping api and list the top 10 results with their links.
Get a Key and Run the First Search
The free credits are enough to move a small project over before January 1.
FAQ
When does the Google Custom Search JSON API shut down?
Google's overview page says the API is discontinued on January 1, 2027, and that it is not available to new customers. Google's Programmable Search Engine blog says existing engines can keep the "Search the entire web" option until that date.
What replaces the cx parameter?
Nothing; there is no engine to configure. SnoopScan searches the web by default. To search one site or a few, put site:example.com in the query, joined with OR.
How do I search only my own website?
Add site:yourdomain.com to the query text, for example "site:example.com pricing". To leave a site out, use -site:example.com. This is what siteSearch with siteSearchFilter did.
Is the response the same as the Custom Search JSON API?
No. The results arrive under data.results with url, title, description and position, in place of items with link, title and snippet. The migration section has a short function that reshapes the answer into the old items list.
Is there a drop-in endpoint at /customsearch/v1?
No. It is a small edit to the request and to where the code reads results, a few lines in most code bases.
How many results can one request return?
Google allowed 10 a request and 100 in total for a query. A SnoopScan search returns up to 50 a request, and the page field moves through further pages.
Can I restrict results to the last 3 days or the last 6 months?
Not exactly. dateRestrict takes any number, such as d3 or m6. The freshness field takes hour, day, week, month or year, so use the nearest window.
What does a search cost?
On the rate card a search is 2 credits. That is $0.90 to $2.40 per 1,000 searches, depending on the plan. A search that needs a paid source costs more, and the Credits page explains the rates.
Can an AI agent use it through MCP?
Yes. The MCP server has a search tool for the web and a googleSerp tool for a Google results page, so an agent in Claude, Cursor or another MCP client can run the same searches without code.
Sources
- Custom Search JSON API overview, Google for Developers, read 23 Nov 2026.
- Method: cse.list, Google for Developers, read 23 Nov 2026.
- Updates to our Web Search Products and Programmable Search Engine Capabilities, Programmable Search Engine Blog, January 20, 2026.
- Brave Search API pricing, read 23 Nov 2026.
- SpecStream pricing, read 23 Nov 2026.
- Serper pricing, read 23 Nov 2026.
- Bright Data SERP API pricing, read 23 Nov 2026.