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

# Morphic

Point Morphic's SearXNG search at SpecStream with two settings: SEARCH\_API=searxng, and SEARXNG\_API\_URL with your key in the address. Morphic then searches the live web through SpecStream's Search API at $1 per 1,000 searches. You need no Tavily key and no SearXNG instance of your own.

[SpecStream for MorphicAI assistants](https://specstream.ai/integrations/morphic.md)

## What you need

-   Morphic from [github.com/miurla/morphic (opens in a new tab)](https://github.com/miurla/morphic), run with `bun dev` or with Docker Compose.
-   A SpecStream API key that can search. New accounts get $10 of credit, no card. [Create one](https://specstream.ai/signup?utm_source=morphic).

1.  1

    ## 1. Make a SpecStream key

    In SpecStream, open [Agents & API](https://specstream.ai/workspace/agents?tab=keys&utm_source=morphic), choose **API keys**, then **Create API key**. Turn on **Authorize paid work** and give the key a **Total spending limit**. The key is shown once.

2.  2

    ## 2. Set the two variables in .env.local

    Morphic chooses its search provider from `SEARCH_API` and reads the SearXNG address from `SEARXNG_API_URL`. Without `SEARCH_API` it uses Tavily, its default.

    In `.env.local`, add these two lines with your key in place of YOUR\_SPECSTREAM\_KEY. Morphic adds `/search` and `format=json` itself, so the address ends at your key. Then start Morphic again with `bun dev`.

    .env.local

    ```bash
    SEARCH_API=searxng
    SEARXNG_API_URL=https://api.specstream.ai/searxng/YOUR_SPECSTREAM_KEY
    ```

3.  3

    ## 3. With Docker Compose, put them in .env

    Morphic's `docker-compose.yaml` sets both variables on the morphic service itself: `SEARCH_API` falls back to `searxng` and `SEARXNG_API_URL` to `http://searxng:8080`, the SearXNG container it starts. Those lines win over `.env.local`.

    Compose fills them from your shell or from a file named `.env` beside `docker-compose.yaml`, and never from `.env.local`. Put the same two lines in `.env`, then run `docker compose up` again. The bundled SearXNG container can keep running. Morphic stops calling it.

    .env (beside docker-compose.yaml)

    ```bash
    SEARCH_API=searxng
    SEARXNG_API_URL=https://api.specstream.ai/searxng/YOUR_SPECSTREAM_KEY
    ```

4.  4

    ## 4. Check it works

    Ask Morphic about something from this week. The answer cites results from the live web that SpecStream returned.

    Each search is in your account's request log with the SearXNG route as its endpoint and its price. `GET https://api.specstream.ai/v1/account/requests` lists them, newest first.

## What changes in Morphic

| Setting | Morphic today | With SpecStream |
| --- | --- | --- |
| `SEARCH_API` | `tavily` with bun, `searxng` with Docker Compose | `searxng` |
| `SEARXNG_API_URL` | `http://localhost:8080` in the example file, `http://searxng:8080` in Docker Compose | `https://api.specstream.ai/searxng/YOUR_SPECSTREAM_KEY` |
| Search key | `TAVILY_API_KEY` or `EXA_API_KEY` | None: the key is in the address |
| `BRAVE_SEARCH_API_KEY` | Optional, for video and image results | Leave it as it is |

## What each search costs

Each search Morphic sends to the SearXNG address is one Search API call on the fast tier: $1 per 1,000 searches of up to 10 results, a fifth of the default search's $5. Morphic sends no result count, so each call gets one page of 10 results at that price, and a search that returns nothing costs nothing.

Searches come out of your balance with no quote and no approval. New accounts start with $10 of credit, no card. Questions go to [support@specstream.ai](mailto:support@specstream.ai).

## Limits and errors

-   When search is busy, SpecStream answers `429` with a `Retry-After` header and charges nothing.
-   A key SpecStream does not accept answers `401`. Morphic logs `SearXNG API error (401):` with SpecStream's message. Check the key in the address, and that it can search.
-   A key over its spending limit answers `403`. Raise the limit under **API keys** in **Agents & API**.

## Keep the key private

Morphic calls the SearXNG address from its server, so the key stays in `.env.local` or `.env` and never reaches the browser. Keep both files out of git. To end a key's access, revoke it under **API keys** in **Agents & API** and make a new one.

## Read pages and get rows too

The same key reads pages with the [Extract API](https://specstream.ai/docs/extract-api.md) at $0.80 per 1,000 pages, and a page with no text is not charged. For a dataset, add SpecStream's MCP server at `https://api.specstream.ai/mcp` and ask for the records in plain words. Deep Search returns every match as structured rows at 5¢, 15¢ or $1 a row, under a maximum you approve. See [MCP](https://specstream.ai/docs/mcp.md).

## Go back

Remove the two lines, or set `SEARCH_API=tavily` with a `TAVILY_API_KEY`, and restart Morphic. Then revoke the key in your workspace if you no longer use it.

## More

[SpecStream for Morphic](https://specstream.ai/integrations/morphic.md) covers what it does in Morphic 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).
