SearChat
Point SearChat's SearXNG address at SpecStream with one line in docker-compose.yaml. SearChat's own SearXNG code stays as it is, SearXNG stays its default engine, and every search runs on SpecStream's Search API instead of a SearXNG container that asks Bing and Google from your server.
What you need
- SearChat deployed with Docker Compose from its
deploy/docker-compose.yaml, withmodel.jsonset up. - A SpecStream key. Get your key on the Search API screen of your SpecStream workspace. New accounts start with $10 of credit, no card.
- 1
1. Set SEARXNG_HOSTNAME in docker-compose.yaml
In the
search_chatservice, replace the SearXNG address with SpecStream's, with your key in place ofYOUR_SPECSTREAM_KEY. Leave/searchoff the end: SearChat adds/searchitself.SearChat sends no header with a SearXNG search, so the key goes in the address. Keep the file out of anything you share, or keep the key in
.envas shown further down. Leave the other lines of the service as they are.docker-compose.yaml - 2
2. Recreate the container
Run this in the folder that holds
docker-compose.yaml. Compose sees the changed environment and recreatessearch_chat.Terminal - 3
3. Ask with the SearXNG engine
Open SearChat at
http://localhost:3000. The engine menu lists SearXNG wheneverSEARXNG_HOSTNAMEis set, and it is selected by default. Ask about something recent:In SearChat
What changes and what stays
SearChat's SearXNG provider, apps/server/src/core/search/provider/searxng.ts, posts each search to SEARXNG_HOSTNAME plus /search with format=json. SpecStream answers in SearXNG's own JSON: results[] with title, url and content, the fields SearChat reads into its sources and citations. Chat and Deep Research both search through this provider.
SEARXNG_SAFE still reaches the search as safesearch. SEARXNG_ENGINES picks engines inside a SearXNG instance, and SpecStream does not use it. The JSON format lines in searxng/settings.yml are needed only by the local container.
Why move off the local SearXNG
SearChat's README asks for network access because SearXNG needs Google access: the container sends each query on to Bing and Google from your server's address, which those engines can slow or block. With SpecStream the search runs on SpecStream's servers, and your server sends one request.
The Search API scores 97.9 F-score on all 1,000 SimpleQA Verified questions; scores and method are on the benchmarks page.
Keep the key in .env
Docker Compose fills ${...} in docker-compose.yaml from a .env file in the same folder. Put SPECSTREAM_API_KEY=YOUR_SPECSTREAM_KEY in .env, write the address as https://api.specstream.ai/searxng/${SPECSTREAM_API_KEY}, and run docker compose up -d.
Remove the local SearXNG container
SearChat no longer calls the searxng service. You can delete that service and the ./searxng folder from the deployment, or keep them to go back later.
What each search costs
The SearXNG address runs the Search API's fast search: $1 per 1,000 searches of up to 10 results, from your balance, with no quote and no approval. A search that returns no results costs nothing.
A chat question asks SearChat's search graph for two queries, so it is up to two searches. Deep Research starts with DEEP_NUMBER_OF_INITIAL_QUERIES searches and runs up to DEEP_MAX_RESEARCH_LOOPS rounds, 3 each by default; lower them in docker-compose.yaml to search less. Every call, charged or not, is in your account's request log, and prices are on the pricing page.
If answers come back without sources
- SearChat's SearXNG code turns any failed search into an empty list, so a wrong key shows as an answer with no sources, not as an error.
- Check that
SEARXNG_HOSTNAMEstarts withhttps://api.specstream.ai/searxng/and holds your whole key, with no/searchat the end. - Run
docker compose up -dagain after any change, sosearch_chatgets the new address. - When the account has used its calls for the minute, SpecStream answers
429withRetry-Afterand charges nothing. Ask again a moment later.
Go back to the local SearXNG
Set SEARXNG_HOSTNAME back to http://searxng:8080, keep or restore the searxng service, and run docker compose up -d. Questions: [email protected].
More
SpecStream for SearChat covers what it does in SearChat on one page. Every other tool has its guide in Connect your tools. You see the most a request can cost before it starts, and the matches are paid from your balance. Billing has the details. For help, email [email protected].