Google Custom Search API Alternative: What to Switch To Before 2027

Divya Lath
Google Custom Search API alternative: Switch to TinySearch

Somewhere in your code, there's probably a call to googleapis.com/customsearch/v1.

Maybe it's the search feature in your product, a research assistant your team uses to check a regulation, a RAG pipeline that grounds a chatbot's answers in search results, or an agent someone built last year that searches the web before it answers. It has probably worked for years without anyone thinking about it. On January 1, 2027, it stops, and you'll need a Google Custom Search API alternative running before then.

In January, Google announced that the Custom Search JSON API is closed to new customers, and that existing customers have until January 1, 2027 to move. Its suggested replacement, Vertex AI Search (now called Agent Search), covers up to 50 domains. For whole-web results, Google has a separate service for partners. If you went through the Bing Search API retirement in August 2025, this will feel familiar. Microsoft also pointed its customers to its own agent platform.

Google's Custom Search JSON API page: the API is closed to new customers, and existing customers have until January 1, 2027 to transition to an alternative solution
Google's note on its Custom Search JSON API page.

For software that searches the open web, the practical replacement is an independent web search API, and that's what we built TinySearch for. It searches the whole web over a plain REST call, with site, date, country and language filters. It also shares one API key with TinyFetch, which reads the full page when a snippet isn't enough. We make TinySearch, so we'll be upfront below about where it fits and where it doesn't.

The short version

  • The Custom Search JSON API ends on January 1, 2027, and new customers can't sign up.
  • Website search boxes on 50 sites or fewer keep working. Anything that calls the API from code has to move.
  • Agent Search covers up to 50 domains. Google's whole-web option is for partners.
  • Leave time to test. If your company freezes changes in December, that's your real deadline.
  • TinySearch searches the whole web with one REST call. It's free to start, and teams that need more volume can agree higher limits with us.

Who has to move off the Google Custom Search API

Not everything with "Google Custom Search" in its name is going away. It's worth five minutes to work out which case you're in:

  • Anything that calls the JSON API (customsearch/v1) stops returning results.
  • A search box on your website that searches the whole web, or more than 50 sites, has to move.
  • A search box that covers 50 sites or fewer keeps working. If that's all you run, you're fine.
Who has to move off Google Custom Search: code that calls the Custom Search JSON API and search boxes covering the whole web or more than 50 sites must move before January 1, 2027; search boxes on 50 sites or fewer keep working

Until the cutoff, nothing changes for existing customers. Google's Custom Search JSON API page keeps the same pricing: 100 free queries a day, then $5 per 1,000, up to 10,000 a day.

The hard part, especially in a bigger codebase, is finding every caller. The JSON API was easy to pick up, so it turns up in places nobody keeps track of: a script in a data team's repo, a workflow in a low-code tool, a LangChain GoogleSearchAPIWrapper from a hackathon project that ended up in production. Search your code and config for customsearch/v1. Then check Google Cloud's API metrics in every project for traffic to customsearch.googleapis.com. The second check finds the callers the first one misses.

We've covered the background in more detail: what's changing in 2027, what the Custom Search JSON API is and how Programmable Search Engine works.

Your real deadline is earlier than January 1

Nobody wants to be swapping search providers on New Year's Eve. Whatever size your team is, you need time to pick a replacement, change the code, test it on real queries and watch it in production before the holidays.

If your company freezes production changes in the second half of December, count back from the last day you can ship. If you also need a security review or a new vendor approved, start those now. None of these steps is hard on its own, but in a bigger company each one has a queue.

Timeline: Microsoft retires the Bing Search APIs on August 11, 2025; Google closes the Custom Search JSON API to new customers on January 20, 2026; Google documents a partner-only Web Search Service API in September 2026; many companies freeze changes in mid-December; the Custom Search JSON API is discontinued on January 1, 2027

Google Custom Search vs Agent Search vs TinySearch

Google Custom Search JSON APIGoogle Agent SearchTinySearch
StatusClosed to new customers. Ends January 1, 2027AvailableAvailable
What it searchesThe sites in your engine, or the whole webUp to 50 domains, plus your own dataThe whole web, or only the sites you choose
What you get backTitles, links and snippets, 10 per requestSearch results and generated answers over your sourcesTitles, URLs, snippets and site names. Publisher and date for news, author and citation details for research papers. Full pages with TinyFetch
How you call itREST, with an API key and an engine IDGoogle Cloud APIs, set up in a Google Cloud projectREST, with an API key. Python and TypeScript SDKs, and MCP
Limits10,000 queries a day, 100 results per queryGoogle Cloud quotasHigher limits for organizations, set in the contract
Pricing100 free queries a day, then $5 per 1,000Google Cloud pricingFree to start
Built forSearch boxes and appsSearch and answers over your own contentApps, agents, assistants and internal tools that search the web

Agent Search is a good product, but it does a different job. It's built to search your own content (your sites, your documents, your data) and generate answers over it inside Google Cloud. Most JSON API integrations do something simpler: they send a query to the open web and get back a ranked list of pages. A research tool that checks standards bodies, regulators, competitors and the news won't fit in a list of 50 domains.

And you can't simply sign up for Google's whole-web search. Google has published a Web Search Service API, but it's for "programmatic partners". As Search Engine Journal pointed out, the docs don't say how to become a partner, what it costs or what the limits are. Developers raised the same gap in the Hacker News thread on the announcement.

What to look for in a Google Custom Search API alternative

When the caller is production software rather than a person, a few things decide whether a replacement works. Here's what to check, and how TinySearch handles each one.

What you needHow TinySearch handles it
Whole-web search, with the option to narrow itSearches the whole web by default. include_domains and exclude_domains narrow it, and carry over your engine's site list
A plain API your servers can callOne GET request with an X-API-Key header. Works from any cloud, with any model
Room to growStart free, then agree higher limits for your organization in the contract
Sources people can citeEvery result has a URL and site name. News adds the publisher and date. Research papers add authors, venue, year and citations
Fresh, local resultsA rolling window (recency_minutes) or a date range, plus location and language. Set the language to Japanese and it targets Japan
A security review, if you need oneData residency and access scope are agreed in the contract
Proof before you commitIt's free to start, so you can run your own queries first

Three of these deserve more than a table row.

Coverage first. Your users ask about things you can't predict, and the answers live on sites nobody put on a list. Narrowing to certain sites should be a parameter you choose, not a ceiling.

Then volume. Google capped the JSON API at 10,000 queries a day, and agents search more than people do. An agent working through one question often runs several searches, so a feature that takes off, or an assistant used across a company, can multiply your volume fast. Check the rate limit you'll actually get, and how quickly it can go up.

And testing. Rankings will differ from Google's. Running a few hundred of your real queries through both while Google still answers is the only way to know whether that's better or worse for your users.

Why TinySearch is built for agents

Google ranks results for a person who will scan the page and click one. An agent doesn't click. It reads whatever you hand it and decides what to do next. So TinySearch is tuned for what agents need: a first result that already holds the answer, not just the page most people would click. You can also tell it why you're searching. The optional purpose parameter takes a sentence like "find the regulator's current guidance, not news coverage of it" and uses it to shape the results.

It's one GET request to api.search.tinyfish.ai with your key in an X-API-Key header, so it works from any cloud and with any model. If your assistant runs on one model this quarter and another next quarter, search doesn't care. Because the key goes in a header rather than the URL, it stays out of URL logs. There are Python and TypeScript SDKs and a CLI. It also works over MCP in tools like Claude and Cursor, and plugs into frameworks like LangChain, n8n and Dify.

Every result comes back with its position, title, snippet, URL and site name. Ask for news and you also get the publisher and date. Ask for research papers and you get authors, venue, year and citation count. You can filter by freshness, either a rolling window (recency_minutes) or fixed dates, and by location and language. Set the language to Japanese and it targets Japan without any extra setup.

A TinySearch API response: the query, then results with position, site_name, title, snippet and url, plus total_results and page
A TinySearch response, from the TinySearch docs.

When a snippet isn't enough, TinyFetch reads the full page with the same key. If a page sits behind a form or a login, TinyAgent can work through it for you, or your code can drive TinyBrowser directly. It's all one API, so your agent can find a source, read it and act on it without you stitching vendors together.

You can start free, with no credit card. When you need more volume, organizations agree their rate limit with us up front, so nobody finds a cap in production. If you need data residency or specific access controls, those are agreed in the contract, not assumed. The TinySearch docs have the full parameter list and SDK examples.

We publish our numbers on tinyfish.ai/search. On a 250-question SimpleQA sample, the first TinySearch result held the answer 49.2% of the time, compared with 43.6% for Parallel. In our internal evaluation of 1,200 workflow-style queries, TinySearch's median response time was 556 ms, against 1,709 ms for Parallel.

Bar charts: the first TinySearch result held the answer 49.2% of the time versus 43.6% for Parallel on a SimpleQA sample; median response time was 556 ms for TinySearch versus 1,709 ms for Parallel

What TinySearch doesn't do yet

You'd find these in testing anyway, so here they are up front:

  • No image search. If you call Google with searchType=image, plan that part separately.
  • No file-type filter and no pagemap. If you rely on pagemap for thumbnails or page metadata, TinyFetch can get you the page itself, but the data comes back in a different shape.
  • A different response format. The field names change (see the mapping below), so it's a code change.
  • Different rankings. Results won't match Google's one for one, so test before you switch.

And if all you have is a search box on your own site that covers 50 domains or fewer, you don't need us. Google is keeping that.

How to switch from the Google Custom Search API to TinySearch

For most integrations, the change is one request. Here's a typical call to Google:

python
resp = requests.get(
    "https://www.googleapis.com/customsearch/v1",
    params={"key": GOOGLE_API_KEY, "cx": SEARCH_ENGINE_ID, "q": query},
)
results = [(item["title"], item["link"]) for item in resp.json().get("items", [])]

And the same search with TinySearch:

python
resp = requests.get(
    "https://api.search.tinyfish.ai",
    params={"query": query},
    headers={"X-API-Key": TINYFISH_API_KEY},
)
results = [(r["title"], r["url"]) for r in resp.json()["results"]]

Request parameters, from Google's cse.list reference and our API reference:

GoogleTinySearch
qquery
keyX-API-Key header
cxNot needed. Put your engine's sites in include_domains
gl or crlocation
lr or hllanguage
siteSearchinclude_domains or exclude_domains
dateRestrictrecency_minutes, or after_date and before_date
startpage (0 to 10)

Response fields:

GoogleTinySearch
itemsresults
titletitle
linkurl
snippetsnippet
displayLinksite_name

If we were doing this move ourselves, we'd take it in this order:

  1. Find every caller, in code and in your Google Cloud metrics.
  2. Pull a few hundred real queries from your logs.
  3. Run them through both APIs while Google still answers, and have someone who knows the subject judge the top results. Check latency while you're there.
  4. Put the new client behind a flag, ship it with time to spare before January 1 (or before your change freeze, if you have one), and watch the first week of results.

Let your coding agent do the first pass

Paste this into Claude Code, Cursor or Codex:

text
Find every call to googleapis.com/customsearch/v1 in this repository, including wrappers like LangChain's GoogleSearchAPIWrapper. Replace each one with TinySearch: GET https://api.search.tinyfish.ai with the X-API-Key header read from TINYFISH_API_KEY, the search terms in "query", and any site restrictions in "include_domains" as a comma-separated list. Map the response fields: items becomes results, link becomes url, displayLink becomes site_name, and title and snippet stay the same. Don't change any call that uses searchType=image or pagemap; list those for me instead. Show me a summary of every change before you apply it.

Before the deadline

If you own one of these integrations, the most useful thing you can do this week is find every caller and pull a sample of real queries. Then get an API key, run them through TinySearch and see what comes back.

If you'd rather plan the move with someone, talk to us. Bring your list of callers, your volume and your deadline, and we'll map the switch with you.

AI disclosure

Content on this website may be created or refined with the assistance of AI tools and is subject to human editorial review.

FAQ

Questions, answered.

Is the Google Custom Search API being discontinued?

How much does the Google Custom Search API cost?

What is Google replacing Custom Search with?

What is the best Google Custom Search API alternative?

Is there a Google Custom Search API alternative that searches the entire web?

What is a good Google Custom Search API alternative for RAG?

Can TinySearch search only specific sites, like a Programmable Search Engine?

Does TinySearch support image search?

How much code changes when you switch to TinySearch?

Can we try TinySearch before talking to sales?

Get started

Start building.

No credit card. No setup. Run your first operation in under a minute.

Get $8 in Wallet fundsRead the docs