You searched for a Google search API, so you probably want one thing: send a query, get back Google's results as clean data. For years that was easy. In 2026 it is not.
This guide explains what changed, what you can still use, what each option costs, and the legal cloud over the cheapest-looking route. We read Google's and Microsoft's own pages, the vendors' pricing pages and the court order, and we label what we could not verify.
What changed, in plain words#
Two big search APIs went away within about 16 months of each other.
- Bing Search APIs. Microsoft's lifecycle notice says the Bing Search APIs were retired on August 11, 2025. Existing instances were decommissioned completely and new signups ended. Microsoft points customers to Grounding with Bing Search in Azure AI Agents, which is a different kind of product (more below).
- Google Custom Search JSON API. Google's overview page now opens with a notice: the API is closed to new customers, and existing customers have until January 1, 2027 to transition to an alternative.
That leaves a gap. The usual answer to "how do I get search results in code" used to be one of those two. Now it is a choice between several different products, and they do not all do the same thing.
Google search API options at a glance#
| Option | What you get | Price (Oct 2026) | The catch |
|---|---|---|---|
| Custom Search JSON API | JSON results from a Programmable Search Engine | 100 free a day, then $5 per 1,000 (up to 10,000 a day) | Closed to new customers. Ends 1 Jan 2027 |
| Vertex AI Search | Search over content you provide, including sites | $1.50 (Standard) or $4.00 (Enterprise) per 1,000 queries | Searches your content, not the whole web. Storage is extra |
| Gemini grounding with Google Search | A model answer with the queries it ran and citations | Gemini 3 and newer: 5,000 free a month, then $14 per 1,000 | Not a results list. Billed per search query the model runs |
| Grounding with Bing Search | A model answer built from Bing results | See Microsoft's pricing page | Developers do not get the raw results. Paid Azure subscription needed |
| Brave Search API | Web, news and image results from Brave's own index | $5 per 1,000 requests, up to 50 queries a second | Not Google's ranking. Card required |
| Exa | Search results and page contents | Lite search $4 per 1,000, $10 free credit a month | Not Google's ranking |
| Tavily | Search built for AI agents | 1,000 free credits a month, then $0.008 per credit | Not Google's ranking. Credits per search not listed |
| SerpApi | Google's real results, parsed into JSON | Free 250 a month, then $25 for 1,000 up to $150 for 15,000 | Legal dispute with Google. Legal Shield only on bigger plans |
| Serper | Google results in JSON | 2,500 free queries | We could not read its paid pricing |
Now the detail on each.
Option 1: Custom Search JSON API (only if you already have access)#
If your project already uses it, here is what Google's page says:
- It gives programmatic access to web and image search results from a Programmable Search Engine, returned as JSON.
- You get 100 free queries a day. Extra requests cost $5 per 1,000, with billing capped at 10,000 queries a day.
- Existing customers must move by January 1, 2027.
We called the endpoint on October 31, 2026 without a key. It still answers, with a 403 asking for an API key, so it has not been switched off yet. That tells you nothing about whether you can get a new key: Google says you cannot.
For a new project, skip it. Even for an old one, treat the deadline as real and plan a replacement now. We cover a migration checklist later in this guide.
Option 2: Vertex AI Search (your own content)#
Google's overview page names Vertex AI Search as "a favorable alternative for searching up to 50 domains." Google's Cloud pricing page lists two search editions:
- Standard: $1.50 per 1,000 queries. It covers unstructured and structured search.
- Enterprise: $4.00 per 1,000 queries. It adds website search and core generative answers.
Google's Cloud pricing page is titled "Agent Search pricing", so you may see this product under either name. Two things to understand. First, this searches content you give it, such as your own site, not the whole web. Second, you pay for indexing and storage on top of queries, and its separate pricing pages gave us different numbers for some items, so confirm in the Cloud console before you commit.
It fits if your old use case was "search box for my own website." It does not fit if you wanted Google's web results.
Option 3: Grounding with Google Search in the Gemini API#
This is Google's own route to its search results from code, but it works differently from a search API. You ask a Gemini model a question, and it can run Google searches to ground its answer.
Prices from the Gemini API pricing page:
| Model family | Free | Paid |
|---|---|---|
| Gemini 3 and newer (standard tier) | 5,000 search requests a month, shared across models | $14 per 1,000 requests, default cap 1,500 requests a day per project |
| Gemini 2.5 models | Free daily allowance, shared | $35 per 1,000 grounded prompts |
The page also says you are charged for each search query performed, and one Gemini request may trigger more than one query. So the real cost can be higher than the headline.
What comes back, according to Google's documentation: the queries the model ran, an HTML snippet for rendering search suggestions, and citations that tie spans of the answer to source URLs. The page does not describe a list of raw results. If you need titles, snippets and ranks to build your own results page, this is the wrong tool. If you need a sourced answer inside an AI feature, it is the closest official fit.
Option 4: Grounding with Bing Search (not a drop-in)#
Microsoft's replacement for the Bing Search APIs lives inside Azure AI agents. Its documentation says developers and end users do not have access to the raw content it returns. You get the model's response with citations and a link to the Bing query used.
Other points from that documentation: only paid or pay-as-you-go Azure subscriptions qualify, your query is transferred outside the Azure compliance boundary to the Bing service, and the older "classic" agents version is deprecated and set to retire on March 31, 2027. It is a different product from the retired search API, not a rename.
Option 5: Independent search APIs (not Google)#
If you do not need Google's exact ranking, several companies run their own index or their own search stack and sell it by API.
Brave Search API. Pricing page: Search at $5 per 1,000 requests with up to 50 queries a second, and Answers at $4 per 1,000 plus token fees. Brave says every result comes from its own independent index. The page lists $5 of free credit a month while also promising up to $20 in free calls in its header, and does not explain the gap. A credit card is required. Storing results or using them for AI training is allowed only on plans with storage rights, and the page does not say which plans.
Exa. Free tier gives $10 of credit that resets monthly, which Exa says covers up to 2,500 Lite searches at $4 per 1,000. Standard auto and fast searches cost $7 per 1,000. Page contents cost $1 per 1,000 pages, billed separately.
Tavily. Free plan with 1,000 credits a month and no card. Pay as you go is $0.008 per credit, and the Project plan is $30 a month for 4,000 credits. Tavily's page says credit use depends on the request type but does not list per-search costs, so we cannot say what one search costs.
The trade-off is plain: these are good for AI agents, research tools and general web search, but the results are not Google's results. If your product depends on what Google ranks (SEO tracking, price monitoring from Google Shopping), they will not do.
Option 6: SERP APIs (Google's real results)#
A SERP API takes your query, runs it against Google through its own infrastructure, and returns the page as structured data. This is the closest thing to the old Google search API, which is why searches for "serp api" jumped in Google Trends in late October 2026.
SerpApi pricing page (monthly, USD):
| Plan | Price | Searches a month | Legal Shield |
|---|---|---|---|
| Free | $0 | 250 (50 an hour) | No |
| Starter | $25 | 1,000 | No |
| Developer | $75 | 5,000 | No |
| Production | $150 | 15,000 | Yes |
| Big Data | $275 | 30,000 | Yes |
SerpApi says its Legal Shield gives up to $2 million of coverage for scraping and parsing search engine data, provided your use is not illegal. It starts on the Production plan.
Serper advertises 2,500 free queries with no card and endpoints for search, images, news, maps, places, videos, shopping, scholar, patents and autocomplete. We could not read its paid pricing, because its pricing page did not load for us. Third-party summaries describe prepaid credit packs starting around $50 for 50,000 credits, but that is unverified, so check Serper's site.
The reason these exist is also the risk. Which brings us to the court case.
The legal question: Google v. SerpApi#
In December 2025, Google sued SerpApi in federal court in northern California. Here is what the public record says.
- Google's claim. Google said it uses a bot-detection system called SearchGuard to protect Search results pages, and accused SerpApi of getting around it. The claims were under the DMCA's anti-circumvention rules. Google can ask for statutory damages of $200 to $2,500 per violation, plus an order to destroy the technology involved. Google estimated SerpApi sent "hundreds of millions" of automated requests a day.
- SerpApi's defense. It said it would defend the case vigorously and argued the suit was about limiting competition. In its motion to dismiss it argued that Google does not own the copyright in search results, that solving a challenge is not circumventing it, and that counting each query as a violation would imply damages of roughly $7 trillion.
- The ruling. On July 20, 2026, Chief Judge Yvonne Gonzalez Rogers granted the motion to dismiss. Claims were dismissed without leave to amend to the extent they depended on results with no copyrighted content. They were dismissed with leave to amend to the extent they depended on results containing a copyrighted Knowledge Panel component. The court said Google had not plausibly alleged that SearchGuard was put in place with the authority of the copyright owner.
- What happened next. Google filed an amended complaint in August. According to a SerpApi blog post and a court docket summary, SerpApi moved to dismiss again in late August, with a hearing set for September 29. We could not find a ruling on that second motion, so the case status is unconfirmed.
What this does and does not mean. It is not a ruling that scraping Google is legal. It covers specific DMCA claims, and Google can still win a narrower version. Google's terms also say you must not use automated means in violation of the machine-readable instructions on its pages, and its robots.txt tells generic crawlers not to fetch /search. That is why we did not fetch Google results pages to test anything. This is not legal advice. If a SERP API sits inside a product that matters, talk to a lawyer.
What 10,000 searches a month cost#
Using each provider's published prices and the simple assumption of one query per search:
This is our own arithmetic from the pricing pages above, so treat it as a rough guide.
- SerpApi: the $75 Developer plan only covers 5,000, so 10,000 needs the $150 Production plan (15,000 searches).
- Brave: 10 x $5 = $50 before its free credit.
- Exa: 10 x $4 = $40 on lite search, before the $10 free credit.
- Gemini grounding (Gemini 3 and newer): the first 5,000 are free, then 5 x $14 = $70. This is a floor, because one request can trigger several billed queries.
- Vertex AI Search: 10 x $1.50 = $15 on Standard, or 10 x $4 = $40 on Enterprise, plus storage, and only for your own content.
- Serper: about $10 on the smallest pack if the third-party price is right.
The cheapest option is not automatically the best. A $10 SERP API that gets blocked, or a $15 search over your own pages when you needed the web, costs more than it saves.
Which one should you choose?#
- "I need a search box for my own website." Vertex AI Search (Enterprise includes website search), or any site-search tool you already trust.
- "I need an AI feature that answers with sources." Grounding with Google Search if you want Google's data, or Brave, Exa or Tavily if you want cleaner control over the results.
- "I need Google's actual results for SEO or price tracking." A SERP API, with eyes open on the legal risk and a lawyer if it is core to your business.
- "I just need web search for a research tool or agent." Start with the free allowances at Brave, Exa or Tavily. Our guide to live web data for AI agents covers the wider picture.
- "I am migrating from Custom Search before January." See the checklist below.
If you use Custom Search today: a migration checklist#
- Look at what you actually use. Is it whole-web search, a list of your own sites, or images? That decides the replacement.
- Count your queries. Check how many a day you run against the 100 free and the 10,000 daily cap.
- Pick the replacement from the list above and run it side by side with Custom Search for a week.
- Compare results by hand. Results from a different index will not match Google's. Check the 20 queries your product depends on most.
- Check the terms. Look at storage rules, display rules and training rules for the new provider.
- Switch before the end of 2026. The API ends on 1 January 2027, and we would not leave it to the last week.
Mistakes to avoid#
- Assuming "Google" means the same thing everywhere. Gemini grounding, Vertex AI Search and a SERP API all involve Google, and they return very different things.
- Trusting old tutorials. Many guides still say "get a Custom Search key and a search engine ID." That path is closed. See why API tutorials go out of date.
- Comparing prices without comparing what a "search" is. Gemini bills per query performed, Brave per request, Tavily per credit.
- Building on a legal grey area without a plan B. If you use a SERP API, keep an independent search API ready as a fallback.
- Ignoring rate limits and caps. SerpApi's free plan allows 50 searches an hour. Brave's Search plan allows 50 queries a second. Design for the limit.
If you are building an API integration, our guides on API design principles and what a REST API is cover the basics. Our Google Flights API and Google Hotel API guides show where SERP APIs fit when Google has no official API for the data you want.
Checklist before you pick#
- I know whether I need Google's results or just good web results.
- I know whether I need a list of results or a sourced answer.
- I compared cost for my real monthly volume, not the headline price.
- I read the storage and AI training terms.
- I have a fallback if one provider blocks me or changes terms.
- I checked the legal position if I am scraping Google through a third party.
- If I use Custom Search, I have a switch date before 1 January 2027.
Key takeaways#
- Google has no search API for new customers that returns web results. Custom Search JSON API ends on 1 January 2027.
- Bing Search APIs ended on 11 August 2025. Its replacement does not give you raw results.
- Google's own routes now return answers or search your own content, not a results list.
- Independent indexes (Brave, Exa, Tavily) are the clean option if you do not need Google's ranking.
- SERP APIs return real Google results but carry legal risk. A July 2026 ruling helped SerpApi, but the case is not over.
Sources and what we did not test#
We read these in October 2026. Prices and terms change often, so confirm on the vendor's site.
Google and Microsoft:
- Google, Custom Search JSON API overview
- Google, Gemini API pricing
- Google, Grounding with Google Search documentation
- Google Cloud, Vertex AI Search pricing
- Google, Terms of Service
- Google, robots.txt
- Microsoft, Bing Search APIs retirement notice
- Microsoft, Grounding with Bing Search documentation
Vendors:
The court case:
- Search Engine Journal, Google files DMCA suit targeting SerpApi
- PPC Land, SerpApi files motion to dismiss
- Court order, Google LLC v. SerpApi, LLC (July 20, 2026)
- CourtListener docket
Search demand:
Not tested: we did not run any paid search API, because most need an account and a card. We made one call to the Custom Search JSON endpoint without a key, which returned a 403 asking for a key, and we made one keyless call to Brave's endpoint, which returned a validation error asking for a token. We did not fetch Google result pages, because Google's robots.txt disallows /search. Vertex AI Search pricing was read from Google's pricing page in a browser, and some of its other pages list different figures. Serper's paid prices are unverified. The status of the SerpApi case after late August 2026 is unconfirmed. The cost chart is our own arithmetic. Nothing here is legal advice.