# LobeHub

> Configure Search1API as the search and crawler provider for LobeHub's built-in Web Search in a self-hosted deployment.

Canonical URL: https://s1.dev/docs/integrations/lobehub

Search1API is built into LobeHub as both a search provider and a page crawler. In a self-hosted LobeHub deployment, you can use it to find current sources and read the pages behind those results without installing a marketplace plugin.

> **info:** This guide is for LobeHub's native **Web Search** skill on a self-hosted deployment. LobeHub
> Cloud already manages its own search infrastructure. If you want Search1API as a separate set of
> agent tools, see [MCP server](https://s1.dev/docs/integrations/mcp).

## Before you start

You need:

- a self-hosted LobeHub deployment;
- access to its server-side environment variables; and
- a Search1API API key.

Sign in at [app.s1.dev](https://app.s1.dev), open **API Keys**, and create a key. Keep it on the server and do not expose it in browser code or commit it to your repository.

## Configure search and page reading

Add these variables to the environment of your LobeHub server:

```bash
SEARCH_PROVIDERS="search1api"
CRAWLER_IMPLS="search1api,naive"
SEARCH1API_API_KEY="YOUR_SEARCH1API_KEY"
```

Then restart or redeploy LobeHub so the server process receives the new values.

This configuration gives Search1API two roles:

| Variable | What it controls |
| --- | --- |
| `SEARCH_PROVIDERS` | Providers LobeHub uses to find web results. |
| `CRAWLER_IMPLS` | Crawlers available to LobeHub when it reads a result page. |
| `SEARCH1API_API_KEY` | One shared key for Search1API search and crawl requests. |

For ordinary URLs, `CRAWLER_IMPLS="search1api,naive"` makes LobeHub try Search1API first and fall back to its built-in crawler when Search1API returns an error or insufficient content. LobeHub may apply its own crawler rules for specific kinds of URLs.

## Use separate keys

For independent traffic attribution and revocation, create two Search1API keys and configure them by workload:

```bash
SEARCH_PROVIDERS="search1api"
CRAWLER_IMPLS="search1api,naive"
SEARCH1API_SEARCH_API_KEY="YOUR_SEARCH_KEY"
SEARCH1API_CRAWL_API_KEY="YOUR_CRAWL_KEY"
```

LobeHub resolves the keys as follows:

| Operation | First choice | Fallback |
| --- | --- | --- |
| Search | `SEARCH1API_SEARCH_API_KEY` | `SEARCH1API_API_KEY` |
| Crawl | `SEARCH1API_CRAWL_API_KEY` | `SEARCH1API_API_KEY` |

All keys on the same Search1API account use the same credit balance. Separate keys make usage easier to identify and let you revoke one integration without interrupting the other.

## Add another fallback provider

`SEARCH_PROVIDERS` is also ordered. LobeHub tries providers from left to right and moves to the next configured provider when an earlier provider errors or returns no usable results.

For example:

```bash
SEARCH_PROVIDERS="search1api,searxng"
SEARXNG_URL="https://your-searxng-instance.example"
```

Keep `search1api` first when you want it to be the primary search provider. Each fallback provider needs its own required environment variables.

## Enable and verify Web Search

After the deployment restarts:

1. Open an Agent's **Profile** in LobeHub.
2. Select **+ Add Skill** and enable **Web Search**.
3. Start a new conversation and ask: `Search the web for the latest LobeHub release notes and cite the sources.`
4. Open one of the cited pages or ask the Agent to read and summarize that source.

The first request verifies search. Reading a cited URL verifies the crawler separately. LobeHub should show its search-grounding interface with the queries and cited sources.

## Troubleshooting

### Web Search does not run

- Confirm `SEARCH_PROVIDERS` contains the exact lowercase value `search1api`.
- Confirm Web Search is enabled for the Agent.
- Confirm the variables are attached to the LobeHub server process, not only your local shell.
- Restart or redeploy LobeHub after changing the environment.

### Search works, but pages are not read

- Confirm `CRAWLER_IMPLS` contains `search1api`.
- Test search and URL reading separately; they use different LobeHub implementations and may use different keys.
- Keep `naive` after `search1api` if you want LobeHub's built-in crawler as a fallback.

### `401 Unauthorized`

The API key is invalid or revoked. Create a replacement key, update the LobeHub environment, restart the deployment, verify requests with the new key, and then delete the old key. See [Authentication](https://s1.dev/docs/essentials/authentication).

### `402 Payment Required`

Either the key is not reaching the LobeHub process or the Search1API account does not have enough credits. Recheck the environment variable and then check the account balance. See [Credits and limits](https://s1.dev/docs/essentials/credits-and-limits).

### Search returns no results

Try a broader query without site or time constraints. LobeHub does not choose an engine, so Search1API uses its default (Google), and LobeHub does not pass every LobeHub search filter through to Search1API.

## Built-in provider or MCP?

Use the **built-in provider** when you want LobeHub's native Web Search experience, including its search-grounding UI and citations. Configure it with the environment variables on this page.

Use the **Search1API MCP server** when you want explicit `search`, `news`, `ask`, `crawl`, `sitemap`, and `trending` tools in LobeHub or another MCP client. MCP is a separate integration and is not required for LobeHub's built-in Web Search.

You can enable both, but calls made through either path use Search1API credits. Start with the built-in provider for native LobeHub Web Search, then add MCP only when you need its additional tools or direct tool control.

## Related documentation

- [Search API](https://s1.dev/docs/basic/search)
- [Crawl API](https://s1.dev/docs/basic/crawl)
- [Authentication](https://s1.dev/docs/essentials/authentication)
- [Credits and limits](https://s1.dev/docs/essentials/credits-and-limits)
- [LobeHub: Configuring Online Search](https://lobehub.com/docs/self-hosting/advanced/online-search)