LiteLLM
Google PSE stops on January 1, 2027. The setting to change.
LiteLLM's google_pse search provider calls Google's Custom Search JSON API with GOOGLE_PSE_API_KEY and GOOGLE_PSE_ENGINE_ID. Google closed that API to new customers and ends it on January 1, 2027.
LiteLLM reads Google's address from one variable. Set GOOGLE_PSE_API_BASE=https://api.specstream.ai/customsearch/v1 and put a SpecStream key in GOOGLE_PSE_API_KEY. The same request goes out and the same JSON comes back; our test passed by this base.
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.
LiteLLM's Google PSE provider and what replaces it, from each company's own pages on Nov 10, 2026
| SpecStream | Google PSE | Tavily | Serper | |
|---|---|---|---|---|
| LiteLLM setting | GOOGLE_PSE_API_BASE=https://api.specstream.ai/customsearch/v1, or SEARXNG_API_BASE=https://api.specstream.ai/searxng/<key> | GOOGLE_PSE_API_KEY and GOOGLE_PSE_ENGINE_ID. GOOGLE_PSE_API_BASE defaults to https://www.googleapis.com/customsearch/v1 | TAVILY_API_KEY. TAVILY_API_BASE defaults to https://api.tavily.com | SERPER_API_KEY. SERPER_API_BASE defaults to https://google.serper.dev |
| Open to a new account | Yes. Create a key and start with $10 of credit, no card | No. Closed to new customers, and existing customers have until January 1, 2027 | Yes, with 1,000 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, for existing customers only | $0.008 a credit on pay as you go. A basic search is 1 credit and an advanced search 2 | $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 | 300 queries per second on the largest pack |
| 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 | Credits are valid for 6 months |
| What answers the search | The whole live web, read at the moment of the call, in Google's JSON. 97.9 F-score on all 1,000 SimpleQA Verified questions | The Programmable Search Engine you configured | Tavily's search. Its own post reports 97.6% on SimpleQA | Serper's search, bought in credit packs from 50,000 credits |
Why LiteLLM users point GOOGLE_PSE_API_BASE at SpecStream
The change is one variable
LiteLLM builds the Google PSE URL as api_base plus the query string, and takes api_base from GOOGLE_PSE_API_BASE when it is set. So the variable holds the whole endpoint, with /customsearch/v1 at the end.
# LiteLLM environment
GOOGLE_PSE_API_BASE=https://api.specstream.ai/customsearch/v1
GOOGLE_PSE_API_KEY=<YOUR_SPECSTREAM_KEY>
GOOGLE_PSE_ENGINE_ID=<keep your current value>LiteLLM refuses to search without GOOGLE_PSE_ENGINE_ID, so keep the value you have. SpecStream accepts cx and does not use it. This is the call LiteLLM then sends, with key, cx, q and num in the query string:
curl "https://api.specstream.ai/customsearch/v1?key=$SPECSTREAM_API_KEY&cx=$GOOGLE_PSE_ENGINE_ID&q=open+source+vector+databases&num=10"The same JSON, so LiteLLM's parser reads it
LiteLLM reads items[] and maps title, link to the result URL and snippet. SpecStream answers in Google's shape: kind customsearch#search, items[] with title, link, snippet and displayLink, searchInformation.totalResults and queries.nextPage. The same call from Python:
import os, requests
reply = requests.get(
"https://api.specstream.ai/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
Without a key, LiteLLM stops with GOOGLE_PSE_API_KEY is not set, and without an engine ID with GOOGLE_PSE_ENGINE_ID is not set. Google closed the API to new customers, so a new project gets no key to set. With GOOGLE_PSE_API_BASE at SpecStream, a SpecStream key fills GOOGLE_PSE_API_KEY and the search runs.
Or the SearXNG provider
LiteLLM's searxng provider reads SEARXNG_API_BASE and adds /search when the address does not end in it. Set it to SpecStream's SearXNG route with your key in the address; our test passed by this base too.
SEARXNG_API_BASE=https://api.specstream.ai/searxng/YOUR_SPECSTREAM_KEY$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 page.
About one second a search, measured under load
The Google route 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 LiteLLM 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 at $0.80 per 1,000 pages, and a page with no text is not charged. Deep Search 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 LiteLLM
Google PSE, until January 1, 2027
Existing customers can keep the default base 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, on the same provider.
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. SpecStream searches the whole live web behind the google_pse provider you already configured.
Tavily
Search billed in credits at $0.008 each on pay as you go, with 1,000 free credits a month that reset on the first day of each month. Moving to it means a new provider and a new reply shape. SpecStream keeps your provider and charges $0.005 a search.
Serper
Search sold in credit packs: $1.00 per 1,000 in the pack of 50,000, with credits valid for 6 months and 2,500 free queries to start. SpecStream credit never expires, and the google_pse provider stays as it is.
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 50 queries per second. SpecStream costs the same $5 per 1,000 and answers in the Google JSON your LiteLLM setup already reads.
How SpecStream scores
The same numbers as the benchmarks page, from the official tasks and scorers.
How to move LiteLLM's Google PSE provider to SpecStream
1. Create a key under Agents & API in the SpecStream workspace. A new account gets $10 of credit, no card, which covers 2,000 searches.
2. Check the key with the call LiteLLM will send. A 200 with items means LiteLLM gets the same.
curl "https://api.specstream.ai/customsearch/v1?key=$SPECSTREAM_API_KEY&cx=any&q=test&num=10"3. Where LiteLLM runs, set the base and the key, and keep GOOGLE_PSE_ENGINE_ID.
GOOGLE_PSE_API_BASE=https://api.specstream.ai/customsearch/v1
GOOGLE_PSE_API_KEY=<YOUR_SPECSTREAM_KEY>4. Restart LiteLLM and run a search through the google_pse provider as you do today. Each search shows up in your SpecStream request log with its price.
Frequently asked questions
Something we didn't answer? Talk to a human
Why is Google PSE not working in LiteLLM?
GOOGLE_PSE_API_BASE=https://api.specstream.ai/customsearch/v1 with a SpecStream key in GOOGLE_PSE_API_KEY and the provider works again.What is the best Google PSE alternative for LiteLLM?
What is GOOGLE_PSE_API_BASE in LiteLLM?
https://www.googleapis.com/customsearch/v1. It holds the whole endpoint, so set it to https://api.specstream.ai/customsearch/v1.Do I still need GOOGLE_PSE_ENGINE_ID?
cx and does not use it, and searches the whole live web.How much does LiteLLM web search cost with SpecStream?
Is Google Custom Search shutting down?
Sources
SpecStream wrote this page. LiteLLM's settings come from its source on GitHub, and each provider's figure from that company's own page.
- LiteLLM Google PSE provider, transformation.pygithub.com/BerriAI/litellm/blob/main/litellm/llms/google_pse/search/transformation.py, read Nov 10, 2026
- LiteLLM SearXNG provider, transformation.pygithub.com/BerriAI/litellm/blob/main/litellm/llms/searxng/search/transformation.py, read Nov 10, 2026
- LiteLLM Tavily provider, transformation.pygithub.com/BerriAI/litellm/blob/main/litellm/llms/tavily/search/transformation.py, read Nov 10, 2026
- LiteLLM Serper provider, transformation.pygithub.com/BerriAI/litellm/blob/main/litellm/llms/serper/search/transformation.py, read Nov 10, 2026
- LiteLLM docs, Google PSE searchdocs.litellm.ai/docs/search/google_pse, read Nov 10, 2026
- Google Custom Search JSON API overviewdevelopers.google.com/custom-search/v1/overview, read Nov 10, 2026
- Vertex AI Search pricingcloud.google.com/generative-ai-app-builder/pricing, read Nov 10, 2026
- Tavily API creditsdocs.tavily.com/documentation/api-credits.md, read Nov 10, 2026
- Tavily pricingtavily.com/pricing, read Nov 10, 2026
- Tavily, SealQA and SimpleQA posttavily.com/blog/tavily-ranks-1-on-sealqa-and-simpleqa, read Nov 10, 2026
- Serperserper.dev/, read Nov 10, 2026
- Brave Search APIbrave.com/search/api/, read Nov 10, 2026
- SpecStream benchmarksspecstream.ai/benchmarks, read Nov 10, 2026
- SpecStream pricingspecstream.ai/pricing, read Nov 10, 2026
- SpecStream for agentsspecstream.ai/agents.md, read Nov 10, 2026




