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

# Access methods for agents

> Pick how your agent calls Keenable: no key, an API key, device login, MCP sign-in or x402 pay per request, with the header or URL each one needs.

Find the row that matches what your agent has, then send the header or call the URL in the **Use** column. The full guide is [https://docs.keenable.ai/authentication.md](https://docs.keenable.ai/authentication.md).

## Access methods

| You have | Use | Works on |
| - | - | - |
| Nothing: no account and no key | REST: `POST https://api.keenable.ai/v1/search/public` and `GET https://api.keenable.ai/v1/fetch/public` with an `X-Keenable-Title` header that names your app. MCP: `https://api.keenable.ai/mcp` with no header. Keyless Codex uses `https://api.keenable.ai/mcp-public`, because `/mcp` publishes OAuth discovery, which can make Codex start a browser sign-in. | REST, MCP, the SDKs, the CLI and the agent skill. 1,000 requests per hour and 10 per second per IP address. No Monitors. |
| An API key (`keen_...`) | The `X-API-Key: keen_...` header, or `Authorization: Bearer keen_...`. The SDKs and the CLI read `KEENABLE_API_KEY` from the environment. | `/v1/search`, `/v1/fetch`, `/v1/monitors`, the MCP server, the SDKs and the CLI. 10 requests per second per organization by default, no hourly cap. |
| An AgentID sign-in | The sign-in creates your own organization. Call `GET /bff/v1/auth/user`, then `POST /bff/v1/auth/api_keys?org_id=<current_org_id>` with your bearer token and store the `api_key` from the response. Full steps: [https://app.keenable.ai/agent-api-key.md](https://app.keenable.ai/agent-api-key.md) | An agent that holds an AgentID session. The first agent a person registers gets the free monthly allowance; later agents start with none. |
| A person who can approve a code in a browser | Device login: run `keenable login`, or call `POST https://api.keenable.ai/v1/auth/agent/code`, show the person the link and code, then poll `POST https://api.keenable.ai/v1/auth/agent/token`. | Any tool that can show a link. The login returns an API key, which then works like the row above. |
| An MCP client that signs in with OAuth | `https://api.keenable.ai/mcp-oauth`. Without a credential it returns `401` `sign_in_required` and a `WWW-Authenticate` header, so the client opens the Keenable sign-in page. | MCP clients with OAuth sign-in, such as Claude custom connectors. After sign-in the server also lists the Monitors tools. |
| A wallet with USDC on Base, set up by your user for x402 | Pay per request over x402: `GET` or `POST https://api.keenable.ai/v1/x402/search`, `GET https://api.keenable.ai/v1/x402/fetch`, `POST https://api.keenable.ai/v1/x402/select`. | REST only. $0.01 per search or fetch, $0.10 per SELECT query that succeeds. No account. These paths ignore an API key. |

Details for each row:

* Keyless REST: [https://docs.keenable.ai/api-reference.md](https://docs.keenable.ai/api-reference.md)
* API key header: [https://docs.keenable.ai/authentication.md](https://docs.keenable.ai/authentication.md)
* Device login: [https://docs.keenable.ai/authentication.md](https://docs.keenable.ai/authentication.md)
* MCP URLs: [https://docs.keenable.ai/mcp-server.md](https://docs.keenable.ai/mcp-server.md)
* x402: [https://docs.keenable.ai/pay-per-request.md](https://docs.keenable.ai/pay-per-request.md)
* Rate limits: [https://docs.keenable.ai/rate-limits.md](https://docs.keenable.ai/rate-limits.md)

## Rules for agents

* Never sign up on the user's behalf. A person signs up and approves device login in the console at [https://app.keenable.ai/console](https://app.keenable.ai/console). An agent with its own AgentID sign-in has its own organization and creates its own key.
* Never ask the user to paste a key into chat. Read it from `KEENABLE_API_KEY`, or run device login.
* Pay an x402 offer only from a wallet your user set up for x402. Without one, show the `402` offer to your user and stop.
* If you send both `X-API-Key` and `Authorization`, the API uses the key in `X-API-Key`.

## Search with or without a key

This shell snippet sends one search with your key if `KEENABLE_API_KEY` is set, and keyless otherwise:

```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}}
if [ -n "$KEENABLE_API_KEY" ]; then
  url=https://api.keenable.ai/v1/search
  auth="X-API-Key: $KEENABLE_API_KEY"
else
  url=https://api.keenable.ai/v1/search/public
  auth="X-Keenable-Title: my-agent"
fi

curl -X POST "$url" \
  -H "$auth" \
  -H "Content-Type: application/json" \
  -d '{"query": "release notes for zod 4 breaking changes", "max_results": 3}'
```

You get JSON with a `results` array. Each result has `url`, `title` and `snippet`.

## Errors that mean you need another method

| Status | `code` | What to do |
| - | - | - |
| `400` | `missing_app_title` | Add the `X-Keenable-Title` header to the keyless `/public` request. |
| `401` | `missing_api_key` | Send your key, or call the `/public` path with `X-Keenable-Title`. |
| `401` | `sign_in_required` | Sign in through the MCP client, or send an API key in `X-API-Key`. |
| `402` | `insufficient_credits` | Stop. Ask a human to add credits in the console. Don't retry. |
| `429` | `public_rate_limit_hourly` | Wait for `Retry-After`, or ask the user for an API key, which removes the hourly cap. |

Every error code, with its cause and fix: [https://docs.keenable.ai/errors.md](https://docs.keenable.ai/errors.md)


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