---
title: "Google Custom Search API Alternatives (2026): Pricing, Shutdown"
description: "The Custom Search JSON API is closed to new customers and stops on January 1, 2027. The drop-in replacement for Google results as JSON, with copy-paste code, a parameter map, and what it costs against the old $5 per 1,000 and 10,000-a-day cap."
category: "guides"
url: https://keirolabs.cloud/blog/google-custom-search-api
published: 2026-10-19
updated: 2026-10-27
---

# Google Custom Search API is shutting down: switch in one function (2026)

## The 60-second version

**The Google Custom Search JSON API is closed to new customers, and existing integrations stop on January 1, 2027** ([Google's overview page](https://developers.google.com/custom-search/v1/overview)). If your product calls `customsearch/v1`, the replacement has to ship before the end of 2026.

- **The drop-in:** Keirolabs `/search/google` returns Google results as JSON with the same knobs (query, country, language) and no daily cap. Swap one function; the code and a parameter map are below.
- **Price:** 2 credits a search, which is $5.33 per 1,000 on Essential, $2.96 on Pro and $1.78 on Startup. Custom Search charged $5 per 1,000 and capped you at 10,000 a day.
- **If you don't need Google's exact ranking,** `/search/lite` returns web results for $0.10 per 1,000 on a plan.
- **Google's suggested replacement, Vertex AI Search,** searches your own content with monthly minimums. It does not return public Google results, so it is not a drop-in.

## Switch off Custom Search: the code

**Most integrations read `items[].title`, `items[].link` and `items[].snippet`. This function returns exactly that shape, so the rest of your code does not change.**

```python
# Before: Google Custom Search JSON API (ends January 1, 2027)
# r = requests.get("https://www.googleapis.com/customsearch/v1",
#                  params={"key": GOOGLE_API_KEY, "cx": SEARCH_ENGINE_ID,
#                          "q": q, "num": 10, "gl": "us", "lr": "lang_en"})
# items = r.json().get("items", [])

# After: Keirolabs /search/google
import os, requests

def search(q: str, n: int = 10, country: str = "us", lang: str = "en") -> list[dict]:
    r = requests.post(
        "https://api.keirolabs.cloud/api/v2/search/google",
        headers={"Authorization": f"Bearer {os.environ['KEIRO_API_KEY']}"},
        json={"query": q, "maxResults": n, "country": country, "lang": lang},
        timeout=30,
    )
    r.raise_for_status()
    # same shape your Custom Search code expects
    return [{"title": h["title"], "link": h["url"], "snippet": h.get("snippet", "")}
            for h in r.json()["results"]]
```

The same call in Node.js:

```js
async function search(q, n = 10, country = "us", lang = "en") {
  const r = await fetch("https://api.keirolabs.cloud/api/v2/search/google", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.KEIRO_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ query: q, maxResults: n, country, lang }),
  });
  if (!r.ok) throw new Error(`search failed: ${r.status}`);
  const { results } = await r.json();
  return results.map(({ title, url, snippet }) => ({ title, link: url, snippet }));
}
```

### Custom Search to Keirolabs, parameter by parameter

| Custom Search JSON API | Keirolabs `/search/google` | Notes |
|---|---|---|
| `GET /customsearch/v1` | `POST /api/v2/search/google` | JSON body instead of query string |
| `key` + `cx` | `Authorization: Bearer <key>` | No search engine ID to manage |
| `q` | `query` | 1 to 500 characters |
| `num` (1 to 10) | `maxResults` (up to 20) | Twice the results per request |
| `gl` | `country` | Two-letter code, biases results to that country |
| `cr` | `cr` | Hard-restricts results to sites from that country |
| `lr` (`lang_en`) | `lang` (`en`) | Plain language code |
| `items[].title`, `link`, `snippet` | `results[].title`, `url`, `snippet` | Rename `url` to `link` and nothing downstream changes |
| 10,000 queries a day cap | no daily cap | Plan [rate limits](/blog/search-api-rate-limits-2026) apply instead |

Full parameters are in the [Google SERP docs](https://docs.keirolabs.cloud/search/google-serp). If your Programmable Search Engine was limited to a fixed list of sites, put `site:example.com` in the query.

## What it costs after Custom Search

| Monthly volume | Custom Search JSON API | Keirolabs `/search/google` | Keirolabs `/search/lite` |
|---|---|---|---|
| 3,000 (100 a day) | $0 | $29.99 on Essential (5,625 searches included) | $29.99 on Essential |
| 30,000 (1,000 a day) | about $135 | $99.99 on Startup (56,250 searches included) | $29.99 on Essential |
| 300,000 (the 10,000-a-day cap) | about $1,485 | custom volume price ([email us](mailto:team@keirolabs.cloud)) | $29.99 on Essential (covers 300,000) |
| 1,000,000 | not possible | custom volume price | $99.99 on Startup (covers 3,000,000) |

**Below 100 queries a day, Custom Search's free tier is hard to beat, but it ends on January 1, 2027 either way. Above that, Keirolabs is cheaper up to Startup volume, has no daily cap, and `/search/lite` is cheaper at every volume if you don't need Google's exact ranking.** Keirolabs gives 750 credits at signup with no card, enough to run your own queries through the new function before you switch traffic.

## How the Custom Search JSON API works

**One GET request with your key, your engine ID and a query returns up to 10 results as JSON.**

```bash
curl "https://www.googleapis.com/customsearch/v1?key=$GOOGLE_API_KEY&cx=$SEARCH_ENGINE_ID&q=serp+api+pricing"
```

| Parameter | What it does |
|---|---|
| `key` | API key from Google Cloud console |
| `cx` | Programmable Search Engine ID |
| `q` | The query |
| `num` | Results per page, 1 to 10 |
| `start` | Index of the first result (1, 11, 21 … up to 91) |
| `searchType=image` | Image results instead of web |
| `gl`, `lr` | Country and language |
| `dateRestrict` | Recency, e.g. `d7` for the past week |

The response's `items` array holds each result's `title`, `link`, `snippet` and page metadata. Because pages hold 10 results and `start` stops at 91, **one query yields at most 100 results across 10 paid requests.**

## How much does the Custom Search JSON API cost?

**The first 100 queries each day are free; after that it is $5 per 1,000 queries, with a hard cap of 10,000 queries a day.**

| Daily volume | Monthly cost (30 days) |
|---|---|
| 100 queries | $0 |
| 1,000 queries | about $135 |
| 10,000 queries (the cap) | about $1,485 |

The 10,000-a-day cap means about 300,000 queries a month at most, on any budget.

## Can you still get a Custom Search API key?

**If you already have access:** create a key in the Google Cloud console under APIs and Services, and copy your engine ID from the Programmable Search Engine control panel. It works until January 1, 2027.

**If you are a new customer:** you can no longer enable the JSON API for a new project. Google closed it to new customers ahead of the shutdown, so tutorials that walk you through "enable Custom Search API" do not work for new accounts. Use one of the alternatives below instead.

## What changes on January 1, 2027?

**Existing integrations stop.** After the deadline, requests to the JSON API will no longer return results, and Google has also been removing the free "search the entire web" option from Programmable Search Engine itself.

## Is Vertex AI Search a replacement?

**Not for most Custom Search users.** Vertex AI Search is Google's enterprise semantic search over **your own content**. Per [Google's configurable pricing docs](https://cloud.google.com/generative-ai-app-builder/docs/enable-configurable-pricing), it has subscription minimums of around 1,000 queries per minute and 50 GiB of storage, with per-query fees between roughly $1.50 and $4 per 1,000 depending on the edition. It does not return public Google web results as JSON. If your app sends a query and expects ranked web results back, Vertex is a different product, not a migration target.

## Other Google Custom Search API alternatives

| Alternative | Type | Price per 1,000 | Free start |
|---|---|---|---|
| **Keirolabs** | Google SERP (`/search/google`) and web search (`/search/lite`) on one key | Google $1.78 to $5.33; lite $0.033 to $0.10 on plans | 750 credits once at signup, no card |
| [Serper](/blog/serper-api-guide-2026) | Google SERP API | $1.00 to $0.30 | 2,500 queries, one time |
| DataForSEO | Google SERP API, queue or live | $0.60 to $2.00 | Trial deposit |
| [Brave Search API](/blog/brave-search-api-guide-2026) | Independent web index | $5.00 | $5 credit a month |
| SerpApi | Google and 40+ engines | $25 down to $1.96 | 250 searches a month |

Full prices and sources are in [cheapest SERP API](/blog/cheapest-serp-api) and [SerpApi pricing](/blog/serpapi-pricing).

**Choose by what your code needed from Custom Search:**

- **Google's ranking** ([rank tracking](/blog/serp-tracking-api), ad checks, "what does Google show for this"): a Google SERP endpoint such as Keirolabs `/search/google`, Serper or DataForSEO.
- **Good web results for an app or agent:** a cheaper search endpoint such as Keirolabs `/search/lite` or Brave.
- **Search across a fixed list of sites** (the original Programmable Search use case): any of these with `site:` operators in the query.

For the bigger picture of what replaced Google's official APIs, read [Google Search API in 2026](/blog/google-search-apis-2026). Microsoft's equivalent shutdown is covered in [the Bing Search API replacement](/blog/bing-search-api-alternatives).

**Related reading:** [web search API comparison](/best-web-search-api)
