<!-- twin of https://specstream.ai/google-custom-search-api-vs-serpapi -->
# Custom Search API vs SerpApi: keep your code and change one line

Compared on Nov 10, 2026. The page: https://specstream.ai/google-custom-search-api-vs-serpapi

Google ends the Custom Search JSON API on January 1, 2027, and it is already closed to new customers. SerpApi starts at $25 a month for 1,000 searches and answers in its own JSON, so the request and the parser both change.

SpecStream answers the Custom Search call itself. Change `https://www.googleapis.com` to `https://api.specstream.ai`, put a SpecStream key in `key=`, and the same path returns the same JSON, at $5 per 1,000 searches with no daily limit.

It is the most accurate web search API in the world: 97.9 F-score on all 1,000 SimpleQA Verified questions and 64.0 item F1 on all 200 WideSearch tasks, shown on the [benchmarks](https://specstream.ai/benchmarks?utm_source=alternatives&utm_campaign=google-custom-search-api-vs-serpapi) page.

[Get an API key](https://specstream.ai/signup?src=alternatives-google-custom-search-api-vs-serpapi&utm_source=alternatives-md&utm_campaign=google-custom-search-api-vs-serpapi&returnTo=%2Fworkspace%2Fsearch%3Froute%3Dgoogle) New accounts get $10 of credit, no card. It covers 2,000 searches.

## SpecStream, Google Custom Search JSON API and SerpApi side by side

| | SpecStream | Google Custom Search JSON API | SerpApi |
|---|---|---|---|
| Your Custom Search code | Runs as it is. The base address `https://api.specstream.ai` in place of `https://www.googleapis.com` or `https://customsearch.googleapis.com`, and a SpecStream key in `key=` | Closed to new customers. Existing customers have until January 1, 2027, when Google discontinues the service | Rewritten for `GET https://serpapi.com/search?engine=google`, with SerpApi's key and parameters |
| The reply | Google's JSON: `kind` `customsearch#search`, `items[]` with `title`, `link`, `snippet`, `displayLink`, `htmlTitle`, `htmlSnippet` and `formattedUrl`, `searchInformation.totalResults` and `queries.nextPage`. Your parser reads it unchanged | Metadata about the search and the engine, and an `items` array with the URL, title and text snippets of each result, in JSON | `search_metadata`, `organic_results` with `position`, `title`, `link` and `snippet`, `related_questions` and `serpapi_pagination`. Your parser reads new field names |
| Price per 1,000 searches | $5. A call of up to 10 results is one search at $0.005, on every plan | $5 per 1,000 queries after 100 free queries a day, for existing customers | $25 on Starter (1,000 searches for $25 a month), $15 on Developer (5,000 for $75), $10 on Production (15,000 for $150) |
| Volume | No daily limit. The fast search takes up to 8,800 searches a minute on one account | 10,000 queries a day | Guaranteed successful searches an hour: 200 on Starter, 1,000 on Developer, 3,000 on Production |
| Results per call | Up to 10 on the Custom Search route. Up to 100 on `GET /v1/web-search` with `num`, for $0.059 | 1 to 10 results a call. Never more than 100 results for a query | A response with 100 results counts as 1 search |
| What answers the call | The whole live web, read at the moment of the call. 97.9 F-score on all 1,000 SimpleQA Verified questions (978 correct) and 64.0 item F1 on all 200 WideSearch tasks | The Programmable Search Engine you configured under `cx` | Google, through `engine=google`. 97.6% on SimpleQA Verified in SerpApi's own post of Oct 16, 2026, on 937 of the 960 questions it kept |
| Failed calls | A `429` with `Retry-After` charges nothing. With an `Idempotency-Key`, a retried call is charged once | Its terms say you may be charged for each successful request, and that Google can change fees with 90 days notice | Cached, errored and failed searches are not counted |
| Free to start | $10 of credit, no card. That is 2,000 searches, or up to 200 rows at 5¢ | 100 queries a day, for existing customers | 250 searches a month on the Free plan |
| Every match as structured rows | Deep Search: a request in plain words returns every match on the live web as rows that meet each condition you wrote, at 5¢, 15¢ or $1 a row, plus 5¢ for an email and 15¢ for a phone. The most a run can cost is quoted before it starts, and nothing runs until you approve it | Stops at the first 100 results of a query | One results page per call, with `serpapi_pagination` for the next one |

## Why Custom Search users move to SpecStream

### The whole migration is one line

Your code keeps its path, its parameters and its parser. The address changes, and the key.

```
# Before
curl "https://www.googleapis.com/customsearch/v1?key=$GOOGLE_KEY&cx=$CX&q=open+source+vector+databases"

# After
curl "https://api.specstream.ai/customsearch/v1?key=$SPECSTREAM_KEY&cx=$CX&q=open+source+vector+databases"
```

Moving to SerpApi means a new request to `serpapi.com/search` and a parser that reads `organic_results` in place of `items`. On SpecStream there is nothing to map.

### What stays the same

`GET /customsearch/v1` reads `q`, `num` from 1 to 10 and `start`, and `queries.nextPage` gives the next `start`. `exactTerms`, `orTerms`, `siteSearch` and `hq` shape the search as they do on Google. `cx` is accepted and not used, because SpecStream searches the whole live web. The key works in `key=`, in the `X-Goog-Api-Key` header or as a Bearer token.

### The most accurate web search API in the world

The SpecStream Search API scores a 97.9 F-score on all 1,000 official SimpleQA Verified questions, with 978 correct. On WideSearch it scores 64.0 item F1 and 43.4 row F1 on all 200 official tasks, and the Extract API scores 0.908 F1 on WCXB. SerpApi's own post reports 97.6% on the same benchmark, on the 960 questions it kept after setting 40 aside. The scores and the method are at [specstream.ai/benchmarks](https://specstream.ai/benchmarks?utm_source=alternatives&utm_campaign=google-custom-search-api-vs-serpapi).

### $5 per 1,000 searches from top-ups that do not expire

Google's paid rate is $5 per 1,000 queries and it stops at 10,000 a day. SpecStream charges the same $5 per 1,000 with no daily limit: 10,000 searches a day cost $50. On SerpApi's Production plan 15,000 searches cost $150 a month, $10 per 1,000, and the searches belong to that month. A SpecStream top-up never expires, and a call stopped by a `429` charges nothing.

### About one second a search, at up to 8,800 a minute

Every results list route runs the fast search unless the call asks for page text or results past the first ten. On November 9, 2026 production took 1 to 20 fast searches a second and answered 718 of 720: the median was 0.82 s at 1 search a second and 1.07 s at 20 a second, and the 95th percentile stayed between 1.09 and 1.73 s. One account takes up to 8,800 searches a minute, and a call over that gets a `429` with `Retry-After` and is not charged.

### Zero retention on any key

Set `zero_retention` when you create a key, or later. A search made with that key keeps no request text and no answer after the reply: it is not in the history, its answer is not reused for another call, and its log lines carry neither. The charge keeps the account, the key, the request ID, the price and the time.

```
curl -X POST https://api.specstream.ai/v1/account/keys \
  -H "Authorization: Bearer $SPECSTREAM_API_KEY" -H "Content-Type: application/json" \
  -d '{"name": "production", "scopes": ["account:read", "finds:spend"], "spend_cap_cents": 500000, "zero_retention": true}'
```

### Search, pages and rows on one key

A product that calls Custom Search still has to read the pages and build its own records. On SpecStream the same key reads up to 20 pages or documents a call with the [Extract API](https://specstream.ai/extract-api?utm_source=alternatives&utm_campaign=google-custom-search-api-vs-serpapi) at $0.80 per 1,000 pages, and runs [Deep Search](https://specstream.ai/deep-search?utm_source=alternatives&utm_campaign=google-custom-search-api-vs-serpapi), which returns every match on the live web as structured rows at 5¢, 15¢ or $1 a row. 10,000 rows with 5 facts each cost $500, and the most a run can cost is approved before it starts. Save a request and it reruns hourly to yearly, with each row labeled changed, unchanged or no longer matching.

## Other options when Custom Search ends

### Vertex AI Search (Agent Search)

Google's own suggestion on the Custom Search page, for searching up to 50 domains. Search Standard costs $1.50 per 1,000 queries and Search Enterprise $4.00, with 10,000 free queries a month, on a new endpoint, `POST https://discoveryengine.googleapis.com/v1/...:search`. For full web search Google asks you to contact it. SpecStream searches the whole live web on the path your code already calls.

### Grounding with Google Search in the Gemini API

A Gemini model searches Google and writes the answer. On Gemini 3 and newer it costs $14 per 1,000 search requests after 5,000 free a month, and it returns the model's answer with citations, not a result list. A SpecStream call returns the answer with its page and every result in rank order, for $0.005.

### SerpApi

Google results pages as JSON, by monthly plan: Starter at $25 for 1,000 searches, Developer at $75 for 5,000, Production at $150 for 15,000. The request and the reply follow SerpApi's own format. On SpecStream $25 pays for 5,000 searches in the Custom Search format your code already reads.

### Serper

Google results sold as prepaid credits with no monthly subscription, from $1.00 per 1,000 on the 50k pack. The first 2,500 queries are free, no credit card. SpecStream answers Serper's own call at `https://api.specstream.ai/serper/search`, in Serper's JSON, for $5 per 1,000 searches.

## How to switch from Custom Search to SpecStream

1. Create a key under Agents & API in the workspace. A new account gets $10 of credit, no card, which covers 2,000 searches.

2. Set the base address to `https://api.specstream.ai` where your code has `https://www.googleapis.com` or `https://customsearch.googleapis.com`, and send the SpecStream key in `key=`.

```
import requests

BASE = "https://api.specstream.ai"  # was https://www.googleapis.com

reply = requests.get(
    f"{BASE}/customsearch/v1",
    params={"key": SPECSTREAM_KEY, "cx": CX, "q": "open source vector databases", "num": 10},
).json()

for item in reply["items"]:
    print(item["title"], item["link"], item["snippet"])
```

```
const url = new URL("https://api.specstream.ai/customsearch/v1"); // was https://www.googleapis.com
url.searchParams.set("key", process.env.SPECSTREAM_API_KEY);
url.searchParams.set("q", "open source vector databases");
url.searchParams.set("num", "10");

const reply = await fetch(url).then((r) => r.json());
for (const item of reply.items) console.log(item.title, item.link, item.snippet);
```

3. Leave the rest. `q`, `num` and `start` work as before, and `cx` is accepted and not used. Each call is billed as one search at $0.005, and the key carries the spending limit you give it.

When your product needs the whole dataset in place of a results page, write the request in plain words. SpecStream reads it back as the conditions every row must meet and the facts to bring back, quotes the most it can cost, and delivers the rows after you approve.

## Frequently asked questions

### Google Custom Search API vs SerpApi: which is better?

For code written for Custom Search, SpecStream: it answers the same `GET /customsearch/v1` call after January 1, 2027, at $5 per 1,000 searches. Custom Search ends on that date, and SerpApi needs a new request and a new parser at $25 per 1,000 on Starter.

### Is Google's Custom Search JSON API being discontinued?

Yes, on January 1, 2027. Google's overview page says the API is closed to new customers, and that existing customers have until that date to move to another solution.

### How much do Custom Search and SerpApi cost?

Custom Search costs $5 per 1,000 queries after 100 free a day, up to 10,000 a day, for existing customers. SerpApi costs $25 a month for 1,000 searches on Starter and $150 for 15,000 on Production. SpecStream costs $5 per 1,000 searches with no daily limit.

### Does SerpApi return the same JSON as Custom Search?

No. SerpApi returns `organic_results` with `position`, `title`, `link` and `snippet`, where Custom Search returns `items[]`. SpecStream's route returns Custom Search's `items[]`, `searchInformation` and `queries`, so your parser stays as it is.

### Do I still need a search engine ID (cx)?

No. `cx` is accepted and not used, so a request that sends it works unchanged. SpecStream searches the whole live web, and `siteSearch` keeps a search to one site.

### What does Google recommend in place of Custom Search?

Vertex AI Search, for up to 50 domains, at $1.50 per 1,000 queries on Search Standard. For full web search, Google's page asks you to contact it. SpecStream searches the whole live web today, on the Custom Search path.

### What does it cost to move 10,000 searches a day?

$50 a day at $5 per 1,000 searches of up to 10 results. A call stopped by a `429` is not charged, and the first $10 of credit covers 2,000 searches. Every rate is on the [pricing](https://specstream.ai/pricing?utm_source=alternatives&utm_campaign=google-custom-search-api-vs-serpapi) page.

## Sources

SpecStream wrote this page. Each figure for Google and SerpApi comes from that company's own page.

- [Google Custom Search JSON API overview](https://developers.google.com/custom-search/v1/overview), read Nov 9, 2026
- [Google Custom Search JSON API reference, cse.list](https://developers.google.com/custom-search/v1/reference/rest/v1/cse/list), read Nov 9, 2026
- [Google Custom Search JSON API, using REST](https://developers.google.com/custom-search/v1/using_rest), read Nov 9, 2026
- [Google Custom Search terms of service](https://developers.google.com/custom-search/terms), read Nov 9, 2026
- [Agent Search (Vertex AI Search) pricing](https://cloud.google.com/generative-ai-app-builder/pricing), read Nov 9, 2026
- [Agent Search search method](https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.engines.servingConfigs/search), read Nov 9, 2026
- [Grounding with Google Search, Gemini API](https://ai.google.dev/gemini-api/docs/google-search), read Nov 9, 2026
- [SerpApi pricing](https://serpapi.com/pricing), read Nov 9, 2026
- [SerpApi Google Search API](https://serpapi.com/search-api), read Nov 9, 2026
- [SerpApi on SimpleQA Verified](https://serpapi.com/blog/serpapi-achieves-97-6-accuracy-on-simpleqa-verified/), read Nov 9, 2026
- [Serper homepage and pricing](https://serper.dev/), read Nov 9, 2026
- [SpecStream pricing](https://specstream.ai/pricing), read Nov 9, 2026
- [SpecStream for agents](https://specstream.ai/agents.md), read Nov 9, 2026
- [SpecStream benchmarks](https://specstream.ai/benchmarks), read Nov 9, 2026
- [SpecStream data](https://specstream.ai/data), read Nov 9, 2026
- [SpecStream signals](https://specstream.ai/signals), read Nov 9, 2026
