Alternatives to the Google Search API: your options before the 2027 shutdown

On January 1, 2027 Google will be retiring its Custom Search JSON API, the long-standing way for developers to get Google search results as JSON. The API is already closed to new signups; after January 1, 2027 existing integrations will stop working as well. Google will point developers to one of three alternatives, including Agent Search under the Gemini Enterprise Agent Platform. But this is already a rebrand of the product (Vertex AI Search) that Google recommended only three months earlier.

If you’re confused, you’re not alone. A dev following Google’s path today will encounter three names for one product: “Agent Search” in the docs, “Vertex AI Search” in the console, and “Discovery Engine” in the API (and the URL slug is still generative-ai-app-builder, a fourth name). This highlights the instability of relying on a Big Tech company with the conflicting goals of owning both AI search and your AI development. For such critical infrastructure as AI and agent search, Google is putting many companies in a difficult and overly complex position.

Whether you’re an app developer or looking to power your agents, if you need a drop-in alternative to the Google Search API, the Brave Search API covers the same use cases (such as site search, AI grounding, and full-Web search) with self-serve JSON endpoints and even cleaner data. It also includes a dedicated LLM Context endpoint built for agents and chatbots—no Google (and no Google scraping) required.

This article will discuss the Google shutdown and Brave as an alternative, and give a practical how-to guide for workflow migration from one to the other.

JSON stands for JavaScript Object Notation, a lightweight, text-based data format that’s both human-readable and easily parsed by computers. It’s a widely used format for Web content.

What’s happening to the Google Search API?

For years, the Custom Search JSON API was the closest thing to an official “give me search results as JSON” service. It grew out of Google’s Custom Search Engine (2006) and arrived as a JSON API around 2010, becoming a staple for indie developers, researchers, and small companies who needed Web or image results in a simple format. In a January 2026 blog post, Google announced it would be transitioning away from the existing API product.

Here’s the timeline: The API is already closed to new customers, so you can’t sign up for it today. Existing customers have until January 1, 2027 to move to something else, and after that the endpoint will stop serving results. If your product, internal tool, or research pipeline reads search results through this API, it will break unless you migrate to an alternative.

But this is bigger than the JSON API. In the same announcement, Google began withdrawing free full-Web search across the Programmable Search Engine as a whole. As of January 20, 2026, every newly created engine must use the “Sites to search” setting, which is capped at 50 domains (existing engines can keep the “Search the entire web” option only until January 1, 2027, the same deadline as the API). In other words, free open-Web search is going away across Google’s site-search products; the JSON API is just the most visible part of a wider pullback.

What Google recommends

Google’s announcement splits users of these products into three groups, each with a different suggested path. Knowing these paths will help you pick the right alternative to the Google Search API for your needs.

If you only search your own website or a small set of sites, Google points you to its Programmable Search Element. This can work for a search box on a marketing site, but it’s built around a fixed list of domains (up to 50) rather than the open Web. So the moment you need a result from a site you haven’t pre-registered, the Programmable Search option can’t return it.

Enterprise AI and grounding

For AI-powered conversational search and enterprise grounding, Google originally pointed users to Vertex AI Search—a product that Google has now renamed Agent Search and folded into the new Gemini Enterprise Agent Platform, only three months after recommending it. (Tellingly, as of August 2026, Google’s own Custom Search migration page still lists the old “Vertex AI Search” name.) Agent Search is a capable product, but it’s really an enterprise search and RAG retrieval service designed to run on Google Cloud with enterprise-style setup and pricing. For a small team that just wants search results as JSON, the Gemini agent platform will be overkill, and introduce more complexity than it solves.

The numbers make this concrete. By default, Agent Search enforces a low search-rate quota, and Google’s own documentation tells you not to request a quota increase—to go higher, you must switch to its Configurable subscription, which starts at a minimum of 1,000 QPM and 50 GB of storage: roughly $6,000 per month before any add-ons. It also bills for the data you index ($5.00 per GB-month on the General model), a cost that grows with your corpus.

Google Agent Search Brave Search API
Default throughput Low default rate quota; can’t be raised without a subscription 50 requests/sec (Search plan)
Entry cost $1.50 / 1,000 (General model, your own corpus) or a Configurable subscription from ~$6,000  per month for throughput $5 / 1,000 queries (open Web), pay-as-you-go, with $5 free monthly credits
Your own data $5 / GB-month (General); storage and embedding add-ons (Configurable) No per-GB storage fee (since you’re querying Brave’s index)
Setup Google Cloud project, enterprise onboarding Self-serve API key

For a team that just wants Web results or grounding as JSON, that’s a steep floor to clear.

To be fair on unit price, Google can be cheaper per query: if you only need to search your own indexed data, the General model within Agent Search costs $1.50 per 1,000 queries, below Brave’s Search plan ($5 / 1,000 queries). But that rate buys corpus search over a fixed set of sites, not the open Web—and it still carries the storage fees, the rate-quota cap, and the Cloud setup overhead. Brave has the edge for that corpus use case, serving open-Web results from an independent index (not a repackaged Google feed), far higher self-serve throughput, and no infrastructure to stand up.

You can no longer sign up for a Google API that returns open-Web results as JSON (a ranked list of links you can page through) the way the old Custom Search API did. Agent Search doesn’t fill the gap either—it searches only the sites you specify and index, not Google’s public Web index. That’s a fundamentally different product from a Web search API. Meanwhile, for a raw results feed, Google routes you to a form to register interest in a future solution, with pricing and details to come.

Google does sell self-serve, live open-Web products—but they’re grounding SKUs, not a results feed. Grounding Queries exceeding predefined limits are billed at $14 per 1,000 grounding queries on Gemini 3, and on Gemini 3 Google bills for each search the model decides to run—so one user question can trigger several charges. (On Gemini 2.5 and earlier the rate is $35 per 1,000 prompts, and Web Grounding for enterprise is $45 per 1,000 prompts.) Both return a synthesized answer with citations rather than raw results. Brave’s closest equivalent, the Answers plan, is $4 per 1,000 searches plus $5 per million input/output tokens; if you’d rather run your own model, LLM Context gives you the grounding data directly.

That last gap is the important one. The thing most people valued about the old Google Search API (that is, that you could send a query and get open-Web results as JSON) no longer has a simple, ready-to-use replacement from Google.

Alternatives to the Google Search API: where the Brave Search API fits

The Brave Search API runs on Brave’s own Web index of 40+ billion webpages, and returns results as structured JSON over a REST endpoint. It’s also self-serve: You can sign up, get your API key, and start building today. It maps cleanly onto all three of Google’s use cases, and each of Brave’s plans includes $5 in free monthly credits—and with four self-serve plans available (Search, Answers, Autosuggest, and Spellcheck), that’s up to $20 per month in total free credits. Add to that self-serve usage limits, and you can test at low or no cost.

Site-specific search

Brave supports custom ranking through a feature called Goggles, which lets you boost or restrict specific domains at query time. That means you can confine results to just the sites you care about (much like a programmable search engine) without being locked to a fixed list baked into a separate product. You get site-focused results and the open Web from the same API.

Enterprise AI and grounding

This is where Brave really stands out, thanks to a dedicated endpoint called LLM Context, purpose-built for agents and chatbots. Instead of returning a plain list of links, the LLM Context endpoint does the hard part for you: A single call returns pre-extracted Web content ranked for relevance, with text chunks, tables, code blocks, and structured data. And each of these will have per-source provenance, so your model can reason over it directly. There’s no separate step for scraping or fetching.

LLM Context can help with the same workflows where an enterprise might otherwise turn to Google’s Agent Search and Gemini Enterprise Agent Platform. The main differences are that Brave’s solution is available through a simple REST API you can wire up in minutes, and it’s purpose-built for AI-powered conversational search or grounding (rather than being part of a larger AI development platform).

If you’d prefer to have Brave produce the finished answer (rather than run your own model), there’s a separate Answers plan: it returns a researched, grounded answer along with the Web sources that back it, priced at $4 per 1,000 Web searches plus $5 per million input/output tokens. And, as with Brave’s other plans, Answers includes $5 in free credits every single month.

Answers is the closest analog to Google’s generative, conversational answers (that is, for easy access to machine intelligence with minimal setup) while LLM Context remains the better fit when you want to keep control of the model layer and just need high-quality grounding data to feed it.

Full-Web search

This is the biggest difference. Where Google now routes full-Web users to a form, Brave offers full-Web search from its own, completely independent index of the Web—it’s self-serve and available right now. You get open-Web results as JSON (the exact pattern that made the old Google Search API a favorite of developers) without a waitlist.

If your code calls Google’s Custom Search JSON API for a ranked list of Web results, Brave’s Web search endpoint (/res/v1/web/search) is the direct replacement. Moving over takes three changes: the endpoint and key, a few request parameters, and the response fields you read.

Google Custom Search Brave Web search
Endpoint https://customsearch.googleapis.com/customsearch/v1 https://api.search.brave.com/res/v1/web/search
API key key query parameter or X-Goog-Api-Key header X-Subscription-Token header
Search engine ID cx (required) Not needed: searches the whole Web, or use Goggles

Request parameters

Most of Google’s parameters have a direct Brave equivalent. Google’s term and site filters become search operators added to the query.

Google Brave
q q
num (up to 10) count (up to 20)
start (1-based result index) offset (0-based page index, up to 9): (start - 1) // num
safe=off / safe=active safesearch=off / safesearch=strict (moderate is also available)
dateRestrict=d1, w1, m1, y1 freshness=pd, pw, pm, py, or a range like 2026-01-01to2026-06-30
gl, cr=countryXX country=XX
hl ui_lang, for example en-US
lr=lang_xx search_lang=xx; to restrict rather than prefer a language, also add lang:xx to q
siteSearch=example.com Add site:example.com to q (-site:example.com when siteSearchFilter=e)
exactTerms, excludeTerms, orTerms Add "exact phrase", -term, or a OR b to q
fileType=pdf Add filetype:pdf to q

Response fields

Google returns results in items; Brave returns them in web.results, with a few fields renamed:

Google Brave
items[] web.results[]
items[].title, htmlTitle title
items[].link, formattedUrl url
items[].displayLink meta_url.netloc
items[].snippet, htmlSnippet description; matched terms are wrapped in <strong> (Google uses <b>), or pass text_decorations=false for plain text
items[].pagemap.cse_thumbnail[0].src thumbnail.src
items[].pagemap.cse_image[0].src thumbnail.original
spelling.correctedQuery query.altered
queries.nextPage query.more_results_available (true when another page exists)
searchInformation.totalResults No equivalent: Brave doesn’t estimate total matches, so use query.more_results_available to decide whether to fetch another page
— age and page_age: how old each page is (Brave-only)

If the rest of your code expects Google’s items, a small adapter keeps it working. This one translates the common request parameters and maps Brave’s results back into Google’s shape:

import html
import re

import requests

BRAVE_URL = "https://api.search.brave.com/res/v1/web/search"
FRESHNESS = {"d1": "pd", "w1": "pw", "m1": "pm", "y1": "py"}


def to_brave_params(q, num=10, start=1, safe="off", dateRestrict=None, gl=None, siteSearch=None):
    params = {
        "q": q,
        "count": num,
        "offset": (start - 1) // num,
        "safesearch": "strict" if safe == "active" else "off",
    }
    if siteSearch:
        params["q"] += f" site:{siteSearch}"
    if gl:
        params["country"] = gl.upper()
    if dateRestrict in FRESHNESS:
        params["freshness"] = FRESHNESS[dateRestrict]
    return params


def plain(text):
    return html.unescape(re.sub(r"<[^>]+>", "", text or ""))


def google_html(text):
    # Google highlights matched terms with <b>, Brave with <strong>
    return (text or "").replace("<strong>", "<b>").replace("</strong>", "</b>")


def to_google_items(data):
    items = []
    for r in data.get("web", {}).get("results", []):
        item = {
            "title": plain(r.get("title")),
            "htmlTitle": google_html(r.get("title")),
            "link": r["url"],
            "displayLink": r.get("meta_url", {}).get("netloc"),
            "snippet": plain(r.get("description")),
            "htmlSnippet": google_html(r.get("description")),
            "formattedUrl": r["url"],
        }
        if thumbnail := r.get("thumbnail"):
            item["pagemap"] = {"cse_thumbnail": [{"src": thumbnail["src"]}]}
        items.append(item)
    return items

Then swap your Google call for this:

response = requests.get(
    BRAVE_URL,
    params=to_brave_params("brave search", num=5, siteSearch="github.com"),
    headers={"Accept": "application/json", "X-Subscription-Token": "<YOUR_API_KEY>"},
)
response.raise_for_status()
data = response.json()

for item in to_google_items(data):
    print(item["title"], item["link"])

query = data.get("query", {})
has_next_page = query.get("more_results_available", False)  # instead of queries.nextPage
corrected = query.get("altered")  # instead of spelling.correctedQuery

Results come from Brave’s own index, so they (and their ranking) will differ from Google’s. And where Custom Search stops at 100 results per query, Brave goes up to 200 (20 results per page, up to offset=9).

Replace your search engine ID with Goggles

Google’s cx parameter points to a search engine configured in Google’s control panel. If your engine limited, excluded, or ranked sites, express that with Brave’s goggles parameter instead:

Google search engine setting Goggle rules
Sites to search One $site=example.com line per site, then $discard to drop everything else
Sites to exclude $discard,site=example.com
Promote a site $boost=2,site=example.com
Demote a site $downrank=5,site=example.com

For example, to search only two documentation sites:

response = requests.get(
    BRAVE_URL,
    params={
        "q": "async await",
        "count": 5,
        "goggles": "$site=docs.python.org\n$site=developer.mozilla.org\n$discard",
    },
    headers={"Accept": "application/json", "X-Subscription-Token": "<YOUR_API_KEY>"},
)
for item in to_google_items(response.json()):
    print(item["displayLink"], item["link"])

You can pass up to three Goggles, each either an inline definition like the one above or the URL of a hosted Goggle, which keeps your configuration in one place. See Goggles for the full syntax.

How to migrate: grounding an agent with LLM Context

Migrating is straightforward. First, get an API key from the Brave Search API dashboard. Then send your query to the LLM Context endpoint and read the JSON payload. It’s the same “query in, JSON out” flow you already know, except it returns ready-to-use grounding content instead of just links.

Here’s a simple request with cURL:

curl "https://api.search.brave.com/res/v1/llm/context?q=who+won+the+f1+race+this+weekend"
--compressed \
-H "Accept: application/json" \
-H "X-Subscription-Token: <YOUR_API_KEY>"

And the same request in Python, using import requests and parsing the response with response.json():

import requests
url = "https://api.search.brave.com/res/v1/llm/context"
params = {"q": "who won the f1 race this weekend"}
headers = {
    "Accept": "application/json",
    "X-Subscription-Token": "<YOUR_API_KEY>",
}
response = requests.get(url, params=params, headers=headers)
response.raise_for_status( )
print(response.status_code) # 200 on success
data = response.json()
# pre-extracted grounding content + source provenance
# Pass `data` to your model as context — no separate scrape step needed

The response is organized into grounding content (grouped by type) and metadata for its sources, with per-source provenance like title, hostname, and the age of the page, providing everything your model needs to answer with citations. You can also tune the response with the same filters as Web search, including freshness, country, and Goggles-defined domain lists, all using the same API key and subscription plan.

Here’s a trimmed example response (names and sources are placeholders):

{
  "grounding": {
    "generic": [
      {
        "url": "https://www.example.com/racing/harbor-city-grand-prix-report",
        "title": "Harbor City Grand Prix report: Rivera beats Okafor in wet thriller as Team Falcon win title",
        "snippets": [
          "Sam Rivera beat Jonas Okafor to victory in a thrilling wet Harbor City Grand Prix as Team Falcon clinched the 2026 Constructors' Championship.",
          "| Pos. | Driver | Time | Points |\n| --- | --- | --- | --- |\n| 1 | Sam Rivera RIV | 1:35:23.504 | 25 |\n| 2 | Jonas Okafor OKA | +14.602s | 18 |\n| 3 | Mia Lindqvist LIN | +24.485s | 15 |"
        ]
      },
      {
        "url": "https://news.example.org/sport/harbor-city-gp-result",
        "title": "Harbor City Grand Prix result: Rivera wins as Team Falcon secure constructors' championship",
        "snippets": [
          "Falcon drivers Theo Marchetti and Ana Duarte finished fourth and fifth to clinch the constructors' championship a week after Marchetti had tied up the drivers' title."
        ]
      }
    ],
    "map": []
  },
  "sources": {
    "https://www.example.com/racing/harbor-city-grand-prix-report": {
      "title": "Harbor City Grand Prix report: Rivera beats Okafor in wet thriller as Team Falcon win title",
      "hostname": "www.example.com",
      "age": ["Sunday, November 08, 2026", "2026-11-08", "7 days ago", "2026-11-08T18:51:28Z"],
      "snippet": "**Sam Rivera beat Jonas Okafor to victory** in a wet thriller at the Harbor City Grand Prix."
    },
    "https://news.example.org/sport/harbor-city-gp-result": {
      "title": "Harbor City Grand Prix result: Rivera wins as Team Falcon secure constructors' championship",
      "hostname": "news.example.org",
      "age": ["Sunday, November 08, 2026", "2026-11-08", "7 days ago", "2026-11-08T22:11:31Z"],
      "snippet": "**Sam Rivera wins a gripping Harbor City Grand Prix** in difficult conditions."
    }
  }
}

If you just want a ranked list of Web results as JSON, the way the old Google Custom Search JSON API worked, Brave’s Web search endpoint (/res/v1/web/search) is the direct analog, using the same key and the same “query in, JSON out” pattern. See the field mapping above.

Why a standalone index matters

The deprecation is a reminder of a bigger lesson: when your search depends on Google, you’re exposed to Google’s business decisions. The API is now going away on Google’s timeline, forcing thousands of projects to scramble for a replacement.

A standalone search API like Brave lowers that risk. Rather than reselling or scraping another engine’s results, Brave runs its own index, so your search doesn’t hinge on a competitor’s roadmap. It also brings privacy benefits, including options like Zero Data Retention (ZDR), a necessity when search sits inside a regulated product.

Frequently asked questions

When is the Google Search API being shut down?

Google’s Custom Search JSON API is closed to new customers now, and existing customers must migrate by January 1, 2027. After that date, the API will stop returning results.

What are the best alternatives to the Google Search API?

It depends on your use case. Google points users to its Gemini Enterprise Agent Platform, home to Agent Search, the renamed version of the Vertex AI Search tool it recommended three months earlier. But this is really an AI development platform. For the specific need of Web search as JSON, a standalone, independent option like the Brave Search API is a purpose-built, self-serve alternative to the Google Search API that you can start using today.

Is there a free alternative to the Google Search API?

The Brave Search API lets you start for free—every Brave plan includes $5 in monthly credits to test with. And, unlike with Google Custom Search, there’s no 100-queries-per-day ceiling. You can scale by paying only for what you use instead of hitting a hard free-tier wall (or, as of January 1, 2027, losing the free tier entirely). A credit card is required to sign up for Brave, but you can set usage limits so you never exceed your free monthly credits or whatever is your target budget. See the Brave Search API dashboard for current plan details.

Can I search the whole Web, not just my own sites?

Yes. Unlike Google’s site-scoped options, the Brave Search API searches the open Web from its own index, and you can still narrow results to specific domains using Goggles.

Will my code need big changes if I switch to Brave?

Usually not. Brave follows the same “query in, JSON out” pattern and uses one API key, so migrating is mostly swapping the endpoint, translating a few parameters, and updating how you read the response (see the field mapping above). If your Google search engine restricted or ranked sites, you’ll recreate that with Goggles. And if you move to the LLM Context endpoint for AI grounding, you’ll get richer pre-extracted content to hand straight to your model.

What’s the best alternative to the Google Search API if I don’t want to run my own scraper?

Since Google no longer offers a supported way to pull open-Web results as JSON, many developers have turned to scraping Google’s search results pages instead—a workaround that’s against Google’s Terms of Service, and one that breaks constantly as Google changes its markup. The Brave Search API avoids that problem entirely: it’s a self-serve, officially supported REST endpoint backed by Brave’s own independent index of billions of webpages, so there’s no scraper to build, monitor, or fix. Brave Software is based in the United States (San Francisco), which can also simplify vendor and compliance review for US-based teams that need a domestic provider. You get the same “query in, JSON out” pattern as the old Google API, with no infrastructure of your own to maintain.

Related articles

Using the Brave Search API as a news API

Jul 29, 2026

A guide to using the Brave Search API as a news API: how the /news/search endpoint works, the structured JSON it returns, real-time and global coverage, common use cases like news aggregation and AI grounding, and how to make your first call.

Read this article

What is the HTTP QUERY method?

Jul 29, 2026

A plain-language guide to the HTTP QUERY method: a web standard (RFC 10008, 2026) that lets a program send a read-only lookup with its details in the request body instead of the web address, so the request is safe to repeat and its answer can be saved and reused. Explains why QUERY was created, how it works, where it helps (especially search APIs), and how widely it is supported.

Read this article
Brave logo

Almost there…

Please continue the installation of Brave in the .

Please continue the installation of Brave in the .

You’re just 60 seconds away from the best privacy online

  1. Download Brave
  2. Run the installer
  3. Import settings
  1. step 1
    Download Brave

    Open the installer from Chrome's downloads (it should be in the upper right corner of this window).

  2. step 2
    Run the installer

    If you're prompted to, click “Yes” in the User Access Control dialog.

  3. step 3
    Import settings

    Wait for the installation to finish, then import your browser settings from Chrome.

If your download didn’t start automatically, click .

Need help?