> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keenable.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Every page is listed in https://docs.keenable.ai/llms.txt. To pick a product for a job, read https://docs.keenable.ai/choose.md
> Setup steps for agents, covering the SDKs, the MCP server and the CLI: https://docs.keenable.ai/skill.md
> Keenable search and fetch work without an API key. To add them to code, use the official SDK for the project's language: https://docs.keenable.ai/sdks.md
> Without a key, call POST https://api.keenable.ai/v1/search/public or GET https://api.keenable.ai/v1/fetch/public with an X-Keenable-Title header that names your app.
> With a key, send it in the X-API-Key header and read it from the KEENABLE_API_KEY environment variable. Never ask a user to paste a key into chat. Every access method: https://docs.keenable.ai/auth.md
> To get an API key without the console, use device login: https://docs.keenable.ai/authentication.md#device-login
> MCP server: https://api.keenable.ai/mcp (no key, or X-API-Key; keyless Codex uses https://api.keenable.ai/mcp-public), or https://api.keenable.ai/mcp-oauth for OAuth sign-in. These docs are an MCP server at https://docs.keenable.ai/mcp and the OpenAPI spec is at https://docs.keenable.ai/api-reference/openapi.json
> Keenable searches and fetches public web pages. If a question needs no web information, skip the call.
> On 402 with an API key (code insufficient_credits), stop and ask a human to add credits; don't retry. On 429, wait the number of seconds in Retry-After, then retry. Before you ship, follow https://docs.keenable.ai/production.md
> Every error, with its cause and fix, is in https://docs.keenable.ai/errors.md and moving from another search API is covered in https://docs.keenable.ai/migrate.md
> Before you compare Keenable with another search API, read https://docs.keenable.ai/guides/evaluate-search-apis.md

# Spider web search provider for Rust

> Search the web from the Spider Rust crawler with KeenableProvider, behind the search_keenable feature. Works without an API key.

*Search provider in Spider*

`KeenableProvider` adds Keenable web search to [Spider](https://github.com/spider-rs/spider), the Rust web crawler. It implements Spider's `SearchProvider` trait next to the Serper, Brave, Bing and Tavily providers, so you can find URLs with Keenable and hand them to Spider to crawl. It works without an API key.

→ [KeenableProvider in the Spider repository](https://github.com/spider-rs/spider/blob/main/spider/src/features/search_providers/keenable.rs)

## Install

The provider was merged into Spider's main branch on 2026-11-05, behind the `search_keenable` Cargo feature. Spider 2.53.9, the latest release on crates.io, does not include it yet, so depend on the Git repository:

```toml Cargo.toml theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
[dependencies]
spider = { git = "https://github.com/spider-rs/spider", rev = "774412f", features = ["search_keenable"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
```

`rev` pins the commit that added the provider, so the build doesn't move with `main`. Once a later Spider release includes it, replace `git` and `rev` with that version number.

## Search the web

Create the provider and call `search` with a query and `SearchOptions`:

```rust theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
use spider::features::search::{SearchOptions, SearchProvider};
use spider::features::search_providers::KeenableProvider;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let provider = KeenableProvider::new(); // no API key required
    let options = SearchOptions::new().with_limit(5);
    let results = provider.search("rust async runtime comparison", &options, None).await?;

    for result in &results.results {
        println!("{}. {} {}", result.position, result.title, result.url);
    }
    Ok(())
}
```

The program prints one numbered line per result. Each `SearchResult` has `title`, `url`, `position` (from 1) and `snippet`. Results without a URL are skipped. `results.metadata` holds Keenable's full JSON response. The third argument of `search` takes an existing `reqwest::Client`. With `None`, the provider builds one with a 30-second timeout.

## Constructors and options

| Item | What it does |
| - | - |
| `KeenableProvider::new()` | Keyless. Sends searches to `https://api.keenable.ai/v1/search/public`. |
| `KeenableProvider::with_api_key(key)` | Sends searches to `/v1/search` with your key in `X-API-Key`. An empty key falls back to the keyless endpoint. |
| `.with_api_url(url)` | Sends searches to a URL you choose, such as your own gateway. |
| `SearchOptions::with_limit(n)` | Sent as `max_results`. Keenable accepts 1 to 50. |

The other `SearchOptions` fields (`country`, `language`, `site_filter`, `exclude_domains`, `time_range`, `include_keywords`) are not sent to Keenable. The provider reads only `limit`.

Each `snippet` is Keenable's `description` when it is set, otherwise the first 1,000 characters of Keenable's `snippet`. An HTTP `401` or `403` returns `SearchError::AuthenticationFailed`, and `429` returns `SearchError::RateLimited`. See [Errors](https://docs.keenable.ai/errors.md).

> [!NOTE]
>
> Without a key, searches run on the shared public tier at [lower rate limits](https://docs.keenable.ai/rate-limits.md). Use `KeenableProvider::with_api_key(...)` to use your organization's limits and remove the hourly cap. See [API keys](https://docs.keenable.ai/api-keys.md).

## Related pages

> [card] [ToolUniverse](https://docs.keenable.ai/integrations/tooluniverse.md)
>
> Select Keenable as the backend of ToolUniverse's web\_search tool with backend="keenable", in ToolUniverse 1.5.9 and later. No API key required.

> [card] [Scalekit](https://docs.keenable.ai/integrations/scalekit.md)
>
> Keenable MCP as a built-in connector in Scalekit AgentKit: each of your users signs in to Keenable once, and your agent calls search and fetch through Scalekit.

> [card] [RL and eval environments](https://docs.keenable.ai/integrations/rl-eval-environments.md)
>
> Use Keenable as the search backend in SkillOpt OfficeQA rollouts and Halo GRPO search environments: one config value, opt-in, never a default.

> [card] [Overview](https://docs.keenable.ai/sdks.md)
>
> Install the official Keenable SDK for Python, TypeScript, Go or Rust with one command, search with no key, then add fetch, tool calling and Monitors.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.