> ## 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

# CrewAI web search tool

> Give CrewAI agents Keenable web search with the official SDK. Keyless by default.

*Agent framework*

Give CrewAI agents Keenable web search with a small tool that wraps the official Python SDK. You can try it without an API key. Set `KEENABLE_API_KEY` to use your organization's limits.

CrewAI's own `KeenableSearchTool` is in review upstream ([PR #7570](https://github.com/crewAIInc/crewAI/pull/7570)). Until it ships, this page wraps the SDK.

## Install

```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
pip install keenable 'crewai[tools]'
```

## Add search to a crew

Define a tool that calls the SDK, then give it to an agent:

```python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
from crewai import Agent, Task, Crew
from crewai.tools import tool
from keenable import Keenable

client = Keenable()  # keyless by default; reads KEENABLE_API_KEY when set


@tool("Keenable Web Search")
def keenable_search(query: str) -> str:
    """Search the web and return cited results for the agent."""
    return client.search(query, max_results=5).to_context()


researcher = Agent(
    role="Researcher",
    goal="Answer with live web sources",
    backstory="You search before you claim a fact.",
    tools=[keenable_search],
)

task = Task(
    description="What changed in the latest Python release? Cite sources.",
    expected_output="A short answer with numbered source URLs.",
    agent=researcher,
)

Crew(agents=[researcher], tasks=[task]).kickoff()
```

`to_context()` returns a numbered block of `[n] Title (url)` entries that the model can cite. To read a single page, add a tool that calls `page = client.fetch(url)` and returns `page.content`.

> [!NOTE]
>
> Set `KEENABLE_API_KEY` to remove the hourly request cap. If you don't set a key, calls run on the shared keyless tier, which allows 1,000 requests per hour per IP address. See [Rate limits](https://docs.keenable.ai/rate-limits.md).

## Related pages

> [card] [Google ADK](https://docs.keenable.ai/integrations/google-adk.md)
>
> Give Google ADK agents Keenable search and fetch over the hosted MCP server.

> [card] [Composio](https://docs.keenable.ai/integrations/composio.md)
>
> Keenable as a Composio toolkit: your agent searches the web and reads pages through Composio, next to the other apps it uses there.

> [card] [Haystack](https://docs.keenable.ai/integrations/haystack.md)
>
> Add web search and page fetch to Haystack pipelines with the Keenable components.

> [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.