Skip to the page

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

SpecStreamTavilyBrave Search APIGoogle Custom Search JSON APIBing Web Search API
The LangChain wrapperSearxSearchWrapper(searx_host="https://api.specstream.ai/searxng/<key>/search"), or SEARX_HOST in the environmentThe 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 defaultGoogleSearchAPIWrapper, which builds Google's customsearch v1 client with your keyBingSearchAPIWrapper, with https://api.bing.microsoft.com/v7.0/search as its default endpoint
Can you start todayYes. $10 of credit, no card, which covers 2,000 searchesYes. 1,000 credits a month, no cardYes. $5 in free credits every monthNo. Closed to new customers, and existing customers have until January 1, 2027No. 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 customersMicrosoft points to Grounding with Bing Search, at $14 per 1,000 transactions
What one call counts asOne search of up to 10 results at $0.005. A call stopped by a 429 charges nothingCredits by the type of request: search, extract or crawlOne request, up to 50 queries per secondIts terms say you may be charged for each successful requestGrounding transactions are counted by the number of tool calls per run
What the wrapper reads backresults() returns snippet, title, link, engines and category for each result, from SearXNG's JSONtitle, url, content and score for each resulttitle, link, and a snippet joined from description and extra_snippetsSearch results with the URL, title and text snippets that describe each resultwebPages.value, with the name, URL and snippet of each page
The text of a pageThe 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 chargedExtract requests take creditsAnswers cost $4 per 1,000 requests plus $5 per million input and output tokensText snippets that describe each resultOn Grounding with Bing Search, developers and end users have no access to the raw content returned

Why LangChain builders set SpecStream as their search

Other web search wrappers in LangChain

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?
SpecStream through 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?
Give the 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?
New SpecStream accounts get $10 of credit, no card, which covers 2,000 searches. After that a search is $0.005, with no monthly plan, and credit you buy never expires.
Does LangChain's Google search tool still work?
Only for existing customers until January 1, 2027, when Google ends the Custom Search JSON API that 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?
No. Set 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?
In the address, as its path part: 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.

  1. langchain-community, SearxSearchWrappergithub.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/searx_search.py, read Nov 10, 2026
  2. 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
  3. langchain-community, Tavily wrappergithub.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/tavily_search.py, read Nov 10, 2026
  4. langchain-community, Brave wrappergithub.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/brave_search.py, read Nov 10, 2026
  5. langchain-community, Google wrappergithub.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/google_search.py, read Nov 10, 2026
  6. langchain-community, Bing wrappergithub.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/bing_search.py, read Nov 10, 2026
  7. langchain-community, Serper wrappergithub.com/langchain-ai/langchain-community/blob/main/libs/community/langchain_community/utilities/google_serper.py, read Nov 10, 2026
  8. Tavily pricingtavily.com/pricing, read Nov 9, 2026
  9. Tavily search endpointdocs.tavily.com/documentation/api-reference/endpoint/search, read Nov 9, 2026
  10. Brave Search APIbrave.com/search/api/, read Nov 9, 2026
  11. Google Custom Search JSON API overviewdevelopers.google.com/custom-search/v1/overview, read Nov 9, 2026
  12. Google Custom Search JSON API, using RESTdevelopers.google.com/custom-search/v1/using_rest, read Nov 9, 2026
  13. Google Custom Search terms of servicedevelopers.google.com/custom-search/terms, read Nov 9, 2026
  14. Microsoft, Bing Search API retirementlearn.microsoft.com/en-us/lifecycle/announcements/bing-search-api-retirement, read Nov 9, 2026
  15. Grounding with Bing Search pricingmicrosoft.com/en-us/bing/apis/grounding-pricing, read Nov 9, 2026
  16. Grounding with Bing Search toolslearn.microsoft.com/en-us/azure/foundry/agents/how-to/tools/bing-tools, read Nov 9, 2026
  17. Serperserper.dev/, read Nov 9, 2026
  18. SpecStream benchmarksspecstream.ai/benchmarks, read Nov 10, 2026
  19. SpecStream pricingspecstream.ai/pricing, read Nov 10, 2026
  20. SpecStream for agentsspecstream.ai/agents.md, read Nov 10, 2026