<!-- twin of https://specstream.ai/google-pse/langchain -->
# LangChain: Google PSE stops on January 1, 2027. The setting to change

Compared on Nov 10, 2026. The page: https://specstream.ai/google-pse/langchain

LangChain's `GoogleSearchAPIWrapper` calls Google's Custom Search JSON API with `GOOGLE_API_KEY` and `GOOGLE_CSE_ID`. Google closed that API to new customers and ends it on January 1, 2027, and the wrapper takes no address of its own.

Use `SearxSearchWrapper` with `searx_host="https://api.specstream.ai/searxng/YOUR_KEY/search"`, which passed our test. Code that calls Google's address itself changes one host: `https://api.specstream.ai/customsearch/v1` answers in Google's JSON.

SpecStream scores 97.9 F-score on all 1,000 SimpleQA Verified questions and costs $5 per 1,000 searches, with no daily limit. A new account gets $10 of credit, no card, which covers 2,000 searches.

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

## LangChain's Google wrapper and what replaces it, from each company's own pages on Nov 10, 2026

| | SpecStream | GoogleSearchAPIWrapper | Tavily | Brave Search API | Serper |
|---|---|---|---|---|---|
| The LangChain wrapper | `SearxSearchWrapper(searx_host="https://api.specstream.ai/searxng/<key>/search")`, or `SEARX_HOST` in the environment | `GoogleSearchAPIWrapper`, which builds Google's `customsearch` v1 client with your key and takes no address | The community `TavilySearchAPIWrapper` fixes its address at `https://api.tavily.com` | `BraveSearchWrapper`, with `base_url` set to `https://api.search.brave.com/res/v1/web/search` by default | `GoogleSerperAPIWrapper` fixes its address at `https://google.serper.dev` |
| Open to a new account | Yes. $10 of credit, no card, which covers 2,000 searches | No. Closed to new customers, and existing customers have until January 1, 2027 | Yes. 1,000 credits a month, no card | Yes. $5 in free credits every month | Yes, with 2,500 free queries |
| Price per 1,000 searches | $5, with up to 10 results a search | $5 per 1,000 queries after 100 free queries a day, up to 10,000 a day, for existing customers | $0.008 a credit on pay as you go. A basic search takes 1 credit and an advanced search 2 | $5 per 1,000 requests | $1.00 per 1,000 in the pack of 50,000 credits |
| Limit | No daily limit. Up to 8,800 searches a minute on one account | 10,000 queries a day | On a monthly plan, requests stop when the month's credits run out | Up to 50 queries per second | 300 queries per second on the largest pack |
| What the wrapper reads back | `results()` returns `snippet`, `title`, `link`, `engines` and `category` for each result, from SearXNG's JSON | Search results with the URL, title and text snippets that describe each result | `title`, `url`, `content` and `score` for each result | `title`, `link`, and a `snippet` joined from `description` and `extra_snippets` | Google results as JSON from Serper's search |
| How long it lasts | Credit you buy never expires | Until January 1, 2027, when Google ends the API | Credits reset on the first day of each month | $5 in free credits every month | Credits are valid for 6 months |

## Why LangChain developers move GoogleSearchAPIWrapper to SpecStream

### The change is a few lines of Python

`GoogleSearchAPIWrapper` builds Google's own client and has no setting for the address. `SearxSearchWrapper` reads `searx_host` or `SEARX_HOST` and sends a `GET` to that address with `q` and `format=json`, adding no path. SpecStream answers it, so the address ends in `/search` and the key goes in it.

```
# Before
from langchain_community.utilities import GoogleSearchAPIWrapper
search = GoogleSearchAPIWrapper()  # GOOGLE_API_KEY, GOOGLE_CSE_ID

# After
from langchain_community.utilities import SearxSearchWrapper
search = SearxSearchWrapper(searx_host="https://api.specstream.ai/searxng/YOUR_SPECSTREAM_KEY/search")

print(search.run("open source vector databases"))
for result in search.results("open source vector databases", num_results=5):
    print(result["title"], result["link"], result["snippet"])
```

`run()` returns a text answer and `results()` returns `title`, `link` and `snippet` for each result, the same three fields `GoogleSearchAPIWrapper.results()` gave your chain. The `SearxSearchResults` tool wraps it for an agent.

### Code that calls Google's address changes one host

If your code calls the Custom Search JSON API itself, keep the path, the parameters and the parser. Change the host and the key. `cx` is accepted and not used, and the reply is Google's JSON: `items[]` with `title`, `link` and `snippet`, `searchInformation` and `queries.nextPage`.

```
import os, requests

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

reply = requests.get(
    f"{BASE}/customsearch/v1",
    params={"key": os.environ["SPECSTREAM_API_KEY"], "cx": "any", "q": "open source vector databases", "num": 10},
).json()

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

### What you see when the Google key fails

The wrapper sends each search through `cse.list(...).execute()`, so a key Google refuses raises the HTTP error of Google's client inside your chain or agent. Google closed the API to new customers, so a new project gets no key for `GOOGLE_API_KEY`. `SearxSearchWrapper` on SpecStream needs no Google key at all.

### $5 per 1,000 searches, with no daily limit

A search of up to 10 results costs $0.005, and each started block of 10 more results adds $0.006. There is no monthly plan and no daily limit. Credit you buy never expires, and a new account starts with $10 of credit, which covers 2,000 searches.

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

On SimpleQA Verified the SpecStream Search API scores 97.9 F-score on all 1,000 official questions, 978 of them correct. On WideSearch it scores 64.0 item F1 and 43.4 row F1 on all 200 official tasks. The Extract API scores 0.908 F1 on WCXB. Every score and its method is on the [benchmarks](https://specstream.ai/benchmarks?utm_source=alternatives&utm_campaign=google-pse-langchain) page.

### About one second a search, measured under load

The SearXNG and Google routes runs on the fast search. On November 9, 2026 production took 1, 5, 10 and 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 can send up to 8,800 searches a minute; a call over that is answered with `Retry-After` and is not charged.

### You decide what is kept, on each key

Give your LangChain app a key with `zero_retention` and a search made with it keeps no request text and no answer after the reply. The charge keeps the account, the key, the request ID, the price and the time. `spend_cap_cents` is the most the key can spend.

```
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

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-pse-langchain) at $0.80 per 1,000 pages, and a page with no text is not charged. [Deep Search](https://specstream.ai/deep-search?utm_source=alternatives&utm_campaign=google-pse-langchain) takes a request in plain words and returns every match on the live web as structured rows, at 5¢, 15¢ or $1 a row, with a source URL on every value. The most a run can cost is quoted before it starts.

## Other Google PSE alternatives for LangChain

### GoogleSearchAPIWrapper, until January 1, 2027

Existing customers can keep the wrapper until Google ends the API: $5 per 1,000 queries after 100 free a day, up to 10,000 a day. A new project gets no key. SpecStream costs the same $5 per 1,000 with no daily limit.

### Vertex AI Search

Google's named alternative, for searching up to 50 domains, at $1.50 per 1,000 queries on Standard and $4.00 on Enterprise. For full web search Google asks you to contact it. `SearxSearchWrapper` on SpecStream searches the whole live web.

### Tavily

A search API billed in credits: $0.008 a credit on pay as you go, 1 credit for a basic search and 2 for an advanced one, with 1,000 free credits a month. The community wrapper fixes its address at `https://api.tavily.com`. SpecStream searches at $0.005 a call.

### Brave Search API

A search API on Brave's own index at $5 per 1,000 requests, with $5 in free credits every month and up to 50 queries per second. SpecStream costs the same $5 per 1,000 and scores 97.9 F-score on SimpleQA Verified.

### Serper

Google results as JSON, sold in credit packs at $1.00 per 1,000 in the pack of 50,000, valid for 6 months. `GoogleSerperAPIWrapper` fixes its address at `https://google.serper.dev`. SpecStream credit never expires.

## How to move a LangChain app from Google 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. Check the key with the request the wrapper will send.

```
curl "https://api.specstream.ai/searxng/$SPECSTREAM_API_KEY/search?q=open+source+vector+databases&format=json"
```

3. Replace `GoogleSearchAPIWrapper()` with `SearxSearchWrapper(searx_host=...)`, or set `SEARX_HOST=https://api.specstream.ai/searxng/<key>/search` where your app runs. Remove `GOOGLE_API_KEY` and `GOOGLE_CSE_ID`.

4. Keep `run()`, `results()` and your agent's tool list as they are. Each call is billed as one search on your key, inside the spending limit the key carries.

## Frequently asked questions

### Why is GoogleSearchAPIWrapper not working in LangChain?

Google closed the Custom Search JSON API to new customers and ends it on January 1, 2027. A new project gets no key, and `execute()` raises Google's error. Use `SearxSearchWrapper` with `searx_host` at SpecStream and search works again.

### What is the best GoogleSearchAPIWrapper alternative?

`SearxSearchWrapper` on SpecStream, at $5 per 1,000 searches with no daily limit and 97.9 F-score on all 1,000 SimpleQA Verified questions. It returns `title`, `link` and `snippet` for each result, as the Google wrapper did.

### Can I change the Google address in GoogleSearchAPIWrapper?

No. The wrapper calls `build("customsearch", "v1", developerKey=...)` and passes no address. Switch to `SearxSearchWrapper`, or, in code that calls Google's REST address itself, set the host to `https://api.specstream.ai`.

### What replaces GOOGLE_API_KEY and GOOGLE_CSE_ID in LangChain?

One variable: `SEARX_HOST=https://api.specstream.ai/searxng/YOUR_SPECSTREAM_KEY/search`. There is no engine ID, because SpecStream searches the whole live web.

### How much does LangChain web search cost with SpecStream?

$0.005 a search of up to 10 results, or $5 per 1,000. Credit you buy never expires, and the first $10 of credit covers 2,000 searches.

### Does SpecStream answer the Google Custom Search JSON API?

Yes. `GET https://api.specstream.ai/customsearch/v1?key=...&q=...` answers in Google's JSON with `items[]`, `searchInformation` and `queries.nextPage`, at $5 per 1,000 searches.

## Sources

SpecStream wrote this page. LangChain's code comes from its source on GitHub, and each provider's figure from that company's own page.

- [LangChain GoogleSearchAPIWrapper, google_search.py](https://github.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/google_search.py), read Nov 10, 2026
- [LangChain SearxSearchWrapper, searx_search.py](https://github.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/searx_search.py), read Nov 10, 2026
- [LangChain SearX tools, tool.py](https://github.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/tools/searx_search/tool.py), read Nov 10, 2026
- [LangChain TavilySearchAPIWrapper](https://github.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/tavily_search.py), read Nov 10, 2026
- [LangChain BraveSearchWrapper](https://github.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/brave_search.py), read Nov 10, 2026
- [LangChain GoogleSerperAPIWrapper](https://github.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/google_serper.py), read Nov 10, 2026
- [Google Custom Search JSON API overview](https://developers.google.com/custom-search/v1/overview), read Nov 10, 2026
- [Google Custom Search JSON API, using REST](https://developers.google.com/custom-search/v1/using_rest), read Nov 10, 2026
- [Vertex AI Search pricing](https://cloud.google.com/generative-ai-app-builder/pricing), read Nov 10, 2026
- [Tavily API credits](https://docs.tavily.com/documentation/api-credits.md), read Nov 10, 2026
- [Tavily pricing](https://tavily.com/pricing), read Nov 10, 2026
- [Brave Search API](https://brave.com/search/api/), read Nov 10, 2026
- [Serper](https://serper.dev/), read Nov 10, 2026
- [SpecStream benchmarks](https://specstream.ai/benchmarks), read Nov 10, 2026
- [SpecStream pricing](https://specstream.ai/pricing), read Nov 10, 2026
- [SpecStream for agents](https://specstream.ai/agents.md), read Nov 10, 2026
