The Google Custom Search JSON API allowed applications, AI agents, and other software to access Google search results, across the entire web or limited to specific websites. However, Google turned off full-web search for new users, and later stopped accepting all new signups for the API. The Custom Search JSON API will be shut down entirely on January 1st, 2027.

Google has two recommended migration paths for anyone using the API: the regular Programmable Search Engine, or Agent Search on Gemini Enterprise Agent Platform (previously "Vertex AI Search"). This guide will explain those two options, SerpApi as an alternative API for searching with Google and over 100 other engines, and Exa with its own independent search index.

Programmable Search Engine

Google's Custom Search JSON API was an extension of the Programmable Search Engine, which will continue to exist beyond the API's shutdown. It's intended for creating a search engine for your own website, or collection of websites, which can then be embedded in a web page. The engine can search either web results or image results, with an optional SafeSearch mode.

Screenshot of an engine called Tech News Search, with several tech news sites added as domains.
Setting up a Programmable Search Engine

Importantly, the Programmable Search Engine can only be used inside a web page as client-side JavaScript code. It's not intended for programmatic access, like the former Custom Search JSON API.

There is a 50-domain limit, with no option to search the entire web. If you represent a nonprofit, government agency, or school, Google can remove the 50-domain limit and hide ads from results.

Searching for "Firefox" with results from Engadget and The Verge.
The Google-hosted page for the search engine

Pricing is free for the base tier, as of December 2026. That gives you the ability to create an embedded search with no daily limit on searches, but it may display ads from Google next to the search results. You can hide the ads by upgrading to Custom Search Elements, which is $5 per thousand queries. The non-profit mode also hides ads.

The Programmable Search Engine might be helpful for websites that need a search function for their own pages, but the lack of a real API or full-web access makes it a non-starter for many use cases.

Agent Search on Gemini

The other option from Google for custom web searches, which does have an API, is Agent Search on Gemini Enterprise Agent Platform. It used to be called "Vertex AI Search," and some documentation still uses that name.

Searching for "what does the API response look like for agent search?", with an answer starting with "Based on the Vertex AI Agent Search documentation, the API response structure depends on the type of query and features used."
Generative answers from Agent Search

Here's how Google describes Agent Search:

Build secure, Google-quality enterprise-grade generative AI applications for search and recommendations. Agent Search lets developers, even those with limited machine learning skills, to tap into the power of Google's foundation models and search and recommendation expertise.

Like the Programmable Search Engine, Agent Search is designed to be a replacement for a website's own search abilities. It can be embedded in web pages, and on higher-tier plans, generate answers for natural language queries. However, it does offer an API, which is not available with the regular Programmable Search Engine.

Domains must be individually configured, with no option to search the entire web. You have to create a Google Cloud project, prepare your site's data and create a data store, and then configure either API access or the embedded search widget. There are instructions for that on the Google Cloud website. A website data store can include up to 50 URL patterns, or up to 500 URL patterns for advanced website indexing, and Google recommends setting up multiple smaller data stores.

Pricing starts at $4 per 1,000 queries, as of December 2026. Indexing for advanced site search is an additional $5 per GB per month. Google estimates that a website with 1 million queries per month using basic search would cost $4,000 per month.

SerpApi

SerpApi has over 100 search engines available as a simple API, with the ability to scrape public search results and parse them into JSON and Markdown, or connect them to AI agents with the MCP or CLI. The Google Search Engine Results API and Google Light Search API are close in functionality to Google's Custom Search JSON API.

A screenshot of a Google search for "movies in theaters", next to its parsed JSON output.
Google Search API in SerpApi, with results in JSON

You can search the entire web. SerpApi’s Google APIs return live results from Google Search, with the ability to set a specific region, device type, and language if needed. If you only want results from specific sites, you can use Google's site: operator, just like with a normal desktop or mobile search.

SerpApi also has other engines for searching the web, like Bing, Yahoo, DuckDuckGo, and Yandex. You could combine the outputs of different engines for improved research abilities, or check keywords across each one for automated SEO. There are also engines for e-commerce (Amazon, eBay, Walmart), videos (YouTube, TikTok), travel (Google Flights, Google Maps), and other categories, and an Extract API for websites without a dedicated engine.

Pricing is free for 250 searches per month, as of December 2026. Paid plans are available for more searches, faster speeds, and other features.

To get started with SerpApi, just create a free account and get your API key, and then you can use any of the official integrations to make API calls. For example, this performs a search for "movies in theaters" in New York with the SerpApi JavaScript library:

import { getJson } from 'serpapi';

let response = await getJson({
    api_key: SERPAPI_API_KEY,
    engine: "google",
    q: "movies in theaters",
    location: "New York City, New York"
})

console.log(response)

If you only need the organic results (the "blue links"), the Google Light Search API has the best performance and reliability. For the full results page, with local results, ads, events, and other common elements, try the Google Search Engine Results API.

How to track Google SERP changes using SerpApi
Create a SERP tracker using SerpApi's Google Search API. Retrieve keyword-specific SERPs, store and track them to generate AI analysis.

SerpApi doesn't have a search widget you can easily embed in a page like Google's Programmable Search Engine, and it has CORS restrictions to prevent API key leaks. If you need to embed search results in a page, you need to build your own proxy server for making the API requests.

Exa

If you need the ability to search the whole web and collections of research, but you don't necessarily need Google's index, Exa is another potential choice. Exa has built its own search index, independent of traditional search engines, with a search API that can be used in many programming languages and environments.

A screenshot of a "movies in theaters" search in Exa, showing web results
A web search with Exa

Since SerpApi and other similar scrapers have to wait for a response from Google (or another engine), parse the page, and then send the result, Exa can be faster with some searches. Because Exa searches its own index instead of a live Google results page, it doesn’t show Google rankings or ads, which can be important for SEO monitoring and ad analysis.

Here's an example of a search for "movies in theaters" in JavaScript, with Exa's library:

import Exa from "exa-js";

const exa = new Exa();

const result = await exa.search(
  "movies in theaters",
  {
    type: "lite"
  }
);

console.log(result);

You can search the entire web. Exa claims it has indexed over 100 billion pages, with over 3.5 billion pages crawled every day. For comparison, Google's index is "hundreds of billions of webpages and other digital content."

SerpApi Alternatives: Best Web Search APIs in 2026
Compare the best SerpApi alternatives in 2026. Find the right web search API for AI apps, SEO tools, research, and lead collection use cases.
SerpApi vs. Exa.ai: The Difference Between "Real-Time Truth" and "Neural Search"
Which one to pick for your Web Search API needs? Should you go with SerpApi or Exa.ai?

Pricing is free for $10 worth of searches per month, as of December 2026. Web searches are $4 per 1,000 requests. Pay-as-you-go plans and custom enterprise plans are also available.

Conclusion

Google's two official migration paths from the Custom Search JSON API, the Programmable Search Engine and Agent Search API, can't search the entire web. Search APIs like the ones offered by SerpApi, or independent search indexes like Exa, are more suitable alternatives for most developers.

If you need help using SerpApi, please contact us.