> SpecStream is the live web data engine for teams and agents. This is the Markdown copy of https://specstream.ai/docs/integrations/nanobot. Every page, with what SpecStream does and costs: https://specstream.ai/llms.txt

# nanobot

Set nanobot's web search provider to searxng and its base URL to the SpecStream address, and every web\_search the agent makes runs on the SpecStream Search API. There is no SearXNG server to host.

[SpecStream for nanobotAI assistants](https://specstream.ai/integrations/nanobot.md)

## What you need

-   nanobot with the `searxng` search provider. Version 0.4.1 has it.
-   A SpecStream API key. New accounts start with $10 of credit, no card. [Create an account](https://specstream.ai/signup?utm_source=nanobot).

1.  1

    ## 1. Get a SpecStream key

    [Get your key](https://specstream.ai/workspace/search?route=searxng&utm_source=nanobot&utm_medium=howto) on the Search API screen of your SpecStream workspace, and export it in the environment nanobot starts in:

    Shell

    ```bash
    export SPECSTREAM_API_KEY="YOUR_SPECSTREAM_KEY"
    ```

2.  2

    ## 2. Point the searxng provider at SpecStream

    nanobot's SearXNG provider sends no key, so the key goes in the address. nanobot adds `/search` to the base URL itself, so the base URL ends with your key.

    In `~/.nanobot/config.json`, set `tools.web.search.provider` to `searxng` and `baseUrl` to the SpecStream address. A `${SPECSTREAM_API_KEY}` reference keeps the key out of the file: nanobot resolves it at startup, in memory, and never writes the value back.

    ~/.nanobot/config.json

    ```json
    {
      "tools": {
        "web": {
          "search": {
            "provider": "searxng",
            "baseUrl": "https://api.specstream.ai/searxng/${SPECSTREAM_API_KEY}",
            "maxResults": 5
          }
        }
      }
    }
    ```

3.  3

    ## 3. Or set it in the WebUI

    Open **Settings**, then **Capabilities**, then **Web access**. Choose **SearXNG** as the **Search provider** and paste `https://api.specstream.ai/searxng/YOUR_SPECSTREAM_KEY` into **Base URL**, with your key in place of `YOUR_SPECSTREAM_KEY`. Save. Changes apply to new web search requests.

    Typed this way, the key is stored in `config.json`. To keep it out, put the `${SPECSTREAM_API_KEY}` reference in the field instead: nanobot keeps the placeholder when the WebUI saves.

4.  4

    ## 4. Check it

    Ask nanobot something from this week. The answer lists results as a title, a URL and a snippet, read from the Search API.

    Without a config file, the same works with two settings: provider `searxng` in the config, and the address in the `SEARXNG_BASE_URL` environment variable, which nanobot reads when `baseUrl` is empty.

## What nanobot sends

Each search is `GET https://api.specstream.ai/searxng/<key>/search` with `q` and `format=json`. The Search API answers in SearXNG's JSON shape, and nanobot reads `results[].title`, `url` and `content` and keeps the first `maxResults`: 5 by default, 10 at most.

With `searxng` chosen and no base URL in `baseUrl` or `SEARXNG_BASE_URL`, nanobot falls back to DuckDuckGo and logs `SEARXNG_BASE_URL not set, falling back to DuckDuckGo`. If your searches still look like DuckDuckGo's, that line is the place to look. A rejected key comes back to the agent as an error, with no fallback.

## Why not run SearXNG yourself

nanobot's docs list SearXNG as self hosted: a server you install, keep running and configure to answer in JSON. With the SpecStream address there is no server to run, and the results come from the SpecStream Search API. Its scores on SimpleQA Verified and WideSearch, and the method, are on [the benchmarks page](https://specstream.ai/benchmarks.md).

## Web fetch

nanobot reads the pages a search finds with its own `web_fetch` tool, through Jina Reader or its built-in reader, and no setting moves it to SpecStream. To read pages with the [Extract API](https://specstream.ai/docs/extract-api.md), call it from your own code.

## Cost

nanobot's searches reach SpecStream through the SearXNG drop-in address, so each one is a fast Search API call at $1 per 1,000 searches. nanobot names no result count, so each search is priced as a search of 10 results. It comes out of your balance, with no quote and no approval, and a search that returns no results costs nothing. New accounts start with $10 of credit, no card.

## Turn it off

Set `provider` back to `duckduckgo`, or choose another provider in **Web access**, and save. To end the key's access, revoke it under **Agents & API** in your SpecStream workspace. Questions go to [support@specstream.ai](mailto:support@specstream.ai).

## More

[SpecStream for nanobot](https://specstream.ai/integrations/nanobot.md) covers what it does in nanobot on one page. Every other tool has its guide in [Connect your tools](https://specstream.ai/docs/integrations.md). You see the most a request can cost before it starts, and the matches are paid from your balance. [Billing](https://specstream.ai/docs/billing.md) has the details. For help, email [support@specstream.ai](mailto:support@specstream.ai).
