# Google Custom Search API alternative for AI agents

> Google's Custom Search JSON API is closed to new customers, and existing customers have until January 1, 2027 to move ([Google](https://developers.google.com/custom-search/v1/overview)). Google points to Vertex AI Search for up to 50 domains and asks teams that need full web search to contact it. If your agent or app only needs web results as JSON, a web search API can take the same call. Clawifi is one: `POST /search/free` takes a query, domains, a time range, a country and a language, and returns up to 50 ranked results with title, URL and snippet. The Free plan has 1,000 credits a month with no card.

Canonical page: https://clawifi.dev/answers/google-custom-search-api-alternative

## What changes on January 1, 2027?

Google's overview page (last updated 19 November 2026) says the API is not available for new customers and that its pricing applies to existing customers only until the discontinuation on January 1, 2027: 100 queries a day free, then $5 per 1,000 queries, up to 10,000 a day. For search over up to 50 domains Google suggests Vertex AI Search; for full web search it offers a contact form ([source](https://developers.google.com/custom-search/v1/overview)). Bing's search API is already gone: Microsoft retired the Bing Search APIs on August 11, 2025 and points customers to its Grounding with Bing Search tool for agents ([source](https://learn.microsoft.com/en-us/lifecycle/announcements/bing-search-api-retirement)).

## How do Custom Search parameters map to Clawifi?

Most of a Custom Search call carries over one field at a time. The Custom Search column is from Google's [cse.list reference](https://developers.google.com/custom-search/v1/reference/rest/v1/cse/list); the Clawifi column is the [search docs](https://clawifi.dev/docs/search). There is no search engine ID to create: send the domains you limited the engine to as `include_domains`.

| Custom Search JSON API | Clawifi POST /search/free | Note |
| --- | --- | --- |
| `q` | `query` | Up to 500 characters. |
| `key` in the URL | `Authorization: Bearer` header | A [free API key](https://clawifi.dev/signup): the parameters in this table need one. |
| `cx` (search engine ID) | Not needed | Limit to sites with `include_domains` (up to 20) or drop sites with `exclude_domains` (up to 50). |
| `num` (at most 10) | `max_results` (1 to 50) | Default 10. |
| `start` (start + num at most 100) | No offset | Ask for up to 50 results in one call instead of paging. |
| `dateRestrict` (d, w, m, y and a number) | `time_range`: day, week, month or year | One period, no number. |
| `gl` (country) | `country` | Two letters, ISO 3166-1, such as `us`. |
| `lr` (such as `lang_en`) | `language` | Two letters, ISO 639-1, such as `en`. |
| `safe` | No field | There is no SafeSearch switch. |
| `items[].title`, `link`, `snippet` | `results[].title`, `url`, `snippet` | Each result also has `rank`, `provider` and, when the engine gives one, `published_at`. |

## What does the call look like before and after?

The same search in each: the query "model context protocol", ten results, the past month, results for the US in English. The Python client is `pip install clawifi`.

**Before: Custom Search JSON API**

```sh
curl "https://www.googleapis.com/customsearch/v1?key=$GOOGLE_API_KEY&cx=$SEARCH_ENGINE_ID&q=model+context+protocol&num=10&dateRestrict=m1&gl=us&lr=lang_en"
```

**After: Clawifi (cURL)**

```sh
curl -X POST https://api.clawifi.dev/search/free \
  -H "Authorization: Bearer $CLAWIFI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"model context protocol","max_results":10,"time_range":"month","country":"us","language":"en"}'
```

**After: Clawifi (Python)**

```python
from clawifi import Clawifi

client = Clawifi()  # reads CLAWIFI_API_KEY
result = client.search_free("model context protocol", max_results=10, time_range="month", country="us", language="en")
for r in result["results"]:
    print(r["rank"], r["title"], r["url"])
```

## What is different after the move?

The results are not Google's ranking: Clawifi asks several web engines and the [Clawifi Index](https://clawifi.dev/clawifi-index) at once and merges them by rank, so the order will differ. Not every engine supports every filter; `filters_applied` in the response says, per engine, whether a filter was applied natively, after the fact or skipped. With a time range, for example, the Clawifi Index is skipped and the response says so in `errors`. A search that finds nothing costs 0, and an identical request within 60 seconds is answered from cache for 0. When the agent needs the pages and not only the links, [POST /search/content](https://clawifi.dev/docs/search) searches and reads the top results in one call, and [fetch](https://clawifi.dev/docs/fetch) reads a single URL.

## What does it cost?

A search costs 1 credit. The Free plan is $0 with 1,000 credits a month and no card; the paid plans are Starter at $19 a month (10,000 credits), Pro at $99 a month (125,000 credits), and Scale at $299 a month (500,000 credits). Agents can also try `search_free` on the [hosted MCP server](https://clawifi.dev/docs/remote-mcp) without a key, 50 calls a day per address; a call without a key returns a few results and ignores the filters above. Full prices are on [Pricing](https://clawifi.dev/pricing).

## Questions

### When does the Google Custom Search JSON API stop working?

On January 1, 2027. Google's overview page says existing customers have until then to move, and that the API is closed to new customers ([source](https://developers.google.com/custom-search/v1/overview)).

### Can I still sign up for the Custom Search JSON API?

No. Google's page says the API is not available for new customers. It suggests Vertex AI Search for up to 50 domains and a contact form for full web search ([source](https://developers.google.com/custom-search/v1/overview)).

### Does Clawifi return the same results as Google?

No. Clawifi merges several web engines and its own index by rank, so the order differs from Google's. The engine families are listed on [Sources](https://clawifi.dev/sources).

### Is there a replacement for the Bing Search API too?

Yes, the same call. Microsoft retired the Bing Search APIs on August 11, 2025 ([source](https://learn.microsoft.com/en-us/lifecycle/announcements/bing-search-api-retirement)); any web search API that returns results as JSON, Clawifi included, can take that call.

### Which other search APIs should I look at?

Serper and SerpApi return Google-style results as JSON, Brave Search API has its own index, and Exa, Parallel and Tavily return page contents too. Each is compared, with sourced and dated facts, in [Best web search API for AI agents?](https://clawifi.dev/answers/best-web-search-api-for-ai-agents) and on [Compare](https://clawifi.dev/compare).

## Key facts

- Custom Search JSON API: closed to new customers, discontinued January 1, 2027 (Google)
- Clawifi search: up to 50 results a call, 1 credit a search
- Free plan: 1,000 credits a month, no card

## Related answers

- [What is Clawifi?](https://clawifi.dev/answers/what-is-clawifi): Clawifi is web access for AI agents: it searches many engines as one, reads pages and PDFs, and returns the passages that answer, over MCP or HTTP.
- [Web access for agents](https://clawifi.dev/answers/agent-native-internet-gateway): What web access for AI agents means: one layer that searches, reads pages and PDFs, and returns sourced passages an agent can use, with the cost shown.
- [Scraper comparison](https://clawifi.dev/answers/clawifi-vs-scrapers-and-serp-apis): How Clawifi differs from scrapers and SERP APIs: it searches, reads pages and PDFs, returns sourced passages, and reports pages it could not read.
- [All answers](https://clawifi.dev/answers): Every answer on one page.

Next: [Docs](https://clawifi.dev/docs) · [Pricing](https://clawifi.dev/pricing) · [Playground](https://clawifi.dev/playground)
