Use Search1API with LobeHub
Configure Search1API as the search and crawler provider for LobeHub's built-in Web Search in a self-hosted deployment.
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.
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.
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 dashboard.search1api.com, 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:
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:
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:
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:
- Open an Agent's Profile in LobeHub.
- Select + Add Skill and enable Web Search.
- Start a new conversation and ask:
Search the web for the latest LobeHub release notes and cite the sources. - 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_PROVIDERScontains the exact lowercase valuesearch1api. - 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_IMPLScontainssearch1api. - Test search and URL reading separately; they use different LobeHub implementations and may use different keys.
- Keep
naiveaftersearch1apiif 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.
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.
Search returns no results
Try a broader query without site or time constraints. LobeHub currently lets Search1API choose the underlying search engine automatically and 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, 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.