Skip to the page

Migrate from Google Custom Search

Keep the call, change the address.

Google discontinues the Custom Search JSON API on January 1, 2027, and it is already closed to new customers. This guide maps each parameter and each field of GET /customsearch/v1 to SpecStream.

The switch is one line: https://api.specstream.ai in place of https://www.googleapis.com, and a SpecStream key in key=. The path, the parameters and Google's JSON stay as they are.

SpecStream scores 97.9 F-score on all 1,000 SimpleQA Verified questions and 64.0 item F1 on all 200 WideSearch tasks. A call of up to 10 results costs $0.005, which is $5 per 1,000, with no daily limit.

New accounts get $10 of credit, no card. It covers 2,000 searches.

Custom Search JSON API to SpecStream, parameter by parameter and field by field

SpecStreamGoogle Custom Search JSON API
AddressGET https://api.specstream.ai/customsearch/v1GET https://www.googleapis.com/customsearch/v1. Closed to new customers, and discontinued on January 1, 2027
The keyA SpecStream key in key=, in the X-Goog-Api-Key header or as a Bearer tokenAn API key, and a Programmable Search Engine you configured
`q` and the query parametersq is searched as written. exactTerms, orTerms, siteSearch and hq are added to it as search operatorsq runs against the Programmable Search Engine you configured, which returns web and image results
`cx`Accepted and not used. The search covers the whole live web, and siteSearch keeps it to one siteThe ID of the Programmable Search Engine to use for the request
`num`1 to 10, and 10 when you send none. A value outside that range gets 400Integers between 1 and 10, inclusive
`start`From 1. queries.nextPage[0].startIndex gives the next page, and a page past the last one gets 400Never more than 100 results for a query: start plus num above 100 returns an error
`searchType`Refused with 400, because the route returns web results. Send the call without searchTypeWeb and image search results from a Programmable Search Engine
The replykind customsearch#search, url, queries with request, nextPage and previousPage, context, and searchInformation with searchTime, formattedSearchTime, totalResults and formattedTotalResultsMetadata about the search, metadata about the engine, and the results, in JSON that follows the OpenSearch 1.1 Specification
Each itemkind, title, htmlTitle, link, displayLink, snippet, htmlSnippet, formattedUrl and htmlFormattedUrl. Not returned: pagemap, cacheId, mime, fileFormat, labels and imageThe URL, title and text snippets that describe each result
ErrorsGoogle's error body: error.code, message, errors[] and status, such as UNAUTHENTICATED on 401. A 429 comes with Retry-After and charges nothingIts terms say you may be charged for each successful request
Price per 1,000 searches$5. A call of up to 10 results is one search at $0.005$5 per 1,000 queries after 100 free queries a day, for existing customers
Daily limitNone. Calls spend from your balance, inside the spending limit you set on the account or the key10,000 queries a day
More than 10 results a searchOn the same key, GET /v1/web-search returns up to 100 results for one search with num. num=100 costs $0.0591 to 10 results a call, and never more than 100 results for a query

The Custom Search reference, on SpecStream

What else Google offers Custom Search customers

How SpecStream scores

The same numbers as the benchmarks page, from the official tasks and scorers.

How to migrate, step by step

1. Create a key under Agents & API in the workspace. A new account gets $10 of credit, no card, which covers 2,000 searches.

2. Set the base address to https://api.specstream.ai where your code has https://www.googleapis.com or https://customsearch.googleapis.com, and send the SpecStream key in key=. In Python:

import requests

BASE = "https://api.specstream.ai"  # was https://www.googleapis.com

reply = requests.get(
    f"{BASE}/customsearch/v1",
    params={"key": SPECSTREAM_KEY, "cx": CX, "q": "open source vector databases", "num": 10},
    timeout=30,
)
reply.raise_for_status()
for item in reply.json().get("items", []):
    print(item["title"], item["link"], item["snippet"])

3. In JavaScript, with the key in the X-Goog-Api-Key header:

const params = new URLSearchParams({ q: "open source vector databases", num: "10" });
const res = await fetch(`https://api.specstream.ai/customsearch/v1?${params}`, {
  headers: { "X-Goog-Api-Key": process.env.SPECSTREAM_KEY },
});
const data = await res.json();
for (const item of data.items ?? []) console.log(item.title, item.link);

If your code uses Google's own client library, change one line. google-api-python-client and googleapis for Node both work against https://api.specstream.ai: set the address where the client is built, put the SpecStream key where Google's key went, and cse().list(q=..., cx=...) stays as it is. Tested on November 10, 2026 with versions 2.201.0 and 189.0.0.

# Python: google-api-python-client
from googleapiclient.discovery import build

service = build("customsearch", "v1", developerKey=SPECSTREAM_API_KEY,
                client_options={"api_endpoint": "https://api.specstream.ai"})
reply = service.cse().list(q="open source vector databases", cx="any").execute()

// Node: googleapis
const customsearch = google.customsearch({ version: "v1", auth: SPECSTREAM_API_KEY, rootUrl: "https://api.specstream.ai/" });
const reply = await customsearch.cse.list({ q: "open source vector databases", cx: "any" });

4. Remove searchType if your code sends it, and keep the rest. To page, send the startIndex from queries.nextPage[0] as start. On a 429, wait the seconds in Retry-After and send the call again; nothing was charged.

5. When your product needs every match in place of a results page, write the request in plain words. SpecStream reads it back as the conditions every row must meet and the facts to bring back, quotes the most it can cost, and delivers the rows after you approve.

Frequently asked questions

Something we didn't answer? Talk to a human

Is the Custom Search JSON API deprecated?
Yes. Google discontinues it on January 1, 2027, and its overview page says the API is closed to new customers. SpecStream answers the same GET /customsearch/v1 call at https://api.specstream.ai today.
How do I migrate from the Custom Search JSON API in Python?
Change one line: the base address becomes https://api.specstream.ai, and key= takes a SpecStream key. requests.get on /customsearch/v1 with q, num and start returns Google's JSON, so the loop over items stays as it is.
Does Google's client library work with SpecStream?
Yes. google-api-python-client and googleapis for Node work with one changed line. In Python, pass client_options={"api_endpoint": "https://api.specstream.ai"} to build. In Node, pass rootUrl: "https://api.specstream.ai/" to google.customsearch. The SpecStream key goes where Google's key went, cx is sent as before and is not used, and both cse.list and cse.siterestrict.list answer. On November 10, 2026, 30 calls in a row through the Python client were all answered, with a median of 0.48 seconds.
Do I still need a search engine ID (cx)?
No. cx is accepted and not used, so a call that sends it works unchanged. SpecStream searches the whole live web, and siteSearch keeps a search to one site.
Which Custom Search fields does SpecStream not return?
Eight: pagemap, cacheId, mime, fileFormat, labels, image, spelling and promotions. Every item has title, htmlTitle, link, displayLink, snippet, htmlSnippet, formattedUrl and htmlFormattedUrl, and searchType is refused with 400.
What is the Custom Search JSON API limit?
10,000 queries a day on Google, with 1 to 10 results a call and never more than 100 results for a query. SpecStream has no daily limit, takes up to 8,800 searches a minute on one account, and returns up to 100 results for one search on /v1/web-search.
How much does the Custom Search JSON API cost after the move?
$5 per 1,000 searches of up to 10 results, the same rate Google charges existing customers, with no daily limit. A call stopped by a 429 is not charged, and the first $10 of credit covers 2,000 searches.

Sources

SpecStream wrote this page. Each Google figure comes from Google's own pages, and each other provider's figure from that company's own page. The route's behavior is taken from its code.

  1. Google Custom Search JSON API overviewdevelopers.google.com/custom-search/v1/overview, read Nov 9, 2026
  2. Google Custom Search JSON API reference, cse.listdevelopers.google.com/custom-search/v1/reference/rest/v1/cse/list, read Nov 9, 2026
  3. Google Custom Search JSON API, using RESTdevelopers.google.com/custom-search/v1/using_rest, read Nov 9, 2026
  4. Google Custom Search terms of servicedevelopers.google.com/custom-search/terms, read Nov 9, 2026
  5. Google, updates to our web search productsprogrammablesearchengine.googleblog.com/2026/01/updates-to-our-web-search-products.html, read Nov 9, 2026
  6. Google Cloud, Agent Search pricingcloud.google.com/generative-ai-app-builder/pricing, read Nov 9, 2026
  7. Google Cloud, search method referencecloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines.servingConfigs/search, read Nov 9, 2026
  8. Gemini API, grounding with Google Searchai.google.dev/gemini-api/docs/google-search, read Nov 9, 2026
  9. Brave Search APIbrave.com/search/api/, read Nov 9, 2026
  10. Brave, alternatives to the Google Search APIbrave.com/learn/google-api-shutdown/, read Nov 9, 2026
  11. Parallel pricingparallel.ai/pricing, read Nov 9, 2026
  12. SpecStream benchmarksspecstream.ai/benchmarks, read Nov 10, 2026
  13. SpecStream pricingspecstream.ai/pricing, read Nov 10, 2026
  14. SpecStream for agentsspecstream.ai/agents.md, read Nov 10, 2026