Skip to the page

LangChain

Google PSE stops on January 1, 2027. The setting to change.

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.

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

SpecStreamGoogleSearchAPIWrapperTavilyBrave Search APISerper
The LangChain wrapperSearxSearchWrapper(searx_host="https://api.specstream.ai/searxng/<key>/search"), or SEARX_HOST in the environmentGoogleSearchAPIWrapper, which builds Google's customsearch v1 client with your key and takes no addressThe community TavilySearchAPIWrapper fixes its address at https://api.tavily.comBraveSearchWrapper, with base_url set to https://api.search.brave.com/res/v1/web/search by defaultGoogleSerperAPIWrapper fixes its address at https://google.serper.dev
Open to a new accountYes. $10 of credit, no card, which covers 2,000 searchesNo. Closed to new customers, and existing customers have until January 1, 2027Yes. 1,000 credits a month, no cardYes. $5 in free credits every monthYes, 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
LimitNo daily limit. Up to 8,800 searches a minute on one account10,000 queries a dayOn a monthly plan, requests stop when the month's credits run outUp to 50 queries per second300 queries per second on the largest pack
What the wrapper reads backresults() returns snippet, title, link, engines and category for each result, from SearXNG's JSONSearch results with the URL, title and text snippets that describe each resulttitle, url, content and score for each resulttitle, link, and a snippet joined from description and extra_snippetsGoogle results as JSON from Serper's search
How long it lastsCredit you buy never expiresUntil January 1, 2027, when Google ends the APICredits reset on the first day of each month$5 in free credits every monthCredits are valid for 6 months

Why LangChain developers move GoogleSearchAPIWrapper to SpecStream

Other Google PSE alternatives for LangChain

How SpecStream scores

The same numbers as the benchmarks page, from the official tasks and scorers.

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

Something we didn't answer? Talk to a human

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.

  1. LangChain GoogleSearchAPIWrapper, google_search.pygithub.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/google_search.py, read Nov 10, 2026
  2. LangChain SearxSearchWrapper, searx_search.pygithub.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/searx_search.py, read Nov 10, 2026
  3. LangChain SearX tools, tool.pygithub.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/tools/searx_search/tool.py, read Nov 10, 2026
  4. LangChain TavilySearchAPIWrappergithub.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/tavily_search.py, read Nov 10, 2026
  5. LangChain BraveSearchWrappergithub.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/brave_search.py, read Nov 10, 2026
  6. LangChain GoogleSerperAPIWrappergithub.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/google_serper.py, read Nov 10, 2026
  7. Google Custom Search JSON API overviewdevelopers.google.com/custom-search/v1/overview, read Nov 10, 2026
  8. Google Custom Search JSON API, using RESTdevelopers.google.com/custom-search/v1/using_rest, read Nov 10, 2026
  9. Vertex AI Search pricingcloud.google.com/generative-ai-app-builder/pricing, read Nov 10, 2026
  10. Tavily API creditsdocs.tavily.com/documentation/api-credits.md, read Nov 10, 2026
  11. Tavily pricingtavily.com/pricing, read Nov 10, 2026
  12. Brave Search APIbrave.com/search/api/, read Nov 10, 2026
  13. Serperserper.dev/, read Nov 10, 2026
  14. SpecStream benchmarksspecstream.ai/benchmarks, read Nov 10, 2026
  15. SpecStream pricingspecstream.ai/pricing, read Nov 10, 2026
  16. SpecStream for agentsspecstream.ai/agents.md, read Nov 10, 2026