Web search in LangChain
Set SearxSearchWrapper's host to SpecStream.
LangChain's SearxSearchWrapper takes its address from searx_host or the environment variable SEARX_HOST, and SpecStream answers it. Our test on November 9, 2026 passed it with only that setting changed.
Set SEARX_HOST=https://api.specstream.ai/searxng/<key>/search, with your SpecStream key in place of <key>. The wrapper sends its request to that address as it is, so run(), results() and the SearxSearchResults tool work unchanged.
It is the most accurate web search API in the world: 97.9 F-score on all 1,000 SimpleQA Verified questions, at $5 per 1,000 searches. New accounts get $10 of credit, which covers 2,000 searches.
New accounts get $10 of credit, no card. It covers 2,000 searches.
SpecStream next to the search wrappers in langchain-community, from each company's own pages and LangChain's source on Nov 10, 2026
| SpecStream | Tavily | Brave Search API | Google Custom Search JSON API | Bing Web Search API | |
|---|---|---|---|---|---|
| The LangChain wrapper | SearxSearchWrapper(searx_host="https://api.specstream.ai/searxng/<key>/search"), or SEARX_HOST in the environment | 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 | GoogleSearchAPIWrapper, which builds Google's customsearch v1 client with your key | BingSearchAPIWrapper, with https://api.bing.microsoft.com/v7.0/search as its default endpoint |
| Can you start today | Yes. $10 of credit, no card, which covers 2,000 searches | Yes. 1,000 credits a month, no card | Yes. $5 in free credits every month | No. Closed to new customers, and existing customers have until January 1, 2027 | No. Microsoft retired the Bing Search APIs on August 11, 2025 |
| Price per 1,000 searches | $5, with up to 10 results a search | $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 | $5 per 1,000 queries after 100 free queries a day, up to 10,000 a day, for existing customers | Microsoft points to Grounding with Bing Search, at $14 per 1,000 transactions |
| What one call counts as | One search of up to 10 results at $0.005. A call stopped by a 429 charges nothing | Credits by the type of request: search, extract or crawl | One request, up to 50 queries per second | Its terms say you may be charged for each successful request | Grounding transactions are counted by the number of tool calls per run |
| What the wrapper reads back | results() returns snippet, title, link, engines and category for each result, from SearXNG's JSON | title, url, content and score for each result | title, link, and a snippet joined from description and extra_snippets | Search results with the URL, title and text snippets that describe each result | webPages.value, with the name, URL and snippet of each page |
| The text of a page | The Extract API reads any page, PDF, Word or Excel file at $0.80 per 1,000 pages, and a page with no text is not charged | Extract requests take credits | Answers cost $4 per 1,000 requests plus $5 per million input and output tokens | Text snippets that describe each result | On Grounding with Bing Search, developers and end users have no access to the raw content returned |
Why LangChain builders set SpecStream as their search
The setting is one address
SearxSearchWrapper reads searx_host or SEARX_HOST and sends a GET to that address with q and format=json, adding no path. So the address ends in /search, and the key goes in it as a path part.
export SEARX_HOST=https://api.specstream.ai/searxng/$SPECSTREAM_KEY/searchfrom langchain_community.utilities import SearxSearchWrapper
from langchain_community.tools.searx_search.tool import SearxSearchResults
search = SearxSearchWrapper(searx_host="https://api.specstream.ai/searxng/YOUR_SPECSTREAM_KEY/search")
for result in search.results("open source vector databases", num_results=5):
print(result["title"], result["link"], result["snippet"])
# the same wrapper as a tool for your agent
tool = SearxSearchResults(wrapper=search, num_results=5)The reply carries every field the wrapper reads: results[] with title, url, content, engines and category. The key also answers as the Basic password in the address (https://:<key>@api.specstream.ai/searxng/search), which our test passed for this wrapper too.
The call underneath, in plain Python
This is the request the wrapper makes. Run it once with your key and you see what your chain will read.
import requests
reply = requests.get(
"https://api.specstream.ai/searxng/YOUR_SPECSTREAM_KEY/search",
params={"q": "open source vector databases", "format": "json", "language": "en"},
).json()
for result in reply["results"]:
print(result["title"], result["url"], result["content"])A chain on Google or Bing moves to a search that is open
GoogleSearchAPIWrapper calls Google's Custom Search JSON API, which Google closed to new customers and ends on January 1, 2027. BingSearchAPIWrapper defaults to Microsoft's Bing Web Search API, retired on August 11, 2025. SearxSearchWrapper on SpecStream returns the same title, link and snippet for each result, from the whole live web, at $5 per 1,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 SearXNG 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 takes up to 8,800 searches a minute; a call over that gets a 429 with Retry-After and is not charged.
You decide what is kept, on each key
Create a key with zero_retention and a search made with it keeps no request text and no answer after the reply: not in the history, not in a log line. spend_cap_cents is the most the key can spend, so an agent in a loop stops at the cap you set.
curl -X POST https://api.specstream.ai/v1/account/keys \
-H "Authorization: Bearer $SPECSTREAM_API_KEY" -H "Content-Type: application/json" \
-d '{"name": "langchain", "scopes": ["account:read", "finds:spend"], "spend_cap_cents": 500000, "zero_retention": true}'Search, pages and rows on one key
A RAG chain needs the page after the search. The same key reads up to 20 pages or documents a call with the Extract API at $0.80 per 1,000 pages, and GET /v1/web-search with passages=true returns the text of the top pages closest to the question in the same call. Deep Search returns every match for a request in plain words as rows, at 5¢, 15¢ or $1 a row.
Other web search wrappers in LangChain
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. SearxSearchWrapper on 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, searches the whole live web, and scores 97.9 F-score on SimpleQA Verified.
Google Custom Search JSON API
$5 per 1,000 queries after 100 free a day, up to 10,000 a day, for existing customers only: Google closed it to new customers and ends it on January 1, 2027. SpecStream costs the same $5 per 1,000, takes new accounts today, and has no daily limit.
Serper
Google results as JSON, sold in credit packs from $50 for 50,000, valid for 6 months. GoogleSerperAPIWrapper fixes its address at https://google.serper.dev. SpecStream credit never expires, and a search is $5 per 1,000.
How SpecStream scores
The same numbers as the benchmarks page, from the official tasks and scorers.
How to set SpecStream as web search in LangChain
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_KEY/search?q=open+source+vector+databases&format=json"3. Set SEARX_HOST=https://api.specstream.ai/searxng/<key>/search where your app runs, or pass the same address as searx_host.
4. Keep SearxSearchWrapper, SearxSearchRun or SearxSearchResults in your chain or agent as it is. Each call is billed as one search on your key, inside the spending limit the key carries.
When your app needs a 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, quotes the most it can cost, and delivers the rows after you approve.
Frequently asked questions
Something we didn't answer? Talk to a human
What is the best web search tool for LangChain?
SearxSearchWrapper, at 97.9 F-score on all 1,000 SimpleQA Verified questions and $5 per 1,000 searches. Set SEARX_HOST=https://api.specstream.ai/searxng/<key>/search and the wrapper works unchanged.How do I add web search to a LangChain agent?
SearxSearchResults with a SearxSearchWrapper whose searx_host is https://api.specstream.ai/searxng/<key>/search. Our test on November 9, 2026 passed the wrapper with only that setting changed, and each search costs $0.005.Is there a free web search tool for LangChain?
Does LangChain's Google search tool still work?
GoogleSearchAPIWrapper calls. It is closed to new customers. SearxSearchWrapper on SpecStream returns the same title, link and snippet at the same $5 per 1,000 searches.Do I need to host SearXNG for SearxSearchWrapper?
searx_host to https://api.specstream.ai/searxng/<key>/search and SpecStream answers in SearXNG's JSON, at a median of 0.82 s a search on production.Where does the API key go in SearxSearchWrapper?
https://api.specstream.ai/searxng/<key>/search. The route also reads it as the Basic password in the address, from key=, from an X-API-Key header or as a Bearer token.Sources
SpecStream wrote this page. Each figure on another provider comes from that company's own page, and each LangChain setting from langchain-community's source on GitHub.
- langchain-community, SearxSearchWrappergithub.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/searx_search.py, read Nov 10, 2026
- langchain-community, Searx search toolsgithub.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/tools/searx_search/tool.py, read Nov 10, 2026
- langchain-community, Tavily wrappergithub.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/tavily_search.py, read Nov 10, 2026
- langchain-community, Brave wrappergithub.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/brave_search.py, read Nov 10, 2026
- langchain-community, Google wrappergithub.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/google_search.py, read Nov 10, 2026
- langchain-community, Bing wrappergithub.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/bing_search.py, read Nov 10, 2026
- langchain-community, Serper wrappergithub.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/google_serper.py, read Nov 10, 2026
- Tavily pricingtavily.com/pricing, read Nov 9, 2026
- Tavily search endpointdocs.tavily.com/documentation/api-reference/endpoint/search, read Nov 9, 2026
- Brave Search APIbrave.com/search/api/, read Nov 9, 2026
- Google Custom Search JSON API overviewdevelopers.google.com/custom-search/v1/overview, read Nov 9, 2026
- Google Custom Search JSON API, using RESTdevelopers.google.com/custom-search/v1/using_rest, read Nov 9, 2026
- Google Custom Search terms of servicedevelopers.google.com/custom-search/terms, read Nov 9, 2026
- Microsoft, Bing Search API retirementlearn.microsoft.com/en-us/lifecycle/announcements/bing-search-api-retirement, read Nov 9, 2026
- Grounding with Bing Search pricingmicrosoft.com/en-us/bing/apis/grounding-pricing, read Nov 9, 2026
- Grounding with Bing Search toolslearn.microsoft.com/en-us/azure/foundry/agents/how-to/tools/bing-tools, read Nov 9, 2026
- Serperserper.dev/, read Nov 9, 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




