# Keenable > This file is very large and may be truncated. For an index of this content, please refer to https://docs.keenable.ai/llms.txt instead. > Web search and page fetch for AI agents, on Keenable's own index. > ## 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 # Web search agent skill Source: https://docs.keenable.ai/agent-skill Install the keenable-web-search agent skill with npx skills add. Your agent searches the web with a bundled script, with no API key and no MCP client. Give your agent web search without an MCP client or an API key. The `keenable-web-search` skill is a folder with instructions and one Python script. When a task needs current information, your agent runs the script and gets ranked results with titles, URLs and snippets. ## Skill or MCP server Both give your agent Keenable search. Pick by what your agent can run: | | Agent skill | [MCP server](/mcp-server) | | - | - | - | | Your agent needs | A shell and Python 3 | An MCP client | | Search | `scripts/search.py` | `search_web_pages` | | Read a page | Not included | `fetch_page_content` | | API key | Not supported. Every call is keyless. | Optional | The skill's calls count against the [keyless rate limit](/rate-limits) for your IP address. To use an API key, connect the MCP server. You can install both. The skill tells your agent to open the most relevant URL before it relies on a snippet, and `fetch_page_content` returns that page as markdown. ## Install Run this command in your project directory. It needs Node.js, and it copies the skill from the [keenable-mcp repository](https://github.com/keenableai/keenable-mcp) into the skills folder of the agent you name: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} npx skills add keenableai/keenable-mcp --skill keenable-web-search -a claude-code -y ``` The command ends with the install location: ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} ✓ keenable-web-search (copied) → ./.claude/skills/keenable-web-search ``` Change `-a` to install for another agent. With `-a cursor` or `-a codex`, the skill goes to `./.agents/skills/keenable-web-search`. Add `-g` to install for your user account instead of one project. The skill is also listed on [skills.sh](https://skills.sh/keenableai/keenable-mcp/keenable-web-search) and on [ClawHub](https://clawhub.ai/keenable/keenable-web-search). The Claude Code and Cursor plugins in the same repository install the MCP server, not this skill. See [MCP registries and directories](/integrations/directories) for every catalog that lists Keenable. ## What the skill contains | File | Purpose | | - | - | | `SKILL.md` | The name, description and trigger words your agent matches against a task, plus usage instructions. | | `scripts/search.py` | Sends one keyless search to `https://api.keenable.ai/v1/search/public`. It uses only the Python standard library. | | `skill-card.md` | A summary of the publisher, license (MIT), output and known risks. | The script takes a query and these flags: | Flag | What it does | | - | - | | `--site ` | Returns results from one site, for example `--site arxiv.org`. | | `--exclude-domain ` | Leaves a host and its subdomains out of the results. Repeat it or pass a comma list, for example `--exclude-domain pinterest.com,quora.com`. See [Exclude domains](/api-reference/search#exclude-domains). | | `--published-after`, `--published-before` | Bounds the publish date, as `YYYY-MM-DD`. | | `--acquired-after`, `--acquired-before` | Bounds the date Keenable indexed the page, as `YYYY-MM-DD`. | | `--json` | Prints the raw API response instead of formatted text. | ## Check that it works 1. List the installed skills: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} npx skills list ``` You see `keenable-web-search` with its path and the agent it is installed for. 2. Run the script yourself, from the project directory: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} python3 .claude/skills/keenable-web-search/scripts/search.py "Python asyncio TaskGroup reference" ``` You see numbered results, each with a title, a URL and a snippet of up to 400 characters: ```text Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} 1. Learn Python asyncio TaskGroup https://w3schools.in/python/asyncio-taskgroup `asyncio.TaskGroup` runs a related group of asynchronous tasks and waits for them as one structured unit... ``` 3. Ask your agent a question that needs the web. The skill is loaded if your agent runs `scripts/search.py`. If the script prints `Rate limited by the public endpoint. Try again shortly.`, your IP address reached the keyless limit. Wait and run it again. ## Other Keenable skills | Skill | What it teaches your agent | Install | | - | - | - | | `keenable` | How to use Keenable from code: the SDKs, the MCP server, the REST API, limits and a research workflow. It has no script. | `npx skills add https://docs.keenable.ai` | | `keenable-cli` | How to install and use the [Keenable CLI](/cli). | Send your agent this prompt: `Read https://app.keenable.ai/SKILL.md and install this skill.` | # API keys Source: https://docs.keenable.ai/api-keys Add an API key in three steps to lift the keyless hourly cap and get 100,000 free requests a month. Your code stays the same. An API key removes the hourly cap of the keyless tier and gives your organization 100,000 free requests a month. Your code stays the same: the SDKs pick the key up from the environment. **1. Create a key in the console** Open the [Keenable console ↗](https://app.keenable.ai/console?utm_source=docs\&utm_medium=cta\&utm_campaign=api_keys\&utm_content=create_key) and create a key. Keys start with `keen_`. Copy yours before you close the dialog. **2. Set KEENABLE_API_KEY** This command puts the key in your shell's environment, where the SDKs, the MCP server and the CLI look for it. ```bash bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} export KEENABLE_API_KEY=keen_ ``` ```powershell PowerShell theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} $env:KEENABLE_API_KEY = "keen_" ``` The variable lasts for this terminal session. Add the line to your shell profile, or to your secrets manager, to keep it. **3. Re-run the same code** Run the code from the [Quickstart](/) again. Nothing else changes. With `KEENABLE_API_KEY` set, the TypeScript, Python, Go and Rust SDKs send the key and call the keyed endpoints instead of the `/public` ones. Responses now report what each call cost in a `usage` object (see [Balance and usage](/credits#reading-usage-per-call)). ## Get a key from an agent or the CLI An agent, a CLI or a CI job that can't open the console gets a key through device login. The tool shows a person a link and a code, the person approves it in the console, and the tool receives a new API key. The person signs in to the console to approve, or creates a free account at [app.keenable.ai/signup](https://app.keenable.ai/signup) first. The Keenable CLI runs this flow for you: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} keenable login ``` The command prints the link and the code, waits for the approval, and saves the key for the CLI and for `keenable configure-mcp`. To get a key for the SDKs or raw HTTP from your own tool, run the same flow over HTTP. See [Device login](/authentication#device-login). A person has to approve every device login. An agent that signs in with AgentID doesn't need one: that sign-in creates the agent's own organization, and the agent creates its own key with two calls. See [Getting a key as an agent](https://app.keenable.ai/agent-api-key.md). An agent with neither path can still search and fetch keyless with the `/public` endpoints. It can't use Monitors. It should stop, tell the person that a key is needed and share the approval link, not retry. ## Pass the key over raw HTTP Without an SDK, send the key in the `X-API-Key` header and drop `/public` from the path. The keyed endpoints need no `X-Keenable-Title` header. This request runs the Quickstart search with your key: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST https://api.keenable.ai/v1/search \ -H "Content-Type: application/json" \ -H "X-API-Key: $KEENABLE_API_KEY" \ -d '{"query": "fastest inference providers 2026", "max_results": 3}' ``` You get the same results as the keyless call, followed by a `usage` object. If your client only supports bearer tokens, send `Authorization: Bearer keen_` instead. If you send both headers, the API uses `X-API-Key`. ## Key lifetime and rotation * Keys belong to your organization. * Keys never expire on their own. * You can rotate a key at any time in the [console ↗](https://app.keenable.ai/console). Create the new key, update `KEENABLE_API_KEY` everywhere it is set, then revoke the old one. If the key is revoked, the API returns [`403`](/errors#403). If the key isn't in Keenable's format, the API returns `401` with `Malformed API key` (see [401 Malformed key](/errors#401-malformed-key)). If the key has the right format but Keenable has no key with that value, as with a typo, the API returns `401` with `Invalid API key` (see [401 Invalid key](/errors#401-invalid-key)). ## Related * [Authentication](/authentication): the key for the MCP server and the CLI. * [Rate limits](/rate-limits): keyed and keyless limits side by side. * [Errors](/errors): every status the API returns and how to fix it. # Keenable API reference Source: https://docs.keenable.ai/api-reference Call Keenable search and fetch over HTTP at api.keenable.ai, with the X-API-Key header or the keyless /public paths. Endpoints, limits and billing. Call the search and fetch endpoints directly when you're building something the [CLI](/cli), the [MCP server](/mcp-server) and the [integrations](/integrations) don't cover. Those tools all call one or both of these two endpoints. ## Base URL Every path on this page is relative to this base URL: ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} https://api.keenable.ai ``` ## Authentication You can call the API in three ways. Each way uses its own path. **With an API key**, in the `X-API-Key` header: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST "https://api.keenable.ai/v1/search" \ -H "X-API-Key: keen_" \ -H "Content-Type: application/json" \ -d '{ "query": "typescript best practices" }' ``` `Authorization: Bearer keen_` works too. If you send both headers, the API uses `X-API-Key`. See [Authentication](/authentication) for obtaining and rotating a key, and for the error responses both endpoints share. **Without one**, on the `/public` twin of each endpoint: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST "https://api.keenable.ai/v1/search/public" \ -H "X-Keenable-Title: My App" \ -H "Content-Type: application/json" \ -d '{ "query": "typescript best practices" }' ``` `X-Keenable-Title` names the application making the call, and Keenable attributes keyless traffic by it. The public endpoints require it. If you leave it out, the API returns `400` with `Missing app identifier`. The API truncates values longer than 256 characters. If you can't set a header, pass the same value in the `?keenable_title=` query parameter. **Paying per request**, on the `/v1/x402/*` paths, with no key and no account: each call pays \$0.01 in USDC on Base over the x402 protocol. See [Pay per request](/pay-per-request) for the payment flow and a client example. Parameters and response shapes are identical across all three, except that `POST /v1/fetch/public` reads one URL per call. To move between them, change the path and swap one header. If no key is configured, the [CLI](/cli), the [MCP server](/mcp-server) and every [integration](/integrations) fall back to the keyless tier. ## Endpoints | Endpoint | Method | Path | Keyless path | Pay-per-request path | Returns | | - | - | - | - | - | - | | [Search](/api-reference/search) | `POST`, `GET` | `/v1/search` | `/v1/search/public` | `/v1/x402/search` | Ranked results with URLs, titles, and snippets | | [Fetch](/api-reference/fetch) | `GET` | `/v1/fetch` | `/v1/fetch/public` | `/v1/x402/fetch` | Page content as markdown, with title and author | | [Fetch (POST)](/api-reference/fetch-post) | `POST` | `/v1/fetch` | `/v1/fetch/public`, one URL per call | None | Up to 20 pages per call, each as markdown, a prompt's answer or typed JSON | | [SELECT](/pay-per-request#select-over-x402) | `POST` | None | None | `/v1/x402/select` | A table from one read-only SQL query over live web results | | [Billing](/api-reference/billing) (beta) | `GET` | `/v1/billing` | `/v1/billing`, key optional | None | Prices and, with a key, your balance and this month's usage | | [Key identity](/api-reference/auth-user) | `GET` | `/v1/auth/user` | None | None | The user who created the key and the organization it belongs to | | [Monitors](/api-reference/monitors/create) | `GET`, `POST`, `PATCH`, `DELETE` | `/v1/monitors` and the paths under it | None | None | Monitors, their runs, and the new pages they found | | [Time Machine](/api-reference/time-machine) | `POST` | `/v1/time-machine/search`, `/v1/time-machine/fetch` and `/v1/time-machine/versions` | None | None | Search results, pages and page versions as Keenable captured them at a past moment | On the pay-per-request paths, search takes `GET` and `POST`, fetch takes `GET`, and SELECT takes `POST`. SELECT has no keyed REST path: with an account, use the [SELECT](/select) MCP server. See [Pay per request](/pay-per-request#endpoints). Monitors needs an API key: it has no keyless or pay-per-request path. See [Monitors](/products/monitors) for how monitors work and their limits. The Monitors reference has a page per operation: [create](/api-reference/monitors/create), [list](/api-reference/monitors/list), [get](/api-reference/monitors/get), [update](/api-reference/monitors/update), [delete](/api-reference/monitors/delete), [run now](/api-reference/monitors/trigger), [list runs](/api-reference/monitors/runs), [get a run](/api-reference/monitors/run), [list results](/api-reference/monitors/results), [list a page monitor's versions](/api-reference/monitors/versions), [list deliveries](/api-reference/monitors/deliveries), [count](/api-reference/monitors/stats) and [bulk actions](/api-reference/monitors/bulk). Time Machine is in Early Access and must be turned on for your organization. Its search, fetch and versions take only `POST`. See [Time Machine](/api-reference/time-machine#access). To move from [Tavily](/migrate/tavily), [Exa](/migrate/exa), the [Brave Search API](/migrate/brave), [Perplexity](/migrate/perplexity), [SerpApi or Serper](/migrate/serpapi-serper), [Linkup](/migrate/linkup) or another search API, see [Migrate to Keenable](/migrate). Each page maps their parameters and response fields to these endpoints. Each endpoint page has the full request and response shape, examples in the official TypeScript, Python, Go and Rust SDKs plus curl, and a playground you can call with your own key. For a field or term such as `acquired_at`, a card or a SKU, see the [Glossary](/glossary). ## Limits and billing If you send an API key, Keenable limits your requests per organization rather than per IP address, and they draw on your [balance](/credits). See [Rate limits](/rate-limits) for the numbers. If you don't send a key, Keenable limits your requests per IP address, separately for each endpoint, at 1,000 requests per hour and 10 per second. Keyless requests cost nothing. Keenable still logs them, with the query or URL, your IP address and your `X-Keenable-Title` value (see [Authentication](/authentication#try-it-without-a-key)). See [Data and privacy](/data-privacy) and [Security and privacy](/security) for what Keenable keeps. Keyless responses carry `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` for the hourly limit, and a `429` adds `Retry-After`. You share that pool with everyone else on your egress address, so other traffic can use up your headroom. Use a key for anything past a first look. Pay-per-request calls don't draw on your balance either. You pay for each one on its own, and they have their own [limits](/pay-per-request#limits). ## Errors Every error body from these endpoints has a stable `code`, a one-sentence `fix`, `retryable`, and a `docs_url` that links to the matching section of [Errors](/errors). A retryable error adds `retry_after_seconds` and a matching `Retry-After` header. Branch on `code`, not on the text of `error` or `message`. See [Error codes](/errors#error-codes) for every code, grouped by type, with whether retrying helps and what to do. [Retry rules](/errors#retry-rules) says when to send a failed request again. # Get API key identity Source: https://docs.keenable.ai/api-reference/auth-user GET /v1/auth/user Check that an API key works with GET /v1/auth/user, and see the user who created it and the organization it belongs to. Free. Check that an API key works, and see which organization its calls draw on. The response names the user who created the key and the organization the key belongs to. ## When to use it Call it once at startup, before your first search or fetch, to catch a mistyped or revoked key early. The call is free. It counts toward your organization's [rate limit](/rate-limits) like any keyed call. ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl "https://api.keenable.ai/v1/auth/user" \ -H "X-API-Key: $KEENABLE_API_KEY" ``` A `200` means the key works. The response looks like this: ```json Example response · IDs left out theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "user_id": "...", "email": "dev@example.com", "display_name": "Ada Lovelace", "org_id": "...", "org_name": "Example Inc" } ``` `email`, `display_name` and `org_name` are `null` when Keenable has no value for them. A `401` means the key is missing, malformed or unknown, and a `403` means it was revoked. See [Authentication → Error responses](/authentication#error-responses). This endpoint takes an API key only. A signed-in session token returns `401` with `api_key_required`. It has no keyless or pay-per-request path. ## SDK, CLI and MCP | Client | Call | | - | - | | Python, TypeScript, Go, Rust | No method. Call the API. | | CLI | No command. `keenable login --api-key` calls it to check a key before saving it, and `keenable configure-mcp` to check the saved key. | | MCP | No tool. | ## Related operations * [API keys](/api-keys) explains how to create and rotate a key. * [Authentication](/authentication) covers the `X-API-Key` and `Authorization: Bearer` headers. # Get billing Source: https://docs.keenable.ai/api-reference/billing GET /v1/billing Read what each call costs with GET /v1/billing and, with an API key, your organization's balance and this month's usage. Free, read-only, key optional. > [!NOTE] > > Billing is in beta. Its fields can change without notice. See [Versioning](/versioning). Read what each call costs and, with an API key, how much your organization has left and has spent this month. The call is read-only and free, and it takes no parameters. ## When to use it Call it before a large job to check that the balance covers it, or let an agent check its own budget. Over MCP, the [`get_billing`](/mcp-server#get_billing) tool returns the same object. Without a key, you get the public list prices and `account: null`. Keyless calls are limited to 60 requests per minute per IP address, separate from the search and fetch [rate limits](/rate-limits). ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "object": "billing", "prices": [ { "sku": "search.pro", "unit": "search", "unit_price": { "amount": 0.004, "currency": "usd" } }, { "sku": "search.realtime", "unit": "search", "unit_price": { "amount": 0.004, "currency": "usd" } }, { "sku": "search.extra_result", "unit": "result", "unit_price": { "amount": 0, "currency": "usd" } }, { "sku": "fetch", "unit": "page", "unit_price": { "amount": 0.004, "currency": "usd" } }, { "sku": "fetch.live", "unit": "page", "unit_price": { "amount": 0.004, "currency": "usd" } } ], "account": null } ``` `search.extra_result` counts each result past the first 10 in one search. It's listed at `0` because results past 10 aren't charged: a search costs the same whether it returns 1 result or 50. With a key, `prices` lists your organization's own prices. Each one adds `list_unit_price` and `source`: `list` when you pay the list price, `contract` when your organization has its own. A SKU without a price on your plan is left out. `account` adds: * `balance.available`: what you can still spend, your unused free allowance plus your purchased balance. It's negative only if your organization may go into debt and has. * `balance.purchased`: the part you bought. It's spent after the free allowance. * `usage.since`: when the current monthly period started, the day your free allowance last renewed. * `usage.cost`: everything charged since then, the same spend your balance subtracts. * `usage.line_items`: `quantity` and `cost` for `search`, `search.extra_result` and `fetch`. Other charged products count toward `usage.cost` but have no line item, so the line items can add up to less than `usage.cost`. * `billing_url`: the console page where a person can [top up](/credits#monthly-allowance). * `as_of`: when the values were read. Usage can lag recent calls by about a minute. Every amount is a `Money` object: `amount` is a number in US dollars, with up to nine decimal places, and `currency` is `usd`. Prices under a cent keep every digit, such as `0.0005`. ## Caching Without a key, the response carries `Cache-Control: public, max-age=300`, so you can cache the list prices for 5 minutes. With a key, it carries `Cache-Control: private, no-cache`. Both carry `Vary: Authorization, X-API-Key`, so a shared cache never serves the public prices in answer to a call with a key. ## Errors A call with a key that isn't accepted never falls back to the public view. | Status | `code` | When | | - | - | - | | `400` | [`unknown_parameter`](/errors#unknown-parameter) | The request has a query parameter. The call takes none. | | `401` | [`invalid_api_key`](/errors#invalid-api-key) | The key is malformed, unknown or expired. | | `403` | [`credentials_forbidden`](/errors#credentials-forbidden) | The key was revoked. | | `409` | [`no_active_organization`](/errors#no-active-organization) | You signed in, over MCP for example, but your account has no active organization. | | `429` | [`rate_limited`](/errors#rate-limited) | Without a key, your IP address sent more than 60 calls in a minute. Wait for `Retry-After`. | | `500` | [`balance_check_unavailable`](/errors#balance-check-unavailable) | Your balance couldn't be read. Retry after `Retry-After`. The call never reports a balance of 0 instead. | | `500` | [`billing_account_not_found`](/errors#billing-account-not-found) | Your organization has no billing record. Retrying won't help: contact support with the `request_id`. | ## SDK and MCP | Client | Call | | - | - | | Python, TypeScript | `client.billing()` | | Go | `client.Billing(ctx, nil)` | | Rust | `client.billing()` | | MCP | `get_billing`, no arguments | ## Related pages * [Balance and usage](/credits) explains the free allowance, the prepaid balance and `usage` on each response. * [Pricing](/pricing) lists the standard price of each SKU. # Fetch API reference Source: https://docs.keenable.ai/api-reference/fetch GET https://api.keenable.ai/v1/fetch Fetch a web page with GET /v1/fetch and get its main text as markdown, or only the part a prompt asks for. Read a web page as clean markdown, or pass a prompt to get only the part you need. > [!WARNING] > > `GET /v1/fetch` and `GET /v1/fetch/public` are deprecated and work until 1 March 2027. Use [`POST /v1/fetch`](/api-reference/fetch-post), which reads up to 20 URLs per call. Its last section, Move from GET /v1/fetch, maps each parameter. Each response carries `Deprecation: true`, a `Sunset` header and a `Link` header that points to the replacement. See [Versioning and deprecation](/versioning#deprecated-now). The [API reference](/api-reference) covers the base URL, authentication and the limits both endpoints share. Prefer the official SDKs (`pip install keenable`, `npm install keenable`, `cargo add keenable`, or the Go module). They read `KEENABLE_API_KEY` from the environment. For raw HTTP, use the curl tab. ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -G https://api.keenable.ai/v1/fetch \ -H "X-API-Key: $KEENABLE_API_KEY" \ --data-urlencode "url=https://arxiv.org/abs/2611.00286" ``` ```json 200 theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "url": "https://arxiv.org/abs/2611.00286", "title": "Quantization of Large Models with Weight Outliers and Sparsity", "content": "# Quantization of Large Models with Weight Outliers and Sparsity\n\nComputer Science > Machine Learning\n\n[Submitted on 30 Oct 2026]\n\n**Authors:** Leonidas Tsigkounakis, Abraham Jaeger Mountain, Yilang Zhang, Georgios B. Giannakis\n\n## Abstract\n\nPost-training quantization (PTQ) reduces the memory burden of large model deployment by casting the high precision trained weights to fewer bits. While this promotes memory-efficient inference, it also incurs quantization error that impairs model performance. To compensate for quantization error, the present contribution decomposes the original trained weights into a quantized matrix, a low-rank component, and a sparse matrix that accounts for outlier rows in the weights. Due to analytical intractability and the discrete structure of the decomposition, a simulated annealing search is employed to explore candidate decompositions while avoiding poor local minima. Numerical tests demonstrate the effectiveness of this approach across a broad suite of large language models, including Llama 3.2 1B, Llama 3.2 3B, Llama 3.1 8B, and Qwen2.5 7B, evaluated on natural language generation benchmarks using 4-bit NF4 and FP4 quantizers. The novel method can markedly outperform direct quantization while incurring minimal memory overhead.\n\n- **Comments** Accepted at the NeurIPS 2026 Workshop on On-Device Intelligence: Foundation Models under Real-World Constraints\n- **Subjects** Machine Learning (cs.LG)\n- **Cite as** arXiv:2611.00286 [cs.LG]\n (or arXiv:2611.00286v1 [cs.LG] for this version)\n https://doi.org/10.48550/arXiv.2611.00286\n\n## Submission history\n\nFrom: Leonidas Tsigkounakis [view email] \n[v1] Fri, 30 Oct 2026 19:09:01 UTC (2,827 KB)", "truncated": false, "total_chars": 1694, "description": "", "author": "Leonidas Tsigkounakis, Abraham Jaeger Mountain, Yilang Zhang, Georgios B. Giannakis", "published_at": "2026-10-30T00:00:00Z" } ``` ## Without a key `GET /v1/fetch/public` takes the same query parameters and returns the same shape, with no API key: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -G "https://api.keenable.ai/v1/fetch/public" \ -H "X-Keenable-Title: My App" \ --data-urlencode "url=https://arxiv.org/abs/2611.00286" ``` The public endpoint requires an `X-Keenable-Title` header with your application's name. If the header is missing, the API returns `400` with `Missing app identifier`. If you call without a key, Keenable limits requests per IP address and charges nothing. See [Authentication](/api-reference#authentication). The playground on this page calls the keyed endpoint. `POST /v1/fetch/public` is the keyless twin of `POST /v1/fetch`, with one URL per call. See [Fetch (POST) → Without a key](/api-reference/fetch-post#without-a-key). ## Request Pass everything as query parameters. Only `url` is required. A parameter that isn't listed here returns `400` with `Unknown parameter(s)` and the list of supported parameters. When the name is close to a supported one, such as `maxchars`, the error says which one you meant. See [400 Invalid request parameters](/errors#400-invalid-request). **url** `string` *required* The page to read, as an absolute `http` or `https` URL. URL-encode it when it carries its own query string (`curl --data-urlencode` does this for you). If `url` is missing, the API returns `400` with `"url" is required`. If the value isn't a URL, the message is `Could not parse the provided URL`. A URL without a scheme, such as `example.com`, returns the same message, so start it with `https://` or `http://`. If no page exists at the URL, the API returns `404`. **max_chars** `integer` (default: 50000) Hard cap on the characters of `content`. Longer content is cut to fit and ends with `...` (left out when `max_chars` is 3 or less), so `content` is never longer than the number you set. The response then has `truncated` set to `true`, and `total_chars` gives the length of the full page. Any value that isn't a positive integer returns `400` with `"max_chars": must be a positive integer`. See [Read long pages](/guides/long-pages). **live** `boolean` (default: false) Fetch the page from the source now instead of returning Keenable's indexed copy. Without it, Keenable returns its indexed copy if it has one and fetches the page otherwise. Use `live` when you need the current version of a page that changes often. Any value other than `true` or `false` returns `400` with `"live": must be true or false`. See [Live fetch](/guides/live-fetch). **prompt** `string` An instruction for extracting part of the page, at most 2000 characters. When set, a model reads the page and `content` holds only its answer instead of the whole page. On the [TypeScript handbook's Everyday Types page](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html), the prompt above returns `string`, `number`, `boolean`, `bigint`, `symbol`, `null` and `undefined`, one per line. A prompt longer than 2000 characters returns `400` with `"prompt": must be 2000 characters or less`. See [Fetch with a prompt](/guides/fetch-with-prompt). **session_id** `string` Your own ID for grouping related requests, up to 128 characters. You can send it as the `X-Keenable-Session-Id` header instead. If you send both, the header wins. ## Response A `200` returns the page as markdown. Fields marked **required** are always present; the others are left out when Keenable doesn't know them. **url** `string` *required* The page's final address after redirects. It can differ from the `url` you sent: `http://typescriptlang.org/docs/...` comes back as `https://www.typescriptlang.org/docs/...`. Cite this one. **content** `string` *required* The page's main text as markdown, with navigation and boilerplate stripped. Headings, lists, links, tables and code blocks are kept. Capped by `max_chars`. With `prompt`, it holds the extraction instead of the page. **truncated** `boolean` `true` when the page was longer than `max_chars` and `content` was cut. Cut content ends with `...`, except when `max_chars` is 3 or less. **total_chars** `integer` The length of the full page content in characters, before `max_chars` was applied. Equal to the length of `content` when `truncated` is `false`. **title** `string` The page title, for example `Quantization of Large Models with Weight Outliers and Sparsity`. **author** `string` The author or authors as the page names them, for example `Leonidas Tsigkounakis, Abraham Jaeger Mountain, Yilang Zhang, Georgios B. Giannakis`. Left out when the page names no author. **published_at** `string` When the page was published, as an ISO 8601 timestamp in UTC such as `2026-10-30T00:00:00Z`, the same format as on search results. Left out when the publish date is unknown. Earlier versions of the API sent it as Unix seconds (`1793318400`), so code that also reads stored older responses should accept both. **description** `string` *deprecated* Always an empty string; read `content`. Kept so older clients don't break; see [Versioning and deprecation](/versioning). **usage** `object` What the call was billed. Present on successful calls made with a key. The public endpoint leaves it out. A fetch that Keenable had to make live, because it had no indexed copy, is billed as `fetch.live` even without `live=true`. See [Balance and usage](/credits). **properties** **sku** `string` *required* The billed operation: `search.pro`, `search.realtime`, `fetch` or `fetch.live`. **amount** `integer` *required* How many units of the SKU were billed. **credits** `number` *required* What the call cost, in credits. One credit is \$0.004. **paid** `boolean` *required* `true` if the call drew on your prepaid balance, `false` if it came from the free allowance. **credits_remaining** `number` Credits your organization has left after the call: the unused part of the free allowance for the current billing period plus your prepaid balance, in credits of \$0.004. It's negative if your organization is allowed a negative balance and is in debt. It's an estimate that can lag your other calls by a few seconds. Left out if the balance couldn't be read. ## Errors Every error has the same JSON shape, with a short `error` and a `message` that says what to change: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "error": "Not found", "message": "The page does not exist at this URL. Check that the URL is correct." } ``` | Status | When | Fix | | - | - | - | | [`400`](/errors#400-invalid-request) | A parameter is missing or invalid. `message` names it. | Correct the parameter. Don't retry unchanged. | | [`401`](/errors#401-missing-key) | No key was sent: `Missing authentication`, code `missing_api_key`. | Send your key in `X-API-Key` or `Authorization: Bearer`. | | [`401`](/errors#401-invalid-key) | The key is [malformed](/errors#401-malformed-key) or unknown: `Authentication failed`, code `invalid_api_key`. `message` says which. | Copy the full key from the [console](https://app.keenable.ai/console/api-keys), or create a new one. | | [`402`](/errors#402) | The account is out of funds. | Top up in the console. Don't retry. | | [`403`](/errors#403) | The key is revoked (`Forbidden`), the target site blocked the fetch (`Upstream forbidden`), or the URL points to a private or internal address. | For the key, use another key. For the site or address, try a different URL. | | [`404`](/errors#404) | There is no page at this URL. | Check the URL. | | [`422`](/errors#422) | The page exists but its content couldn't be extracted, for example behind a login or paywall. | Skip the URL. Don't retry the same call. | | [`429`](/errors#429) | Your rate limit was exceeded, or the target site rate-limited the fetch. | Wait for `Retry-After`, then retry. | | [`5xx`](/errors#5xx) | Keenable had a server error (`500`), couldn't reach the page (`502`), couldn't check your key (`503`, with `Retry-After`), or the page timed out (`504`). | Retry up to 3 times with backoff, honouring `Retry-After`. | The body also has a stable `code`, a `fix` and `retryable`. Branch on `code`. Every status and code, with its exact message and fix, is on [Errors](/errors#error-codes). # Fetch (POST) API reference Source: https://docs.keenable.ai/api-reference/fetch-post POST https://api.keenable.ai/v1/fetch Read up to 20 web pages in one call with POST /v1/fetch: markdown, an answer to a prompt, typed JSON, links and images for each URL. Read up to 20 pages in one call and get one result for each URL, in the order you sent them. Each result is the page as markdown, or what you asked for instead: an answer to a prompt, a JSON object that matches your schema, the page's links and its images. The [API reference](/api-reference) covers the base URL, authentication and the limits every endpoint shares. The SDKs call this endpoint from `fetch`. See [SDK methods](/sdks#methods). ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { Keenable } from "keenable"; async function main() { // reads KEENABLE_API_KEY from the environment const client = new Keenable(); const response = await client.fetch( [ "https://www.postgresql.org/support/versioning/", "https://nodejs.org/en/about/previous-releases", ], { prompt: "List the supported major versions and when each one stops getting updates, one per line.", maxAgeHours: 24, // a stored copy younger than a day, or a live read }, ); // results[i] is for urls[i] for (const page of response.results) { if (page.error) { console.log("failed:", page.url, page.error.code); continue; } console.log(page.title, page.url); console.log(page.content); } } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from keenable import Keenable # reads KEENABLE_API_KEY from the environment client = Keenable() response = client.fetch( [ "https://www.postgresql.org/support/versioning/", "https://nodejs.org/en/about/previous-releases", ], prompt="List the supported major versions and when each one stops getting updates, one per line.", max_age_hours=24, # a stored copy younger than a day, or a live read ) # results[i] is for urls[i] for page in response.results: if page.error: print("failed:", page.url, page.error.code) continue print(page.title, page.url) print(page.content) ``` ```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} package main import ( "context" "fmt" "log" "github.com/keenableai/keenable-sdk/go" ) func main() { // reads KEENABLE_API_KEY from the environment client, err := keenable.New(nil) if err != nil { log.Fatal(err) } defer client.Close() maxAge := 24.0 // a stored copy younger than a day, or a live read resp, err := client.FetchWithOptions(context.Background(), []string{ "https://www.postgresql.org/support/versioning/", "https://nodejs.org/en/about/previous-releases", }, &keenable.FetchOptions{ Prompt: "List the supported major versions and when each one stops getting updates, one per line.", MaxAgeHours: &maxAge, }) if err != nil { log.Fatal(err) } // Results[i] is for urls[i] for _, page := range resp.Results { if page.Error != nil { fmt.Println("failed:", page.URL, page.Error.Code) continue } fmt.Println(page.Title, page.URL) fmt.Println(page.Content) } } ``` ```rust Rust theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} use keenable::{Client, FetchOptions}; #[tokio::main] async fn main() -> Result<(), keenable::Error> { let client = Client::new()?; // reads KEENABLE_API_KEY from the environment let opts = FetchOptions { prompt: Some( "List the supported major versions and when each one stops getting updates, one per line." .into(), ), max_age_hours: Some(24.0), // a stored copy younger than a day, or a live read ..Default::default() }; let response = client .fetch_with( [ "https://www.postgresql.org/support/versioning/", "https://nodejs.org/en/about/previous-releases", ], &opts, ) .await?; // results[i] is for urls[i] for page in &response.results { if let Some(error) = &page.error { println!("failed: {} {}", page.url, error.code.as_deref().unwrap_or_default()); continue; } println!("{} {}", page.title, page.url); println!("{}", page.content); } Ok(()) } ``` ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl https://api.keenable.ai/v1/fetch \ -H "X-API-Key: $KEENABLE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "urls": [ "https://www.postgresql.org/support/versioning/", "https://nodejs.org/en/about/previous-releases" ], "content": { "prompt": "List the supported major versions and when each one stops getting updates, one per line." }, "retrieval": {"max_age_hours": 24} }' ``` ## How a call works * Keenable reads the pages in parallel. `results` has one entry per URL you sent, in the same order: `results[i]` is for `urls[i]`. * Each entry is either a page or `{"url": ..., "error": {...}}`, where `url` is the URL as you sent it and `error` says why that page failed. A page that fails doesn't fail the call, and the call returns `200`. * Keenable checks every URL before it reads any page. A URL listed twice in one call, or one that isn't a valid `http` or `https` URL or runs over 8,192 characters, fails the whole call with `400` and `param` set to `urls[i]`. A URL that points to a private or internal address fails the whole call with `403` and `private_url_not_allowed`, as on [`GET /v1/fetch`](/api-reference/fetch). Nothing is read or billed. A repeated URL is refused so that no page is read and billed twice in one call. * The whole call fails, with no `results`, when the request itself can't run: an invalid body or URL, a missing or wrong API key, a balance that can't cover the call or the rate limit. It also fails when every URL fails with the same `400`, `401`, `402` or `403` error, such as a `content.schema` that Keenable can't use. The call then returns that error. See [Errors](#errors). * A call counts as one request toward your organization's [rate limit](/rate-limits), however many URLs it has. * Each page read is billed at the fetch price, so a call that reads 20 pages costs 20 times one page. Each page is billed as a `GET /v1/fetch` of that URL would be, failed pages included. Before any page is read, your free allowance and balance must cover every URL in the call. If they don't, the call returns `402` with `insufficient_credits` and reads nothing. ## What each page returns `content` sets what each page carries. Every field in it is optional. | Send in `content` | Each page in `results` | | - | - | | Nothing | `content` holds the page as markdown, up to 50,000 characters. | | `{"max_chars": 20000}` | `content` is cut to 20,000 characters, and `truncated` is `true` when the page was longer. | | `{"prompt": "..."}` | A model reads the page, and `content` holds only its answer to the prompt. | | `{"schema": {...}}` | `content` keeps the page, and `structured` holds a JSON object that matches your schema. | | `{"links": 50}` | `links` holds up to 50 of the page's links, each as `{url, text}`. | | `{"images": 10}` | `images` holds up to 10 of the page's images, each as `{url, alt}`. | Every page also carries `image`, its main image, and `favicon`, the site's icon. You don't need to ask for them. Either is `null` when the page has none. `prompt` works the same way as the `prompt` parameter of `GET /v1/fetch`. Write it as an instruction or a question about the page, such as `List the pricing tiers with their monthly prices`. `schema` takes a [JSON Schema](https://json-schema.org/) whose root has `"type": "object"`. If the page is read but the answer can't be made, the page still comes back with `answer_error` in place of `structured`. `answer_error.code` is one of `summary_input_too_long`, `summary_no_content`, `summary_truncated`, `summary_schema_mismatch` and `summary_failed`. ## Where pages come from By default, Keenable returns its indexed copy of a page if it has one, whatever its age, and reads the page live from its source otherwise. `retrieval.max_age_hours` changes that: | Send in `retrieval` | What each page is read from | | - | - | | Nothing | The indexed copy, or a live read when there is none. | | `{"max_age_hours": 24}` | The indexed copy if it's younger than 24 hours. An older copy is read again live. | | `{"max_age_hours": 0}` | A live read, the same as `live=true` on `GET /v1/fetch`. | `max_age_hours` takes a number of hours from `0` to `720` (30 days). Fractions work: `0.25` is 15 minutes. When you send `max_age_hours`, each page has `stale`. It's `true` when the page you got is an indexed copy older than `max_age_hours`, because the live read failed or Keenable couldn't use what it read. Otherwise it's `false`. ## Billing * Each page that comes back without an error is billed as one fetch at the [standard fetch prices](/pricing#what-each-call-costs): `fetch` for Keenable's indexed copy, `fetch.live` for a live read. * A page that fails is treated like a failed `GET /v1/fetch` call. See What isn't billed on [Pricing](/pricing). * `prompt`, `schema`, `links` and `images` don't change the price. * Each page carries its own `usage` object, the same as a `GET /v1/fetch` response. See [Balance and usage](/credits). ## Without a key `POST /v1/fetch/public` takes the same body and returns the same shape, with no API key and one URL per call: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST "https://api.keenable.ai/v1/fetch/public" \ -H "X-Keenable-Title: My App" \ -H "Content-Type: application/json" \ -d '{ "urls": ["https://www.postgresql.org/support/versioning/"] }' ``` You get `{"results": [...]}` with one entry, the page or its error, as on the keyed endpoint. * The public endpoint requires your application's name, in the `X-Keenable-Title` header or the `keenable_title` query parameter. Without either, the API returns `400` with `Missing app identifier`. * `urls` takes one URL. More than one returns `400` with `invalid_parameter` on `urls`, and no page is read. * Keyless calls are free, and their pages carry no `usage`. Keenable limits them per IP address. `GET` and `POST` on `/v1/fetch/public` share one limit. * Some sites can't be read without a key. For those, `results[0].error` has the code `public_domain_requires_api_key`. On `POST /v1/fetch`, a call without a key returns `401` with `missing_api_key`. Send the key in `X-API-Key` or as `Authorization: Bearer`. See [Authentication](/api-reference#authentication). The playground on this page calls the keyed endpoint. ## Limits | Limit | Value | | - | - | | URLs per call | 1 to 20 | | Each URL | up to 8,192 characters, sent once per call | | How a call counts against the rate limit | 1 request, however many URLs | | `content.max_chars` | 1 or more, default 50,000 | | `content.prompt` | up to 2,000 characters | | `content.schema` | up to 20,000 characters as compact JSON | | `content.links` | 1 to 1,000 | | `content.images` | 0 to 25 | | `retrieval.max_age_hours` | 0 to 720, fractions allowed | ## Request Send a JSON object with `Content-Type: application/json`. Only `urls` is required. A field that isn't listed here, at the top level or inside `content` or `retrieval`, returns `400` with `unknown_parameter`, and the message lists the supported fields. To group the calls of one agent task, send the `X-Keenable-Session-Id` header. **urls** `string[]` *required* The pages to read: 1 to 20 absolute `http` or `https` URLs, each up to 8,192 characters and each listed once. Send `urls` even for one page. If `urls` is missing, the API returns `400` with `missing_parameter`. If it isn't an array of 1 to 20 non-empty strings, the API returns `400` with `invalid_parameter`. If one URL is listed twice, isn't a valid URL or is too long, the API returns `400` with `invalid_parameter` and `param` set to that entry, such as `urls[2]`, and reads no page. If one points to a private or internal address, the API returns `403` with `private_url_not_allowed` and `param` set to that entry, and reads no page. **content** `object` What each page carries. See [What each page returns](#what-each-page-returns). **properties** **max_chars** `integer` (default: 50000) The most characters of `content` per page, 1 or more. Longer content is cut to fit and ends with `...`, and the page then has `truncated` set to `true`. **prompt** `string` What you want from each page, up to 2,000 characters. A model reads each page, and its `content` holds only the answer. An empty prompt returns `400` with `invalid_parameter`. **schema** `object` A JSON Schema whose root has `"type": "object"`. Each page gets `structured`, an object that matches it, or `answer_error`. A schema that isn't an object with that root, is over 20,000 characters as compact JSON or has a `$ref` outside itself returns `400` with `invalid_parameter` on `content.schema`. **links** `integer` The most links to return per page, 1 to 1,000. Leave it out for none. **images** `integer` The most images to return per page, 0 to 25. Leave it out, or send `0`, for none. **retrieval** `object` Where each page is read from. See [Where pages come from](#where-pages-come-from). **properties** **max_age_hours** `number` Use Keenable's indexed copy only if it's younger than this many hours, 0 to 720. `0` always reads the page live. Fractions work. Leave it out for an indexed copy of any age. ## Response A `200` returns `{"results": [...]}`, with one entry per URL in `urls`, in the same order. **results** `object[]` *required* Each entry is a page, or an error for that URL. **a page: properties** **url** `string` *required* The page's final address after redirects. It can differ from the URL you sent. Cite this one. **content** `string` *required* The page's main text as markdown, capped by `max_chars`. With `prompt`, the model's answer instead. **truncated** `boolean` `true` when `content` was cut to `max_chars`. **total_chars** `integer` The length of the full content in characters, before `max_chars` was applied. **title** `string` The page title. Left out when the page has none. **author** `string` The author as the page names them. Left out when the page names none. **published_at** `string` When the page was published, as an ISO 8601 timestamp in UTC. Left out when it's unknown. **image** `string | null` *required* The page's main image, or `null`. Always present: you don't need to ask for it. **favicon** `string | null` *required* The site's icon, or `null`. Always present: you don't need to ask for it. **images** `object[]` `{url, alt}` for each image, when you sent `content.images`. `alt` is `null` when the page gives none. **links** `object[]` `{url, text}` for each link, when you sent `content.links`. `text` is `null` when the link has none. **structured** `object` The answer that matches `content.schema`. **answer_error** `object` `{code, message}` when you sent `content.schema` and the answer couldn't be made. **stale** `boolean` Present when you sent `retrieval.max_age_hours`. `true` when the page is an indexed copy older than you asked for. See [Where pages come from](#where-pages-come-from). **description** `string` *deprecated* Always an empty string; read `content`. **usage** `object` What this page was billed, with `sku`, `amount`, `credits`, `paid` and `credits_remaining`, as on [`GET /v1/fetch`](/api-reference/fetch#response). **an error: properties** **url** `string` *required* The URL as you sent it. **error** `object` *required* Why the page failed: `status`, the HTTP status of that page's error, plus the fields of an error response, such as `error`, `message`, `code`, `type`, `fix` and `retryable`. A retryable error has `retry_after_seconds`. Branch on `code`. Every code is on [Errors](/errors#error-codes). This response shows the shape of a call with two URLs: one page, with its text left out, and one URL that failed: ```json Example response · shape only theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "results": [ { "url": "https://www.postgresql.org/support/versioning/", "title": "...", "content": "...", "truncated": false, "total_chars": 0, "description": "", "image": null, "favicon": null, "stale": false, "usage": { "sku": "fetch", "amount": 1, "credits": 1, "paid": false } }, { "url": "https://example.com/missing-page", "error": { "status": 404, "error": "Not found", "message": "The page does not exist at this URL. Check that the URL is correct.", "code": "page_not_found", "type": "target_error", "retryable": false } } ] } ``` ## Errors These statuses fail the whole call. Errors for single pages come back in `results`. Every error has the same shape as on the other endpoints, with `error`, `message`, `code`, `fix` and `retryable`. | Status | When | Fix | | - | - | - | | `400` | The body isn't a JSON object, a field is unknown (`unknown_parameter`), `urls` is missing (`missing_parameter`) or a value is out of range (`invalid_parameter`). Also when a URL is listed twice, is invalid or is over 8,192 characters (`param` is `urls[i]`). On `/v1/fetch/public`, also when `X-Keenable-Title` is missing (`missing_app_title`) or `urls` has more than one URL. | Correct the field named in `param` and `message`. Don't retry unchanged. | | `401` | No API key (`missing_api_key`), or the key isn't valid (`invalid_api_key`). | Send a valid key in `X-API-Key`. | | `402` | Your allowance and balance can't cover every URL in the call (`insufficient_credits`). | Top up in the console, or send fewer URLs. | | `403` | The key is revoked, a URL points to a private or internal address (`private_url_not_allowed`, `param` is `urls[i]`), or every URL failed with the same `403`. | Read `message`. For a revoked key, use another key. For a private address, remove that URL or replace it with a public one. | | `429` | The call would go over your organization's requests per second (`rate_limit_per_second`). On `/v1/fetch/public`, your IP address went over the keyless limit. | Wait for `Retry-After`, then retry. | ## Move from GET /v1/fetch | `GET /v1/fetch` | `POST /v1/fetch` | | - | - | | `url=...` | `"urls": ["..."]`, up to 20 | | `max_chars` | `content.max_chars` | | `prompt` | `content.prompt` | | `live=true` | `"retrieval": {"max_age_hours": 0}` | | `session_id=...` | The `X-Keenable-Session-Id` header | | The page as the response body | The page as `results[0]` | | An error status for the call | `results[i].error` for that URL, and the call returns `200` | | Keyless on `GET /v1/fetch/public` | Keyless on `POST /v1/fetch/public`, one URL per call | # Monitors webhook payload Source: https://docs.keenable.ai/api-reference/monitors-webhook-payload The body and headers of every Monitors webhook delivery: the event envelope, the ten event types, and the monitor, run, result and page objects in data. Every Monitors webhook delivery is an HTTP `POST` with a JSON body: one event in a fixed envelope, signed with the monitor's `webhook.secret`. This page lists the headers, the envelope fields, each event type and the objects in `data`, so your handler can parse every event it subscribes to. To set up a handler and verify signatures, see [Receive monitor webhooks](/guides/monitor-webhooks). ## Headers | Header | Value | | - | - | | `Content-Type` | `application/json` | | `webhook-id` | The event's `id`, such as `evt_9f2c4e1a7b3d4c5e8f6a0b1c2d3e4f5a`. The same on every retry | | `webhook-timestamp` | When this attempt was sent, in Unix seconds | | `webhook-signature` | `v1,`: base64 of HMAC-SHA256 over `..`, keyed with the base64-decoded part of `webhook.secret` after `whsec_`. Space-separated if there is more than one entry | A delivery can carry other headers. Verify it with these three, as [Verify the signature](/guides/monitor-webhooks#verify-the-signature) shows. ## Envelope Every event has the same five top-level fields: | Field | Type | What it holds | | - | - | - | | `id` | string | The event's ID, `evt_` and 32 hex characters. Equal to `webhook-id`. Drop repeats by it | | `type` | string | One of the [event types](#event-types) | | `created_at` | string | When the event was created, ISO 8601 in UTC with milliseconds, such as `2026-11-19T09:00:03.512Z`. It stays the same across retries | | `data` | object | `monitor_id` plus one object that depends on `type` | | `metadata` | object or `null` | The `metadata` you set on the monitor, or `null` if it has none | ## Event types A monitor sends only the types its `webhook.events` lists. If `webhook.events` is empty or missing, a search monitor sends every type in this table except `monitor.page.changed`. A page monitor sends `monitor.created`, `monitor.updated`, `monitor.deleted`, `monitor.disabled`, `monitor.run.failed` and `monitor.page.changed`, and sends `monitor.run.created` and `monitor.run.completed` only when `webhook.events` lists them. | `type` | `data` holds | Sent when | | - | - | - | | `monitor.created` | `monitor_id`, `monitor` | You created the monitor | | `monitor.updated` | `monitor_id`, `monitor` | You changed the monitor | | `monitor.deleted` | `monitor_id`, `monitor` | You deleted the monitor | | `monitor.run.created` | `monitor_id`, `run` | A scheduled or triggered run started | | `monitor.run.completed` | `monitor_id`, `run` | A run finished. A run with no new results still sends it, with `results: []` | | `monitor.run.failed` | `monitor_id`, `run` | A run failed. `run.error.message` says why | | `monitor.disabled` | `monitor_id`, `monitor`, `reason` | Keenable disabled the monitor. `reason` is a sentence, such as `no webhook delivery succeeded for 3 days` | | `monitor.result.found` | `monitor_id`, `result` | The monitor accepted a new page, minutes after Keenable crawled it | | `monitor.result.changed` | `monitor_id`, `result` with `change` | A page you already got changed in substance | | `monitor.page.changed` | `monitor_id`, `run`, `page` | A page monitor's run found a change worth telling. `run.changes` and `page` describe it | ## Objects in data ### monitor `monitor` is the monitor as [Get a monitor](/api-reference/monitors/get) returns it, with its state after the change. It never carries `webhook.secret`. ### run `run` is a run as [Get a run](/api-reference/monitors/run) returns it: | Field | What it holds | | - | - | | `id`, `monitor_id` | The run's ID and its monitor's ID | | `object` | Always `monitor_run` | | `status` | `queued`, `running`, `completed`, `failed` or `cancelled` | | `results` | A list of [result](#result) objects when `status` is `completed`, `[]` if the run found nothing new, otherwise `null` | | `output` | `{structured, text, grounding, fresh, error}` if the monitor has an `output_schema`, otherwise `null`. A search run that found no results has none. See [Structured outputs](/products/monitors#structured-outputs) | | `error` | `{"code": "run_failed", "message": "..."}` on a failed run, otherwise `null` | | `created_at`, `started_at`, `ended_at` | When the run was created, started and ended, or `null` | | `changes` | On a page monitor's run, what the check of the page found: `changed`, `notified`, `baseline`, `version`, `source`, `summary`, `items` and `diff`. See [Changes and versions](/products/monitors#changes-and-versions). `null` on a search monitor's run | ### result `result` in `monitor.result.found` and `monitor.result.changed` has the fields of a result from [List results](/api-reference/monitors/results), except `id` and `same_story`: | Field | What it holds | | - | - | | `url`, `title` | The page's URL and title | | `published_at`, `published_at_source` | When the page was published, and where that date comes from: `declared`, `url`, `x` or `text` | | `acquired_at` | When Keenable crawled this version of the page | | `matched_at` | When the monitor accepted the page | | `summary` | One line on what the page reports | | `importance` | How much the page matters for the monitor's topic, from 1 to 5. A monitor accepts no page under 3 | | `kind` | A label for the kind of page, such as `news` or `new_item` | | `source_type` | `original` or `rewrite` | | `text` | The page's first 6,000 characters. Present only if the monitor sets `search.content.text` | | `change` | Present only in `monitor.result.changed`. See [change](#change) | | `author`, `image` | Always `null` in webhook events | ### change `change` says how a page differs from the version the monitor stored before: | Field | What it holds | | - | - | | `previous_at` | When the earlier version was stored | | `previous_title` | The earlier version's title | | `previous_sent` | Whether the earlier version was sent to you | | `ratio` | How much of the text is new, from 0 to 1 | | `added`, `removed` | The sentences added and removed | ### page `page` in `monitor.page.changed` is the watched page as this run read it: | Field | What it holds | | - | - | | `url` | The page's URL | | `name` | The monitor's `name`, or `null` | | `title` | The page's title, or `null` | | `version` | The page's version number after this run | | `source` | Where the text came from: `live` or `stream` | | `summary`, `items` | What changed, in one sentence and as a list. The same as `run.changes.summary` and `run.changes.items` | | `change` | The same as `run.changes.diff`: `previous_at`, `ratio`, `added` and `removed` | ## Example bodies A `monitor.result.found` event, formatted here for reading. Keenable sends the body as compact JSON, so verify the bytes you received, not a reformatted copy: ```json monitor.result.found theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "id": "evt_9f2c4e1a7b3d4c5e8f6a0b1c2d3e4f5a", "type": "monitor.result.found", "created_at": "2026-11-19T09:00:03.512Z", "data": { "monitor_id": "mon_3kq9z2c8f1a04b7d9e6f5a21", "result": { "url": "https://example.com/news/example-70b", "title": "Example Labs releases a 70B open-weights model", "author": null, "published_at": "2026-11-19T08:41:00.000Z", "acquired_at": "2026-11-19T08:52:17.000Z", "image": null, "matched_at": "2026-11-19T08:59:58.000Z", "published_at_source": "declared", "summary": "Example Labs released a 70B model with open weights under a permissive licence.", "importance": 4, "kind": "news", "source_type": "original" } }, "metadata": { "team": "research" } } ``` A `monitor.run.completed` event for a run that found nothing new: ```json monitor.run.completed theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "id": "evt_0b7d2e94c1f84a6b9d3e5f7a8c1b2d4e", "type": "monitor.run.completed", "created_at": "2026-11-19T08:00:41.207Z", "data": { "monitor_id": "mon_3kq9z2c8f1a04b7d9e6f5a21", "run": { "id": "mrun_5c1e8a2f9d7b4e3a6f0c2d81", "object": "monitor_run", "monitor_id": "mon_3kq9z2c8f1a04b7d9e6f5a21", "status": "completed", "results": [], "changes": null, "output": null, "error": null, "created_at": "2026-11-19T08:00:00.004Z", "started_at": "2026-11-19T08:00:00.120Z", "ended_at": "2026-11-19T08:00:41.198Z" } }, "metadata": null } ``` Values in these examples are illustrative. Field names and types match what the API sends. ## Types for your handler If your SDK version doesn't have typed webhook events yet, these TypeScript types describe the envelope and the objects above. Use them after you verify the signature: ```typescript keenable-webhook.ts theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} export type MonitorEventType = | "monitor.created" | "monitor.updated" | "monitor.deleted" | "monitor.run.created" | "monitor.run.completed" | "monitor.run.failed" | "monitor.disabled" | "monitor.result.found" | "monitor.result.changed" | "monitor.page.changed"; export interface MonitorResultChange { previous_at: string | null; previous_title: string | null; previous_sent: boolean | null; ratio: number | null; added: string[] | null; removed: string[] | null; } export interface MonitorResult { url: string; title: string | null; author: null; published_at: string | null; published_at_source: string | null; acquired_at: string | null; matched_at: string | null; image: null; summary: string | null; importance: number | null; kind: string | null; source_type: string | null; text?: string; change?: MonitorResultChange; } export interface MonitorPageDiff { previous_at: string | null; ratio: number | null; added: string[]; removed: string[]; } export interface MonitorPageChanges { changed: boolean; notified: boolean; baseline: boolean; version: number | null; source: "live" | "stream" | null; summary: string | null; items: string[]; diff: MonitorPageDiff | null; } export interface MonitorPage { url: string; name: string | null; title: string | null; version: number | null; source: "live" | "stream" | null; summary: string | null; items: string[]; change: MonitorPageDiff | null; } export interface MonitorRun { id: string; object: "monitor_run"; monitor_id: string; status: "queued" | "running" | "completed" | "failed" | "cancelled"; results: MonitorResult[] | null; output: { structured: unknown; text: string | null; grounding: unknown[]; fresh: boolean; error: { code: "output_failed" | "output_invalid"; message: string } | null; } | null; error: { code: string; message: string } | null; created_at: string | null; started_at: string | null; ended_at: string | null; changes: MonitorPageChanges | null; } export interface MonitorWebhookEvent { id: string; type: MonitorEventType; created_at: string; data: { monitor_id: string; monitor?: Record; run?: MonitorRun; result?: MonitorResult; page?: MonitorPage; reason?: string; }; metadata: Record | null; } ``` Switch on `type` to read the right field of `data`. For example, `event.type === "monitor.result.found"` means `event.data.result` is set. SDK 0.2.0 and later return these events typed from `verify_webhook` (`verifyWebhook` in TypeScript, `VerifyWebhook` in Go). ## Related pages * [Receive monitor webhooks](/guides/monitor-webhooks): subscribe, verify, test locally and debug deliveries. * [List deliveries](/api-reference/monitors/deliveries): each event's attempts and last error. * [Monitors](/products/monitors#webhook-events): retries, statuses and limits. # Bulk actions Source: https://docs.keenable.ai/api-reference/monitors/bulk POST /v1/monitors/bulk Pause, resume or delete many monitors at once with POST /v1/monitors/bulk, chosen by ID or by filter, with a dry run by default. Pause, resume or delete many monitors at once, chosen by `ids`, by `filter`, or both. `dry_run` defaults to `true`, so the first call only lists what would change. Send `"dry_run": false` to apply the action. A `resume` that would go past your organization's [active monitor limit](/products/monitors#limits) returns `403` with `monitor_limit_reached`, even on a dry run, and resumes nothing. ## Pause monitors by tag `filter` takes `status`, `name` (part of a name) and `metadata`, as in [List monitors](/api-reference/monitors/list). This request lists the active monitors tagged `team=research` that a pause would affect: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST "https://api.keenable.ai/v1/monitors/bulk" \ -H "X-API-Key: $KEENABLE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "pause", "filter": { "status": "active", "metadata": { "team": "research" } } }' ``` The response has `"dry_run": true`, the matching `ids` and their number in `affected`. Nothing changes yet. Check the list, then send the same body with `"dry_run": false`. | Field | What it tells you | | - | - | | `affected` | Monitors the action applied to, or would apply to, including those already in that state | | `ids` | Those monitors' IDs | | `has_more` | `true` if more monitors matched than `limit`, so the action left some out | | `not_found` | IDs you sent that aren't your organization's monitors | Deleting can't be undone, and it removes each monitor's results. Resuming counts toward your organization's active monitors. See [Limits](/products/monitors#limits). ## SDK, CLI and MCP | Client | Call | | - | - | | Python | `client.monitors.bulk("pause", filter={...}, dry_run=False)` | | TypeScript | `client.monitors.bulk("pause", { filter, dryRun: false })` | | Go | `client.Monitors.Bulk(ctx, "pause", params)` | | Rust | `client.monitors().bulk("pause", ¶ms)` | | CLI | No command. Use the API or an SDK. | | MCP | No tool. Use the API or an SDK. | The SDK methods need SDK 0.2.0 or later. Like the API, each SDK makes a dry run unless you turn it off. See [SDKs → Monitors](/sdks#monitors). ## Related operations * [Update a monitor](/api-reference/monitors/update) pauses or resumes one monitor. * [Delete a monitor](/api-reference/monitors/delete) deletes one monitor. * [Count monitors](/api-reference/monitors/stats) shows how many monitors have each status. # Create a monitor Source: https://docs.keenable.ai/api-reference/monitors/create POST /v1/monitors Create a monitor with POST /v1/monitors: a topic or a page to watch, an optional schedule and webhook. The response carries the webhook signing secret. Start watching the web for new pages about a topic with `search`, or one page for changes with `"type": "page"` and `page`. A page monitor's baseline run starts in the background after the `201`. Store `webhook.secret` from the response. Only this response and an [update](/api-reference/monitors/update) that adds a first webhook carry it. Send an `Idempotency-Key` header so a retried create doesn't make a second monitor. See [Monitors](/products/monitors) for page monitors, schedules, structured outputs, events and signatures. ## When to use it Create one monitor per topic. Every key in your organization sees the same monitors, so first [list your monitors](/api-reference/monitors/list) with `name` and reuse one on the same topic. Write `search.query` as a topic in plain words, not keywords. [Write a good query](/products/monitors#write-a-good-query) has examples. A new monitor starts empty and doesn't backfill: it matches only pages crawled after you create it. For pages already published, use [Search](/products/search). A create counts toward your organization's active monitors. See [Limits](/products/monitors#limits). The same `Idempotency-Key` with the same body within 24 hours returns the monitor the first call created. The same key with another body returns `409` with `idempotency_conflict`. ## SDK, CLI and MCP | Client | Call | | - | - | | Python, TypeScript | `client.monitors.create(...)` | | Go | `client.Monitors.Create(ctx, params)` | | Rust | `client.monitors().create(¶ms)` | | CLI | `keenable monitors create ""`, with `--every`, `--cron`, `--webhook`, `--idempotency-key` | | MCP | `create_monitor`, with `query`, `name`, `webhookUrl`, `includeDomains` and `excludeDomains` | The SDK methods need SDK 0.2.0 or later. Each SDK sends an `Idempotency-Key` on every create, yours or a new one, so it can retry the call safely. See [SDKs → Monitors](/sdks#monitors), [CLI → Monitors](/cli#monitors) and [Monitors tools](/mcp-server#monitors-tools). ## Related operations * [Update a monitor](/api-reference/monitors/update) changes the query, schedule or webhook later. * [Run a monitor now](/api-reference/monitors/trigger) starts a run without waiting for the schedule. * [List results](/api-reference/monitors/results) reads every result the monitor accepted. For a step-by-step guide, see [Create a monitor](/guides/create-a-monitor). # Delete a monitor Source: https://docs.keenable.ai/api-reference/monitors/delete DELETE /v1/monitors/{id} Delete a monitor and all its results with DELETE /v1/monitors/{id}. This can't be undone; pause a monitor to stop it for a while. Delete a monitor and all its results, or a page monitor and all its versions. The response is the monitor as it was. A deleted monitor can't be restored, so to stop one for a while, [pause it](/api-reference/monitors/update) instead. ## When to use it Delete a monitor when you no longer need its topic or its results. Its results go with it, so [read its results](/api-reference/monitors/results) first if you want to keep them. If the webhook lists `monitor.deleted`, your endpoint gets that event. If the API returns `409` with `request_rejected`, the monitor can't be deleted on its own. `message` says why. ## SDK, CLI and MCP | Client | Call | | - | - | | Python, TypeScript | `client.monitors.delete(monitor_id)` | | Go | `client.Monitors.Delete(ctx, monitorID, nil)` | | Rust | `client.monitors().delete(monitor_id)` | | CLI | `keenable monitors delete `. It asks first; without a terminal, pass `--yes`. | | MCP | `delete_monitor`, with `id` | The SDK methods need SDK 0.2.0 or later. See [SDKs → Monitors](/sdks#monitors), [CLI → Monitors](/cli#monitors) and [Monitors tools](/mcp-server#monitors-tools). ## Related operations * [Bulk actions](/api-reference/monitors/bulk) deletes many monitors at once, with a dry run first. * [List monitors](/api-reference/monitors/list) finds the `id` of the monitor to delete. * [Statuses](/products/monitors#statuses) compares pausing and deleting. # List deliveries Source: https://docs.keenable.ai/api-reference/monitors/deliveries GET /v1/monitors/{id}/deliveries List a monitor's webhook deliveries of the last 7 days with GET /v1/monitors/{id}/deliveries: attempts, the last error and the next retry. List the monitor's webhook events of the last 7 days, with the number of attempts, the last error and when the next attempt is due. Check it when your webhook seems quiet. ## Read a delivery Each delivery's `id` is the event ID, the same value as the `webhook-id` header your endpoint got. Read its state from two fields: | `delivered_at` | `next_attempt_at` | What it means | | - | - | - | | Set | `null` | Your endpoint accepted the event. | | `null` | Set | Every attempt so far failed. `last_error` says why, and Keenable tries again at `next_attempt_at`. | | `null` | `null` | Keenable stopped retrying the event. | A `last_error` from your own handler, such as a signature check that fails, usually means it verifies with the wrong secret or a parsed body. See [Verify a webhook](/products/monitors#verify-a-webhook) and [Retries](/products/monitors#retries). If no delivery succeeds for long enough, Keenable disables the monitor. See [Statuses](/products/monitors#statuses). No delivery at all can mean the webhook's `events` don't list the event you expect. Check them with [Get a monitor](/api-reference/monitors/get) and add events with [Update a monitor](/api-reference/monitors/update). ## SDK, CLI and MCP | Client | Call | | - | - | | Python, TypeScript | `client.monitors.deliveries(monitor_id, ...)` | | Go | `client.Monitors.Deliveries(ctx, monitorID, params)` | | Rust | `client.monitors().deliveries(monitor_id, ¶ms)` | | CLI | `keenable monitors deliveries `, with `--limit` and `--cursor` | | MCP | No tool. Use the API, an SDK or the CLI. | The SDK methods need SDK 0.2.0 or later. See [SDKs → Monitors](/sdks#monitors). ## Related operations * [Webhook events](/products/monitors#webhook-events) lists each event `type` and its body. * [List results](/api-reference/monitors/results) reads the results directly while you fix the webhook. [Debug failed deliveries](/guides/monitor-webhooks#debug-failed-deliveries) explains each `last_error`, and [Webhook payload](/api-reference/monitors-webhook-payload) describes what each event carries. # Get a monitor Source: https://docs.keenable.ai/api-reference/monitors/get GET /v1/monitors/{id} Get one monitor with GET /v1/monitors/{id}: its query or page, status, schedule, webhook and next three run times. Get one monitor. `upcoming_runs` lists its next three run times in UTC. A search monitor has `search` and `page: null`, and a page monitor has `page` and `search: null`. ## When to use it Check a monitor's `status` after a `monitor.disabled` event, or confirm that an [update](/api-reference/monitors/update) took effect. `next_run_at` and `upcoming_runs` show when the schedule runs next. Both are empty when the monitor has no schedule or isn't active. To find an `id`, [list your monitors](/api-reference/monitors/list). The response never carries `webhook.secret`. Your webhook handler needs the one from the create response to [verify deliveries](/products/monitors#verify-a-webhook). ## SDK, CLI and MCP | Client | Call | | - | - | | Python, TypeScript | `client.monitors.get(monitor_id)` | | Go | `client.Monitors.Get(ctx, monitorID, nil)` | | Rust | `client.monitors().get(monitor_id)` | | CLI | `keenable monitors get ` | | MCP | No tool. `list_monitors` returns each monitor's id, name, status and query. | The SDK methods need SDK 0.2.0 or later. See [SDKs → Monitors](/sdks#monitors). ## Related operations * [Update a monitor](/api-reference/monitors/update) changes it, or pauses and resumes it. * [List runs](/api-reference/monitors/runs) shows what its runs returned. * [Statuses](/products/monitors#statuses) explains each `status` and how it changes. # List monitors Source: https://docs.keenable.ai/api-reference/monitors/list GET /v1/monitors List your organization's monitors with GET /v1/monitors, newest first, filtered by status, name or metadata, with cursor pagination. List your organization's monitors, newest first. Every list in the Monitors API has the same shape: `data`, `has_more` and `next_cursor`. To get the next page, pass `next_cursor` as `cursor`. ## When to use it Call it before you [create a monitor](/api-reference/monitors/create), to find one on the same topic by `name`. Filter by `status` to find paused or disabled monitors, or by your own tags with `metadata[key]=value`. This request lists the active monitors tagged `team=research`: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -G "https://api.keenable.ai/v1/monitors" \ -H "X-API-Key: $KEENABLE_API_KEY" \ --data-urlencode "status=active" \ --data-urlencode "metadata[team]=research" ``` You get a page of monitors in `data`. If `has_more` is `true`, repeat the request with `cursor` set to `next_cursor`. To count monitors without paging, use [Count monitors](/api-reference/monitors/stats). ## SDK, CLI and MCP | Client | Call | | - | - | | Python | `client.monitors.list(...)`, or `list_all(...)` to iterate over every page | | TypeScript | `client.monitors.list(...)`, or `listAll(...)` | | Go | `client.Monitors.List(ctx, params)`, or `ListAll` | | Rust | `client.monitors().list(¶ms)`, or `list_all` | | CLI | `keenable monitors list`, with `--status`, `--name`, `--limit`, `--cursor` | | MCP | `list_monitors`, with `status` (`active` or `paused`) and `name` | The SDK methods need SDK 0.2.0 or later. See [SDKs → Monitors](/sdks#monitors) and [Monitors tools](/mcp-server#monitors-tools). ## Related operations * [Get a monitor](/api-reference/monitors/get) returns one monitor by `id`. * [Bulk actions](/api-reference/monitors/bulk) pauses, resumes or deletes the monitors that match the same kind of filter. * [Count monitors](/api-reference/monitors/stats) counts them by status and schedule. # List results Source: https://docs.keenable.ai/api-reference/monitors/results GET /v1/monitors/{id}/results List a monitor's results with GET /v1/monitors/{id}/results: every result it accepted, newest first, one per story, filtered by importance. List the monitor's results, every page it accepted, newest first, whether or not a run or webhook delivered it. To read a monitor without a webhook or schedule, poll this endpoint and stop at the first `id` you've already seen. A page monitor has no results here: its history is in [List versions](/api-reference/monitors/versions). ## When to use it Use it when you have no public endpoint for a webhook and no schedule, or to look back over results a run or webhook already gave you. Pass `min_importance=4` to keep only the results not to be missed. This request returns them: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -G "https://api.keenable.ai/v1/monitors/mon_123/results" \ -H "X-API-Key: $KEENABLE_API_KEY" \ --data-urlencode "min_importance=4" ``` Replace `mon_123` with your monitor's `id`. You get the results in `data`, newest first. Each one has a `summary`, an `importance` from 1 to 5, and `same_story`, the number of pages on the same story that were left out. Store the first `id` and stop at it on the next poll. An empty `data` on a new monitor is expected: it matches only pages crawled after it was created. ## SDK, CLI and MCP | Client | Call | | - | - | | Python | `client.monitors.results(monitor_id, min_importance=4)` | | TypeScript | `client.monitors.results(monitorId, { minImportance: 4 })` | | Go | `client.Monitors.Results(ctx, monitorID, params)` | | Rust | `client.monitors().results(monitor_id, ¶ms)` | | CLI | `keenable monitors results `, with `--min-importance`, `--limit`, `--cursor` | | MCP | `get_monitor_results`. It returns the results a reader hasn't seen yet. With `includeSeen` and a `monitorId`, it returns that monitor's results newest first, read or not. | The SDK methods need SDK 0.2.0 or later. See [SDKs → Monitors](/sdks#monitors), [CLI → Monitors](/cli#monitors) and [Monitors tools](/mcp-server#monitors-tools). ## Related operations * [List runs](/api-reference/monitors/runs) shows the same results grouped by the run that returned them. * [Read the results](/products/monitors#read-the-results) compares webhooks, runs and polling. * [Create a monitor](/api-reference/monitors/create) with `search.content.text` to add each page's text. * [List versions](/api-reference/monitors/versions) reads the history of a page monitor, which has no results here. [Read monitor results](/guides/read-monitor-results) shows the polling loop. # Get a run Source: https://docs.keenable.ai/api-reference/monitors/run GET /v1/monitors/{id}/runs/{run_id} Get one monitor run with GET /v1/monitors/{id}/runs/{run_id}: its status, the results or page changes it found, and the error if it failed. Get one run. `results` is `null` until the run completes, then holds the new pages, or `[]` when nothing was new. A page monitor's completed run has `results: []` and describes the page in [`changes`](/products/monitors#changes-and-versions). ## When to use it Poll it after you [run a monitor now](/api-reference/monitors/trigger): the trigger response carries the run's `id`. Stop when `status` is `completed` or `failed`. If your monitor has a webhook, the `monitor.run.completed` and `monitor.run.failed` events tell you the same without polling. | `status` | What it means | `results` | | - | - | - | | `queued` | The run is waiting to start. | `null` | | `running` | The run is collecting pages. | `null` | | `completed` | The run ended. | The new pages, most important first, or `[]` | | `failed` | The run ended with an error. `error` says why. | Its pages come with the next run that succeeds. | `cancelled` is reserved and not used yet. With an `output_schema` on the monitor, a completed run that found pages also carries `output`. ## SDK, CLI and MCP | Client | Call | | - | - | | Python, TypeScript | `client.monitors.run(monitor_id, run_id)` | | Go | `client.Monitors.Run(ctx, monitorID, runID, nil)` | | Rust | `client.monitors().run(monitor_id, run_id)` | | CLI | `keenable monitors run ` | | MCP | No tool. Use the API, an SDK or the CLI. | The SDK methods need SDK 0.2.0 or later. See [SDKs → Monitors](/sdks#monitors). ## Related operations * [List runs](/api-reference/monitors/runs) lists every run, newest first. * [List results](/api-reference/monitors/results) reads every result, whichever run returned it. * [Webhook events](/products/monitors#webhook-events) describes `monitor.run.completed` and `monitor.run.failed`. # List runs Source: https://docs.keenable.ai/api-reference/monitors/runs GET /v1/monitors/{id}/runs List a monitor's runs with GET /v1/monitors/{id}/runs, newest first, each with the results it returned. List a monitor's runs, newest first. Each completed run carries the pages it returned in `results`, or for a page monitor what it found on the page in `changes`. ## When to use it Read the run history to catch up on digests you missed, or to find failed runs: a failed run has `status` `failed` and says why in `error`. Its pages aren't lost. They come with the next run that succeeds. Pages and pagination work as in [List monitors](/api-reference/monitors/list): pass `next_cursor` as `cursor` for the next page. A run returns at most `search.max_results` pages. For every page the monitor accepted, including those past that cap, use [List results](/api-reference/monitors/results). ## SDK, CLI and MCP | Client | Call | | - | - | | Python, TypeScript | `client.monitors.runs(monitor_id, ...)` | | Go | `client.Monitors.Runs(ctx, monitorID, params)` | | Rust | `client.monitors().runs(monitor_id, ¶ms)` | | CLI | `keenable monitors runs `, with `--limit` and `--cursor` | | MCP | No tool. `get_monitor_results` reads results, not runs. | The SDK methods need SDK 0.2.0 or later. See [SDKs → Monitors](/sdks#monitors) and [CLI → Monitors](/cli#monitors). ## Related operations * [Get a run](/api-reference/monitors/run) reads one run by `run_id`. * [Run a monitor now](/api-reference/monitors/trigger) starts a run outside the schedule. * [What a run returns](/products/monitors#what-a-run-returns) explains which pages a run includes. See [Read the results of a run](/guides/read-monitor-results#read-the-results-of-a-run). # Count monitors Source: https://docs.keenable.ai/api-reference/monitors/stats GET /v1/monitors/stats Count your organization's monitors by status and by kind of schedule with GET /v1/monitors/stats. Count your organization's monitors by status and by kind of schedule, without paging through the list. `manual` counts monitors without a schedule. ## When to use it Use it on a dashboard, or before you create many monitors, to see how many are active. Your organization's active monitors count toward a limit. See [Limits](/products/monitors#limits). A response looks like this: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "total": 12, "by_status": { "active": 9, "paused": 2, "disabled": 0, "completed": 1 }, "by_schedule": { "cron": 5, "interval": 3, "once": 1, "manual": 3 } } ``` A non-zero `disabled` count means Keenable stopped some monitors. Find them with [List monitors](/api-reference/monitors/list) and `status=disabled`. ## SDK, CLI and MCP | Client | Call | | - | - | | Python, TypeScript | `client.monitors.stats()` | | Go | `client.Monitors.Stats(ctx, nil)` | | Rust | `client.monitors().stats()` | | CLI | `keenable monitors stats` | | MCP | No tool. Use the API, an SDK or the CLI. | The SDK methods need SDK 0.2.0 or later. See [SDKs → Monitors](/sdks#monitors) and [CLI → Monitors](/cli#monitors). ## Related operations * [List monitors](/api-reference/monitors/list) lists the monitors behind each count. * [Bulk actions](/api-reference/monitors/bulk) pauses or deletes monitors by status. # Run a monitor now Source: https://docs.keenable.ai/api-reference/monitors/trigger POST /v1/monitors/{id}/trigger Start a monitor run outside its schedule with POST /v1/monitors/{id}/trigger. The run returns queued; read it a few seconds later. Start a run outside the schedule. The response is the run with `status` `queued`. Read it a few seconds later with [Get a run](/api-reference/monitors/run), or wait for the `monitor.run.completed` event. A triggered run doesn't move the scheduled runs. While a run of the monitor is in progress, it returns `409` with `run_in_progress`: trigger it again when that run ends. ## When to use it Trigger a run to get a digest from a monitor that has no schedule, or to see what a monitor found without waiting for its next scheduled run. The run returns the results found since the previous run that no earlier run returned. [What a run returns](/products/monitors#what-a-run-returns) has the details. It works in every status except `disabled`. A paused or completed monitor answers with the results it found before it stopped. A disabled monitor returns `409` with `request_rejected`: [set `status` to `active`](/api-reference/monitors/update) first. ## SDK, CLI and MCP | Client | Call | | - | - | | Python, TypeScript | `client.monitors.trigger(monitor_id)` | | Go | `client.Monitors.Trigger(ctx, monitorID, nil)` | | Rust | `client.monitors().trigger(monitor_id)` | | CLI | `keenable monitors trigger `, then `keenable monitors run ` | | MCP | No tool. Use the API, an SDK or the CLI. | The SDK methods need SDK 0.2.0 or later. The SDKs don't retry a trigger after a `5xx`, so check [List runs](/api-reference/monitors/runs) before you send it again. See [SDKs → Monitors](/sdks#monitors). ## Related operations * [Get a run](/api-reference/monitors/run) reads the run once it completes. * [List runs](/api-reference/monitors/runs) shows every run, newest first. * [Update a monitor](/api-reference/monitors/update) adds a schedule so runs happen on their own. # Update a monitor Source: https://docs.keenable.ai/api-reference/monitors/update PATCH /v1/monitors/{id} Change a monitor with PATCH /v1/monitors/{id}: send only what changes, or set status to paused or active to pause or resume it. Change a monitor. Send only the fields that change: `search`, `page` and `webhook` are merged into the stored ones, so `{"search": {"max_results": 5}}` keeps the query. A new `page.url` deletes the page monitor's versions and starts a new baseline run. `type` can't be changed. To pause a monitor, send `{"status": "paused"}`. To resume it, or to turn a disabled monitor back on, send `{"status": "active"}`. Resuming doesn't start a catch-up run: the monitor runs at the next time its schedule gives. A resume past your organization's [active monitor limit](/products/monitors#limits) returns `403` with `monitor_limit_reached`. A page monitor disabled with `data_policy` can't be resumed while your organization has zero data retention: the update returns `400` with `monitor_option_not_supported`. ## Common changes | Goal | Body | | - | - | | Pause the monitor | `{"status": "paused"}` | | Resume it, or turn a disabled monitor back on | `{"status": "active"}` | | Return fewer pages per run, keep the query | `{"search": {"max_results": 5}}` | | Run every 6 hours | `{"schedule": {"type": "interval", "value": "6h"}}` | | Run only when triggered | `{"schedule": null}` | `schedule` replaces the stored schedule instead of merging into it. A new `once` schedule makes a completed monitor active again. Resuming a monitor counts toward your organization's active monitors. See [Limits](/products/monitors#limits). [Schedules](/products/monitors#schedules) lists the schedule rules and [Webhook events](/products/monitors#webhook-events) lists the event names. When the request adds a webhook to a monitor that had none, the response carries `webhook.secret`, once, as the create response does. Store it: before this change, such an update returned no secret, so the webhook couldn't be verified. An update that only changes the `url` or `events` of an existing webhook, and every `GET`, never shows the secret. ## SDK, CLI and MCP | Client | Call | | - | - | | Python, TypeScript | `client.monitors.update(monitor_id, ...)`, `pause(monitor_id)`, `resume(monitor_id)` | | Go | `client.Monitors.Update(ctx, monitorID, params)`, `Pause`, `Resume` | | Rust | `client.monitors().update(monitor_id, ¶ms)`, `pause`, `resume` | | CLI | `keenable monitors update ` with the flags that change, plus `--no-schedule` and `--no-webhook`; `keenable monitors pause ` and `resume ` | | MCP | No tool. Use the API, an SDK or the CLI. | The SDK methods need SDK 0.2.0 or later. `pause` and `resume` send `status` for you. See [SDKs → Monitors](/sdks#monitors) and [CLI → Monitors](/cli#monitors). ## Related operations * [Get a monitor](/api-reference/monitors/get) shows the stored values before you change them. * [Bulk actions](/api-reference/monitors/bulk) pauses or resumes many monitors in one request. * [Delete a monitor](/api-reference/monitors/delete) removes a monitor for good. # List versions Source: https://docs.keenable.ai/api-reference/monitors/versions GET /v1/monitors/{id}/versions List a page monitor's versions with GET /v1/monitors/{id}/versions, newest first, each with its source, whether it was notified and its diff. List the versions of the page a [page monitor](/products/monitors#create-a-page-monitor) watches, newest first. A run stores a version each time the page's text changed, and version 1 is the baseline. Each version says whether `monitor.page.changed` was sent for it, with the `summary` and `items` of a change that was judged, and its `diff` against the version before it from the same `source`, whether or not you were notified about either. A run's `changes.diff` can differ: for a larger change it goes back to the last version you were notified about. The list covers the monitor's last 500 versions. A search monitor has no versions and returns an empty list. # Search API reference Source: https://docs.keenable.ai/api-reference/search POST https://api.keenable.ai/v1/search Search the web with POST /v1/search: ranked results with titles, URLs and snippets, filtered by site, excluded domains, publish date or index date. Search the web and get back ranked results with titles, URLs and snippets. The [API reference](/api-reference) covers the base URL, authentication and the limits both endpoints share. Prefer the official SDKs (`pip install keenable`, `npm install keenable`, `cargo add keenable`, or the Go module). They read `KEENABLE_API_KEY` from the environment and return a citable `to_context()` block. For raw HTTP, use the curl tab. ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { Keenable } from "keenable"; async function main() { // reads KEENABLE_API_KEY from the environment const client = new Keenable(); const results = await client.search("post-training quantization LLM", { site: "arxiv.org", publishedAfter: "2026-01-01", maxResults: 2, snippetMaxLength: 200, }); console.log(results.toContext()); } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from keenable import Keenable # reads KEENABLE_API_KEY from the environment client = Keenable() results = client.search( "post-training quantization LLM", site="arxiv.org", published_after="2026-01-01", max_results=2, snippet_max_length=200, ) print(results.to_context()) ``` ```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} package main import ( "context" "fmt" "log" "github.com/keenableai/keenable-sdk/go" ) func main() { // reads KEENABLE_API_KEY from the environment client, err := keenable.New(nil) if err != nil { log.Fatal(err) } defer client.Close() snippetMaxLength := 200 results, err := client.Search(context.Background(), "post-training quantization LLM", &keenable.SearchOptions{ Site: "arxiv.org", PublishedAfter: "2026-01-01", MaxResults: 2, SnippetMaxLength: &snippetMaxLength, }) if err != nil { log.Fatal(err) } fmt.Println(results.ToContext(nil)) } ``` ```rust Rust theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} use keenable::{Client, SearchOptions}; #[tokio::main] async fn main() -> Result<(), keenable::Error> { // reads KEENABLE_API_KEY from the environment let client = Client::new()?; let results = client .search_with( "post-training quantization LLM", &SearchOptions { site: Some("arxiv.org".into()), published_after: Some("2026-01-01".into()), max_results: Some(2), snippet_max_length: Some(200), ..Default::default() }, ) .await?; println!("{}", results.to_context()); Ok(()) } ``` ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST https://api.keenable.ai/v1/search \ -H "Content-Type: application/json" \ -H "X-API-Key: $KEENABLE_API_KEY" \ -d '{ "query": "post-training quantization LLM", "site": "arxiv.org", "published_after": "2026-01-01", "max_results": 2, "snippet_max_length": 200 }' ``` ```json 200 theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "query": "post-training quantization LLM", "mode": "pro", "results": [ { "title": "Quantization of Large Models with Weight Outliers and Sparsity", "url": "https://arxiv.org/abs/2611.00286", "description": "", "snippet": "inference, it also incurs quantization error that impairs model performance. To compensate for quantization error, the present contribution decomposes the original trained weights into a", "published_at": "2026-10-30T00:00:00Z", "acquired_at": "2026-11-03T08:57:22Z" }, { "title": "A Unified Hessian-Guided Framework for Post-Training Quantization", "url": "https://arxiv.org/abs/2610.40345", "description": "", "snippet": "the high computational cost of evaluating their downstream effects.\nIn this work, we derive a Hessian-guided approximation of the output change induced by joint weight and activation quantization.", "published_at": "2026-10-29T00:00:00Z", "acquired_at": "2026-10-30T06:48:50Z" } ] } ``` ## Without a key `POST /v1/search/public` takes the same body and returns the same shape, with no API key: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST "https://api.keenable.ai/v1/search/public" \ -H "X-Keenable-Title: My App" \ -H "Content-Type: application/json" \ -d '{ "query": "typescript best practices" }' ``` The public endpoint requires an `X-Keenable-Title` header with your application's name. If the header is missing, the API returns `400` with `Missing app identifier`. If you call without a key, Keenable limits requests per IP address and charges nothing. See [Authentication](/api-reference#authentication). The playground on this page calls the keyed endpoint. ## Request Send a JSON object with the header `Content-Type: application/json`. Only `query` is required. A parameter that isn't listed here returns `400` with `Unknown parameter(s)` and the list of supported parameters. When the name is close to a supported one, the error says which one you meant. See [400 Invalid request parameters](/errors#400-invalid-request). `GET /v1/search` and `GET /v1/search/public` take the same parameters in the query string and return the same response. A long `exclude_domains` list needs `POST`. See [GET requests](#get-requests). **query** `string` *required* What to search for. The index is semantic, so describe the page you want in plain language (`blog post comparing React and Vue performance`) rather than stacking keywords. The query also takes operators: a quoted phrase for exact wording, `site:` for one or more sites, and `-` to leave out a word, a phrase or a site. See [Search operators](#search-operators). If `query` is empty or missing, the API returns `400` with `"query" is required`. If it isn't a string, the message is `"query": must be a string`. **mode** `string` (default: pro) How hard to search. Each mode is billed as its own SKU. See [Balance and usage](/credits#what-a-call-costs). * `pro`: deeper retrieval and the best ranking. Billed as `search.pro`. * `realtime`: the fastest response, for latency-sensitive agent loops. Billed as `search.realtime`. Any other value returns `400` with `"mode": is not a supported search mode; use "pro" or "realtime"`. **site** `string` Return results from one site only. Subdomains are included (`python.org` also matches `docs.python.org`), a leading `www.` is ignored, and a path narrows further (`github.com/microsoft`). To search several sites in one request, put `site:` operators in `query` instead. See [Search operators](#search-operators). To leave sites out, use `exclude_domains`. **exclude_domains** `array of strings` Never return results from these hosts. Each entry is a host name such as `pinterest.com`, and it also excludes every subdomain. To exclude a whole public suffix, write it with a leading dot: `.gov`. Up to 1,000 distinct entries. An empty array or `null` is the same as leaving it out. Results from excluded hosts are dropped, so fewer than `max_results` can come back. An entry Keenable can't read as a host, such as a path (`un.org/press`) or a wildcard on a host (`*.un.org`), returns `400` with `invalid_filter`. See [Exclude domains](#exclude-domains) for the clean-up rules, the limits and the error. **published_after** `string` Keep pages published at or after this point. This is the filter for recent results. If you set it, the results leave out pages with no known publish date. Takes a date, a timestamp or a relative delta such as `7d`; see [Date and time filters](#date-and-time-filters). If Keenable can't parse the value, the API returns `400`, for example `Invalid published_after value "last week": value must not contain whitespace`. **published_before** `string` Keep pages published at or before this point. Same formats as `published_after`; combine the two for a window. **acquired_after** `string` Keep pages Keenable indexed at or after this point, whatever their publish date. Use it to find pages that are new to the index. Same formats as `published_after`. **acquired_before** `string` Keep pages Keenable indexed at or before this point. Same formats as `published_after`. **query_time** `string` Search the index as it stood at this moment: pages acquired after it are excluded. It sets no lower bound, so it isn't a recency filter. Use `published_after` for recent results. Takes a timestamp, a date (a date resolves to `00:00:00` UTC, not to the end of the day), a Unix epoch as a string, or a relative delta such as `7d`, which means 7 days before the request time. Relative deltas in the other filters still count back from the request time. See [Point-in-time search](/mcp-server#point-in-time-search). **max_results** `integer` (default: 10) How many results to return, from `1` to `50`. Fewer come back if fewer pages match. A value outside that range returns `400` with `"max_results": must be an integer between 1 and 50`. **snippet_max_length** `integer` Cap on the characters of page text in each result's `snippet`, from `180` to `10000`. Without it, snippets often run to several thousand characters, so set it if you only need enough text to rank or cite. See [Size search results](/guides/result-size). A value outside that range returns `400` with `"snippet_max_length": must be an integer between 180 and 10000`. **disable_cards** `boolean` (default: false) Set to `true` to leave cards out of the results. A card is a result Keenable writes itself for queries such as prices, exchange rates or facts about a company, served at a URL like `https://cards.keenable.ai/w/`. A card URL works for one day. With `disable_cards`, ordinary web pages take the place of cards, so you still get the same number of results. **moderation** `string` Remove unsafe results. One of `moderate` or `strict`. Results that a safety model judges unsafe at that level are removed, and `strict` removes more than `moderate`. Removed results are not replaced, so a query can return fewer than `max_results` results, or none. Leave it out, or send `null` or an empty string, for no moderation. An empty string counts as not sent. Moderation works only with `mode` set to `pro` (the default) or `realtime`. In any other mode, the request returns `400` with code `invalid_parameter`. The same happens when `query` is a URL that is fetched as is (a URL query with a non-empty `exclude_domains` list is searched and can be filtered), and on Time Machine search. Any other value, including `off`, returns `400` with `"moderation": is not a supported moderation level; use "moderate" or "strict", or leave it out for no moderation`. A request that asks for moderation never comes back unfiltered: it is filtered or it fails. `moderation` replaces `safety_mode`. If you send both, the request returns `400` with `"moderation": replaces "safety_mode"; send only "moderation"`. An empty `moderation` counts as not sent, so next to `safety_mode` it is ignored and `safety_mode` applies. **safety_mode** `string` *deprecated* (default: off) Deprecated: use `moderation`. `safety_mode` stops working on 1 March 2027. Until then it works as before: `moderate` and `strict` filter like `moderation`, and `off` or leaving it out returns unfiltered results. Any other value, including `null` and an empty string, returns `400` with code `invalid_parameter`. From 1 March 2027, any request that sends `safety_mode`, whatever its value, returns `400` with code `invalid_parameter` and `"safety_mode": was removed on 2027-03-01; send "moderation" instead ("moderate" or "strict", or leave it out for no moderation)`. A request that sends `safety_mode`, even `off`, gets a [deprecation warning](#deprecation-warnings) in the response. To migrate, replace `"safety_mode": "moderate"` with `"moderation": "moderate"`, and `"safety_mode": "strict"` with `"moderation": "strict"`. For `"safety_mode": "off"`, leave `moderation` out. **objective** `string` What this search is for, in one to three plain sentences: what the query leaves out (who, where, when, which sources count) and what earlier searches found. Don't restate the question or include personal or confidential details. Use it for multi-step or ambiguous searches; omit it for simple lookups. At most 1,000 Unicode code points after trimming; an empty string counts as not sent. In an ordinary search, Keenable ranks results by `query` and `objective` together, and logs `objective` (except for zero-data-retention organizations). A URL query without `exclude_domains` is fetched as is, so there is nothing to rank. Retrieval reads only `query`, so put the words that matter there. It doesn't change the price. A value over 1,000 code points after trimming returns `400` with `invalid_parameter`. A `GET` request takes it as a query parameter. **session_id** `string` Your own ID for grouping related requests, up to 128 characters. You can send it as the `X-Keenable-Session-Id` header instead. If you send both, the header wins. ## Response A `200` returns the search and its ranked results. Fields marked **required** are always present; the others are left out when Keenable doesn't know them. **query** `string` *required* The query you sent, unchanged. **mode** `string` *required* The mode that served the request: `pro` or `realtime`. **results** `array of objects` *required* The matching pages, best match first, at most `max_results` of them. Search is semantic and returns the closest pages it has even for an unusual query, so judge relevance from `title` and `snippet` rather than expecting an empty list. **result fields** **title** `string` *required* The page title, for example `Quantization of Large Models with Weight Outliers and Sparsity`. Some pages, such as bare PDFs, have no title of their own. Their `title` is built from the URL's host and path, for example `example.com/files/report.pdf`. **url** `string` *required* The page's address. Cite it, or pass it to [Fetch](/api-reference/fetch) for the full page. A URL starting `https://cards.keenable.ai/w/` is a card (see `disable_cards`) and stops working after one day. **snippet** `string` Text from the page, chosen for the query, in markdown. It can start or end mid-sentence. Its length is capped by `snippet_max_length`. **published_at** `string` When the page was published, as an ISO 8601 timestamp in UTC such as `2026-10-30T00:00:00Z`. Left out when the publish date is unknown. Fetch returns `published_at` in the same format. **acquired_at** `string` When Keenable indexed the page, as an ISO 8601 timestamp in UTC such as `2026-11-03T08:57:22Z`. Use it to judge how fresh the `snippet` is. **description** `string` *deprecated* Always an empty string; read `snippet`. Kept so older clients don't break; see [Versioning and deprecation](/versioning). **warning** `string` Present if the request wasn't answered as a plain search. If `query` was a URL, Keenable fetched that page instead. With `exclude_domains` set, Keenable searches a URL query like any other query, so the list applies to it. If `query` had only `site:` operators, Keenable searched for the site name. **warnings** `array of objects` Present if the request used something deprecated. The request was still served. Each entry names what to change. See [Deprecation warnings](#deprecation-warnings). **warning fields** **code** `string` *required* The kind of warning. `deprecated_parameter` means the request sent a parameter that stops working on a set date. **path** `string` *required* A JSON pointer to the request parameter the warning is about, such as `/safety_mode`. **message** `string` *required* What to change and by when, such as `safety_mode is deprecated and stops working on 2027-03-01. Use moderation.` **usage** `object` What the call was billed. Present on successful calls made with a key. The public endpoint leaves it out. See [Balance and usage](/credits). **properties** **sku** `string` *required* The billed operation: `search.pro`, `search.realtime`, `fetch` or `fetch.live`. **amount** `integer` *required* How many units of the SKU were billed. **credits** `number` *required* What the call cost, in credits. One credit is \$0.004. **paid** `boolean` *required* `true` if the call drew on your prepaid balance, `false` if it came from the free allowance. **credits_remaining** `number` Credits your organization has left after the call: the unused part of the free allowance for the current billing period plus your prepaid balance, in credits of \$0.004. It's negative if your organization is allowed a negative balance and is in debt. It's an estimate that can lag your other calls by a few seconds. Left out if the balance couldn't be read. ## Deprecation warnings A search that sends a deprecated parameter still runs, and the response tells you what to change. Today the only deprecated parameter is `safety_mode`. This request sends it: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -i -X POST "https://api.keenable.ai/v1/search/public" \ -H "X-Keenable-Title: My App" \ -H "Content-Type: application/json" \ -d '{ "query": "best beginner snowboard tricks", "safety_mode": "moderate" }' ``` The `200` response has two extra headers: ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} Deprecation: @1795392000 Sunset: Mon, 01 Mar 2027 00:00:00 GMT ``` `Deprecation` is the date the parameter was deprecated, 23 November 2026, as an [RFC 9745](https://www.rfc-editor.org/rfc/rfc9745) structured date. `Sunset` is the date it stops working, as an [RFC 8594](https://www.rfc-editor.org/rfc/rfc8594) HTTP date. The body has the usual results and a `warnings` list. This excerpt shows the list: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "warnings": [ { "code": "deprecated_parameter", "path": "/safety_mode", "message": "safety_mode is deprecated and stops working on 2027-03-01. Use moderation." } ] } ``` To clear the warning, send `moderation` instead of `safety_mode`. Log `warnings` in your client, so you see a deprecation before the parameter stops working. See [Versioning and deprecation](/versioning). ## Errors Every error has the same JSON shape, with a short `error` and a `message` that says what to change: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "error": "Invalid parameter", "message": "\"max_results\": must be an integer between 1 and 50" } ``` | Status | When | Fix | | - | - | - | | [`400`](/errors#400-invalid-request) | A parameter is missing or invalid. `message` names it and the allowed values. | Correct the parameter. Don't retry unchanged. | | [`400`](#exclude-domains) | An `exclude_domains` entry or list was rejected: `error` is `invalid_filter`, code `invalid_parameter`. `value` and `reason` say which entry and why. | Fix or remove the entry. Don't retry unchanged. | | [`401`](/errors#401-missing-key) | No key was sent: `Missing authentication`, code `missing_api_key`. | Send your key in `X-API-Key` or `Authorization: Bearer`. | | [`401`](/errors#401-invalid-key) | The key is [malformed](/errors#401-malformed-key) or unknown: `Authentication failed`, code `invalid_api_key`. `message` says which. | Copy the full key from the [console](https://app.keenable.ai/console/api-keys), or create a new one. | | [`402`](/errors#402) | The account is out of funds. | Top up in the console. Don't retry. | | [`403`](/errors#403) | The key is revoked. If `query` was a URL, the target site may have blocked the fetch. | Use another key, or try a different URL. | | [`422`](/errors#422) | The search failed in a way a retry won't fix. `message` is `Search failed` with a status code. | Don't retry unchanged. | | [`429`](/errors#429) | Your rate limit was exceeded, or search is temporarily rate-limited. | Wait for `Retry-After`, then retry. | | [`5xx`](/errors#5xx) | Keenable had a server error (`500`), couldn't check your key (`503`, with `Retry-After`), or search is overloaded (`529`, with `Retry-After`). If `query` was a URL, the fetch errors (`404`, `422`, `502`, `504`) can also come back. | Retry up to 3 times with backoff, honouring `Retry-After`. | The body also has a stable `code`, a `fix` and `retryable`. Branch on `code`. Every status and code, with its exact message and fix, is on [Errors](/errors#error-codes). ## Date and time filters `acquired_after`, `acquired_before`, `published_after`, and `published_before` each accept **one** of the following formats: * **Date** in RFC 3339 `full-date` form (`YYYY-MM-DD`): covers that whole day in UTC. On an `_after` bound it resolves to `00:00:00` on that date; on a `_before` bound it resolves to `23:59:59.999` on that date, so pages from the named day are kept at either end. Pass a timestamp instead to cut at an exact instant. * **Timestamp** in ISO 8601 form (`YYYY-MM-DDTHH:MM:SS[.sss][±HH:MM]`). If you leave out the timezone offset, Keenable reads the timestamp as UTC. * **Relative delta** (``, such as `7d` or `30min`): resolves to the request time minus the delta, truncated to minute precision, even when `query_time` is set. Supported units: `min` (minutes), `h` (hours), `d` (days), `w` (weeks), `mo` (30 days), `y` (365 days). Example values: | Value | Resolves to | | - | - | | `2026-01-15` on `acquired_after` / `published_after` | `2026-01-15T00:00:00Z` | | `2026-01-15` on `acquired_before` / `published_before` | `2026-01-15T23:59:59.999Z` | | `2026-01-15T10:30:00` | `2026-01-15T10:30:00Z` (no offset → UTC) | | `2026-01-15T10:30:00Z` | `2026-01-15T10:30:00Z` | | `2026-01-15T10:30:00.500-05:00` | `2026-01-15T15:30:00.500Z` | | `7d` | 7 days before request time, truncated to the minute | | `30min` | 30 minutes before request time, truncated to the minute | You can mix relative deltas and absolute values across the two bounds of a window. Both of these bodies are valid: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "query": "...", "published_after": "1y", "published_before": "6mo" } ``` ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "query": "...", "acquired_after": "2024-01-01", "acquired_before": "30d" } ``` For example, at request time `2026-05-18T14:23:45Z`, `acquired_after: "2h"` resolves to `2026-05-18T12:23:00Z`. The results drop a page acquired at `12:22:59Z` and keep one acquired at `12:23:00Z`. Mind the difference between a date and a timestamp on a `_before` bound: `acquired_before: "2026-05-01"` keeps a page acquired at `2026-05-01T14:31:13Z`, while `acquired_before: "2026-05-01T00:00:00Z"` drops it. Use the date form to mean "up to and including that day", and the timestamp form to cut at midnight. ## Exclude domains `exclude_domains` keeps results from the hosts you list out of a search. Use `site` to search one site, and `exclude_domains` to leave sites out of an open search. This sample searches without `pinterest.com` and `quora.com`, and prints the top 5 results: ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { Keenable } from "keenable"; async function main() { const client = new Keenable(); // keyless: no API key needed to try it const results = await client.search("how to repot a monstera without damaging the roots", { excludeDomains: ["pinterest.com", "quora.com"], maxResults: 5, }); for (const result of results.results) { console.log(result.title); console.log(result.url); } } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from keenable import Keenable client = Keenable() # keyless: no API key needed to try it results = client.search( "how to repot a monstera without damaging the roots", exclude_domains=["pinterest.com", "quora.com"], max_results=5, ) for result in results: print(result.title) print(result.url) ``` ```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} package main import ( "context" "fmt" "log" "github.com/keenableai/keenable-sdk/go" ) func main() { client, err := keenable.New(nil) // keyless: no API key needed to try it if err != nil { log.Fatal(err) } defer client.Close() results, err := client.Search(context.Background(), "how to repot a monstera without damaging the roots", &keenable.SearchOptions{ ExcludeDomains: []string{"pinterest.com", "quora.com"}, MaxResults: 5, }) if err != nil { log.Fatal(err) } for _, result := range results.Results { fmt.Println(result.Title) fmt.Println(result.URL) } } ``` ```rust Rust theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} use keenable::{Client, SearchOptions}; #[tokio::main] async fn main() -> Result<(), keenable::Error> { let client = Client::new()?; // keyless: no API key needed to try it let results = client .search_with( "how to repot a monstera without damaging the roots", &SearchOptions { exclude_domains: Some(vec!["pinterest.com".into(), "quora.com".into()]), max_results: Some(5), ..Default::default() }, ) .await?; for result in &results { println!("{}", result.title); println!("{}", result.url); } Ok(()) } ``` ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST https://api.keenable.ai/v1/search/public \ -H "Content-Type: application/json" \ -H "X-Keenable-Title: My App" \ -d '{ "query": "how to repot a monstera without damaging the roots", "exclude_domains": ["pinterest.com", "quora.com"], "max_results": 5 }' ``` You see 5 titles and URLs, none on `pinterest.com`, `quora.com` or their subdomains. ### What an entry matches Each entry is a host. It excludes that host and every subdomain: `yahoo.com` also excludes `finance.yahoo.com`, and `blogs.un.org` excludes only `blogs.un.org` and its subdomains, not `un.org`. Hosting domains on the private part of the [Public Suffix List](https://publicsuffix.org/), such as `github.io` and `blogspot.com`, are accepted as hosts. To exclude every host under a public suffix, write the suffix with a leading dot. `.gov` excludes `nasa.gov`, `www.irs.gov` and every other host that ends in `.gov`. `*.gov` means the same. The suffix must be on the [Public Suffix List](https://publicsuffix.org/): `.co.uk` works, `.example` doesn't. A suffix covers only the hosts under it. `.gov` doesn't exclude `gov.uk`, which sits under `.uk`, so write `.gov.uk` for that. A bare `gov` or `com` is rejected, so a mistyped host can't exclude a whole top-level domain. Keenable cleans up these slips and uses the host that is left: * whitespace around the entry and upper case * an `http://` or `https://` scheme * a port, a trailing `/`, a trailing dot, and a `?query` or `#fragment` with no path * a leading `www.`, unless the rest is a public suffix: `www.github.io` stays as it is * an internationalized name, which becomes punycode: `bücher.de` becomes `xn--bcher-kva.de` * duplicates, after the clean-up So `https://WWW.UN.org/` becomes `un.org`. Keenable rejects these entries with `400` `invalid_filter`: | Entry | Example | Use instead | | - | - | - | | A path | `un.org/press` | The host, `un.org` | | A wildcard on a host, or a dotted name that isn't a public suffix | `*.un.org`, `.un.org`, `.example` | The host, which covers its subdomains, or a suffix such as `.gov` | | A scheme other than `http` or `https` | `ftp://un.org`, `site:un.org` | The host | | User info | `user@un.org` | The host | | An IP address | `127.0.0.1`, `[::1]` | A domain name | | An empty entry | `""` | Remove it | | An invalid host name | `un .org`, `a..b.org` | A host such as `example.com` | | A bare public suffix, or a name that isn't a registrable domain | `com`, `co.uk`, `localhost` | A domain such as `example.com`, or a suffix with a leading dot such as `.gov` | ### Limits | Limit | Value | | - | - | | Distinct entries (hosts and suffixes), after clean-up | 1,000 | | Entries as sent, before clean-up | 2,000 | | Length of one entry | 2,048 bytes | A list over any limit returns `400` `invalid_filter`. A suffix such as `.gov` counts as one entry, the same as a host, so one entry can cover thousands of sites. Duplicates and entries that clean up to the same host count once, so a list of 2,000 entries is valid when it has at most 1,000 different ones. ### GET requests `GET /v1/search` reads `exclude_domains` from the query string. Repeat the parameter, separate the entries with commas, or both: ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} ?query=monstera+repotting&exclude_domains=pinterest.com&exclude_domains=quora.com ?query=monstera+repotting&exclude_domains=pinterest.com,quora.com ``` The URL length caps a GET at roughly a few hundred hosts. A longer URL is refused before it reaches the API, with an HTTP error (typically `431`) and no JSON body. Send a long list as a JSON array in a `POST` body. The API reads only the first 1,000 query parameters. If `exclude_domains` comes after them, the request returns `400` with the code `invalid_request` instead of searching without it. ### Rejected entries A rejected entry or list returns `400`. `error` is `invalid_filter`, the `code` is [`invalid_parameter`](/errors#invalid-parameter), and three fields say what to fix: | Field | What it holds | | - | - | | `field` | `exclude_domains`. `param` holds the same name. | | `value` | The entry as you sent it. For the size limits, it describes the list instead: `"2500 entries"` past 2,000 entries, `"more than 1000 distinct hosts"` past 1,000 hosts, or an over-long entry's first 64 characters followed by `...`. | | `reason` | Why Keenable rejected it and what to send instead. | This request sends a path: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "error": "invalid_filter", "message": "Invalid exclude_domains value \"un.org/press\": paths are not supported; give only the host, such as example.com", "field": "exclude_domains", "value": "un.org/press", "reason": "paths are not supported; give only the host, such as example.com", "type": "invalid_request_error", "code": "invalid_parameter", "param": "exclude_domains", "fix": "Fix \"exclude_domains\" and retry: paths are not supported; give only the host, such as example.com.", "docs_url": "https://docs.keenable.ai/errors#invalid-parameter", "retryable": false } ``` A value that isn't an array of strings returns `400` with `"exclude_domains": must be an array of strings` instead. ### With other filters `exclude_domains` applies on top of every other filter. Combined with `site`, it removes hosts inside that site: `site: "un.org"` with `exclude_domains: ["blogs.un.org"]` returns pages from `un.org` and its subdomains except `blogs.un.org`. If `exclude_domains` covers the whole `site`, no results come back. ## Search operators Operators in `query` turn part of a search into a hard filter: an exact phrase, a set of sites, or something to leave out. The rest of the query stays a plain-language description that Keenable ranks by meaning. Operators work in both modes and on the keyless path. For worked queries and the mistakes that return `400`, see the [Search operators guide](/guides/search-operators). | Operator | What it does | Example `query` | | - | - | - | | `"..."` | Keeps only pages that contain the exact phrase. Use it for error strings, names and quotations. | `undici "other side closed"` | | `site:` | Keeps only pages on that site. Subdomains are included, and a path narrows further. | `rust async runtime site:github.com/tokio-rs` | | `OR` | Alternates the two terms next to it. Between `site:` terms it searches several sites in one request. Between quoted phrases it keeps pages that contain either one. | `keyboard reviews site:wired.com OR site:theverge.com` | | `-` | Leaves out pages that match the term attached to it: a site or a quoted phrase. `NOT` before the term does the same. For a list of sites, use [`exclude_domains`](#exclude-domains). | `python 3.14 release notes -site:python.org` | | `( )` | Groups an `OR` and its terms into one unit inside a longer query. | `keyboard ("hall effect" OR "magnetic switch") review` | A word with no operator is never a hard filter, and `OR` between two plain words doesn't make them one: both stay descriptions that Keenable ranks by. To require exact wording, put it in quotes. This request finds pages that contain the exact error string and leaves out one site: ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { Keenable } from "keenable"; async function main() { const client = new Keenable(); // keyless: no API key needed to try it const results = await client.search('undici "other side closed" -site:github.com', { maxResults: 3, }); for (const result of results.results) { console.log(result.title); console.log(result.url); } } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from keenable import Keenable client = Keenable() # keyless: no API key needed to try it results = client.search( 'undici "other side closed" -site:github.com', max_results=3, ) for result in results: print(result.title) print(result.url) ``` ```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} package main import ( "context" "fmt" "log" "github.com/keenableai/keenable-sdk/go" ) func main() { client, err := keenable.New(nil) // keyless: no API key needed to try it if err != nil { log.Fatal(err) } defer client.Close() results, err := client.Search(context.Background(), `undici "other side closed" -site:github.com`, &keenable.SearchOptions{ MaxResults: 3, }) if err != nil { log.Fatal(err) } for _, result := range results.Results { fmt.Println(result.Title) fmt.Println(result.URL) } } ``` ```rust Rust theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} use keenable::{Client, SearchOptions}; #[tokio::main] async fn main() -> Result<(), keenable::Error> { let client = Client::new()?; // keyless: no API key needed to try it let results = client .search_with( r#"undici "other side closed" -site:github.com"#, &SearchOptions { max_results: Some(3), ..Default::default() }, ) .await?; for result in &results { println!("{}", result.title); println!("{}", result.url); } Ok(()) } ``` ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST https://api.keenable.ai/v1/search/public \ -H "Content-Type: application/json" \ -H "X-Keenable-Title: My App" \ -d '{ "query": "undici \"other side closed\" -site:github.com", "max_results": 3 }' ``` You see up to 3 titles and URLs. Each page contains `other side closed`, and none is on `github.com`. Rules that change the results: * **Write `OR` and `NOT` in capitals.** In lower case they're ordinary words. * **`OR` binds only the terms next to it.** `keyboard reviews site:wired.com OR site:theverge.com` searches both sites for `keyboard reviews`. * **Attach `-` to its term**, with no space after it: `-site:reddit.com`, `-"sponsored post"`. * **Two `site:` terms with no `OR` between them still mean either site.** A page is on one site, so Keenable never requires both. * **Put every site filter in one place.** Use the `site` parameter for one site, or `site:` operators in `query` for several sites and exclusions. Don't combine the `site` parameter with `-site:` in the query. To leave hosts out of one site, send `exclude_domains` with `site`. * **A query that doesn't parse never fails.** An unbalanced quote or parenthesis, a dangling `OR` or `NOT`, or a `-` on its own is read as plain words, and the search still runs. # Time Machine: search the web as of a past date Source: https://docs.keenable.ai/api-reference/time-machine Search and read the web as Keenable captured it at a past moment, given by as_of. Nothing published later can appear. Early Access. > [!WARNING] > > The Time Machine API is in Early Access and can change before general availability. Time Machine is its own API, separate from [search](/api-reference/search) and [fetch](/api-reference/fetch). It searches and reads the web as Keenable captured it at a past moment, given by `as_of`. Every result is a copy of the page captured at or before `as_of`, so nothing published or edited later can appear. Use it to backtest agents and forecasts, to research what was known on a given date, or to build training datasets that can't see the future. | Endpoint | What it does | | - | - | | `POST https://api.keenable.ai/v1/time-machine/search` | Searches the web as of `as_of` | | `POST https://api.keenable.ai/v1/time-machine/fetch` | Reads up to 10 pages as they were at `as_of` | | `POST https://api.keenable.ai/v1/time-machine/versions` | Lists every captured version of up to 10 pages in a range of capture times | All three take a JSON body. Other methods return `405`. ## Access * Send your API key in the `X-API-Key` header. * Time Machine must be turned on for your organization. If it isn't, every call returns `403` with `Feature not enabled`. To turn it on, email [support@keenable.ai](mailto:support@keenable.ai) with the `request_id` from that response, or ask your Keenable contact. * Search and fetch bill under their own SKUs, `search.time_machine` and `fetch.time_machine`. Read what each call cost in its `usage` object. Versions is free during Early Access. If your organization has no balance left, calls return `402` with `Insufficient credits`. * Most responses carry an `X-Request-Id` header. Include its value when you [report a problem](/errors#report-a-problem). ## Quick start Set your API key in the environment, then run the examples below. ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} export KEENABLE_API_KEY=... # your API key ``` **Search**: what was known about the WeWork IPO on 1 September 2019, a month before it was withdrawn. ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -s -X POST "https://api.keenable.ai/v1/time-machine/search" \ -H "X-API-Key: $KEENABLE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query": "WeWork IPO", "as_of": "2019-09-01T00:00:00Z", "max_results": 3, "snippet_max_length": 200}' ``` ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "query": "WeWork IPO", "as_of": "2019-09-01T00:00:00Z", "results": [ { "title": "WeWork reveals massive $900 million loss in filing to go public", "url": "https://cnbc.com/2019/08/14/wework-releases-s-1-filing-for-ipo.html", "snippet": "rental company lined up to join a flurry of tech companies going public in 2019. WeWork, which rebranded to the We Company, is widely expected to go public as soon as next month. It was recently", "published_at": "2019-08-14T11:16:08Z", "snapshot_at": "2019-08-25T03:19:43Z" }, { "title": "WeWork reveals IPO filing", "url": "https://techcrunch.com/2019/08/14/wework-reveals-ipo-filing", "snippet": "WeWork, now known as The We Company, released its IPO prospectus Wednesday morning months after filing confidentially to go public. The company indicated plans to raise $1 billion in what is likely a", "published_at": "2019-08-14T11:24:51Z", "snapshot_at": "2019-08-26T10:24:19Z" } ] } ``` *(The response contains 3 results and a `usage` object; only 2 results are shown here.)* **Search with filters**: the same call limited to one domain and a publication window. ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -s -X POST "https://api.keenable.ai/v1/time-machine/search" \ -H "X-API-Key: $KEENABLE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query": "Uber IPO", "as_of": "2019-06-01T00:00:00Z", "include_domains": ["techcrunch.com"], "published_after": "2019-04-01T00:00:00Z", "max_results": 3, "snippet_max_length": 200}' ``` The response has the same shape as the search above. **Fetch**: one page as it was on 1 September 2019. ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -s -X POST "https://api.keenable.ai/v1/time-machine/fetch" \ -H "X-API-Key: $KEENABLE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"urls": ["https://www.businessinsider.com/wework-ipo-we-company-history-founder-story-timeline-adam-neumann-2019-8"], "as_of": "2019-09-01T00:00:00Z", "content": {"max_chars": 300}}' ``` ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "as_of": "2019-09-01T00:00:00Z", "results": [ { "url": "https://businessinsider.com/wework-ipo-we-company-history-founder-story-timeline-adam-neumann-2019-8", "status": "ok", "snapshot_at": "2019-08-23T12:47:36Z", "published_at": "2019-08-14T00:00:00Z", "title": "WeWork history, from Manhattan building to $47 billion valuation, IPO", "content": " WeWork’s $47 billion parent company, The We Company, publicly filed its IPO paperwork on Wednesday. WeWork started as one office space in the SoHo neighborhood of New York City. Now it has nearly 800 locations open or coming soon in 124 cities around the world. The We Company is composed of WeW...", "truncated": true, "total_chars": 1132 } ] } ``` *(The `usage` object is left out here.)* Other `as_of` values return other copies of the same URL: | `as_of` | Result | | - | - | | `2019-06-01T00:00:00Z` | `status: "not_captured"`: no copy had been captured yet | | `2019-09-01T00:00:00Z` | The copy captured on 2019-08-23, shown above | | `2019-11-01T00:00:00Z` | The copy captured on 2019-09-20, titled *"WeWork history, from single Manhattan building to global company, IPO"* | | `2026-10-01T00:00:00Z` | The copy captured on 2026-09-16, titled *"WeWork history, from single Manhattan building to pushing out its CEO"* | ## Time format Every time Time Machine takes (`as_of`, `from`, `to`, `published_after`, `published_before`) is an RFC 3339 timestamp with a time zone, such as `2019-09-01T00:00:00Z` or `2019-09-01T08:00:00-04:00`. Every time it returns is UTC to the second, such as `2019-09-01T00:00:00Z`. * Any UTC offset works, from `-12:00` to `+14:00`, including `+05:30` and `+05:45`. Keenable converts the time to UTC before it searches, so `2019-09-01T05:30:00+05:30` and `2019-09-01T00:00:00Z` give the same result. * A time without an offset, such as `2019-09-01T00:00:00`, or a time zone name, such as `Europe/Tallinn`, returns `400`. So does a date without a time, a relative offset such as `30d`, or a Unix epoch. The message names the field and quotes the value you sent. The message names the field and quotes the value you sent. * Times must fall between `1970-01-01T00:00:00Z` and now. A time in the future returns `400`. * Leaving `as_of` out means now: you get the latest copy Keenable has. * Keenable doesn't have copies of every page for every period. When there is no copy, you get an empty result or a `not_captured` status, not an error. ## Search `POST /v1/time-machine/search`, with a JSON body. ### Request **query** `string` *required* What to search for, in words. A URL returns `400`; to read a URL, use [fetch](#fetch). **as_of** `string` The moment to search the web as of. Defaults to now. See [Time format](#time-format). **include_domains** `string[]` Only results from this domain, such as `["techcrunch.com"]`. Takes one domain for now; more return `400`. **published_after** `string` Only pages published after this moment. See [Time format](#time-format). **published_before** `string` Only pages published before this moment. **max_results** `integer` (default: 10) How many results to return, from `1` to `50`. **snippet_max_length** `integer` Maximum snippet length in characters, 180–10,000. Without it, snippets are typically 500–3,500 characters. **session_id** `string` Your own ID for grouping related requests. You can send it as the `X-Keenable-Session-Id` header instead. Any other field returns `400` with the list of supported fields. Date operators inside `query`, such as `published_after:`, return `400`: send them as fields. ### Response **query** `string` Your query. **as_of** `string` The `as_of` used, in UTC. **results** `array` Results, most relevant first. Empty when Keenable has no matching copy from then. **result** **title** `string` The page's title, from the captured copy. **url** `string` The page's URL, normalized (for example, without `www.`). **snippet** `string` A relevant passage from the captured copy. **published_at** `string` The page's publication date, in UTC. Absent when unknown. **snapshot_at** `string` The moment this copy shows the page as it was, in UTC. Always at or before `as_of`. **warning** `string` Present only when the API adjusted your query. For example, a query made only of `site:` operators is searched with the site's name as the search term. **usage** `object` What this call was billed: `sku` (`search.time_machine`), `amount` (1), `credits`, `paid`, `cost` and `balance` in US dollars. See [reading usage per call](/credits#reading-usage-per-call). ## Fetch `POST /v1/time-machine/fetch`, with a JSON body. Reads each page as Keenable stored it at or before `as_of`. It never fetches the live page. ### Request **urls** `string[]` *required* The pages to read: 1 to 10 absolute `http://` or `https://` URLs. `www.` and non-`www.` forms return the same page, but `http://` and `https://` are different URLs. Send each URL once; a repeat returns `400`. **as_of** `string` The moment to read the pages as of. Defaults to now, which returns the latest stored copy. See [Time format](#time-format). **content** `object` **properties** **max_chars** `integer` (default: 50000) Maximum text length per page. Longer text is cut to fit and ends with `...`, and the page has `truncated` set to `true`. **session_id** `string` Your own ID for grouping related requests. You can send it as the `X-Keenable-Session-Id` header instead. ### Response The call returns `200` whenever it ran, with one result per URL, in the order you sent them. A URL that couldn't be read gets a `status` and an `error` instead of failing the call. **as_of** `string` The `as_of` used, in UTC. **results** `array` One entry per URL. **result** **url** `string` The page's URL, normalized. **status** `string` * `ok`: the page was read. * `not_captured`: Keenable has no copy captured at or before `as_of`. A normal result, not an error. * `no_content`: the stored copy has no usable text, such as a bot check, a login wall or a paywall. `error.code` says which. * `failed`: the read failed. Check `error.retryable`. **snapshot_at** `string` With `ok`: the moment this copy shows the page as it was, in UTC. At or before `as_of`. **published_at** `string` With `ok`: the page's publication date in this copy, in UTC. Absent when unknown. **title** `string` With `ok`: the page's title in this copy. Absent when unknown. **author** `string` With `ok`: the page's author in this copy. Absent when unknown. **content** `string` With `ok`: the page's text in this copy. **truncated** `boolean` With `ok`: `true` when the text was longer than `content.max_chars` and was cut. **total_chars** `integer` With `ok`: the length of the full text in characters. **usage** `object` With `ok`: what this page was billed, under `fetch.time_machine`. **error** `object` When `status` isn't `ok`: `code` (such as `version_not_found` or `target_paywalled`), `message`, `fix`, `retryable` and, when retryable, `retry_after_seconds`. Branch on `code`. ## Versions `POST /v1/time-machine/versions`, with a JSON body. Lists every version of each page that Keenable captured between `from` and `to`, oldest first, with its text. Use it to see how a page changed over time. Other methods return `405`. ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -s -X POST "https://api.keenable.ai/v1/time-machine/versions" \ -H "X-API-Key: $KEENABLE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"urls": ["https://www.wework.com/"], "from": "2019-01-01T00:00:00Z", "to": "2019-12-31T23:59:59Z", "max_versions": 3, "max_chars": 500}' ``` ### Request **urls** `string[]` *required* The pages to list versions of: 1 to 10 absolute `http://` or `https://` URLs. `http://` and `https://` are different URLs. Send each URL once; a repeat returns `400` naming both positions. **from** `string` Start of the range of capture times. Defaults to `1970-01-01T00:00:00Z`, the earliest value accepted. Keenable doesn't guarantee copies from that far back: how far back copies go depends on the page. **to** `string` End of the range of capture times. Defaults to the time of your request. Must not be before `from`, or in the future. **max_versions** `integer` (default: 10) The most versions to return per URL, from `1` to `50`, oldest first. To read the rest, narrow `from` and `to`. **max_chars** `integer` (default: 50000) Maximum text length per version. Longer text is cut to fit and ends with `...`. **session_id** `string` Your own ID for grouping related requests. You can send it as the `X-Keenable-Session-Id` header instead. `from` and `to` are RFC 3339 timestamps with a time zone, such as `2019-09-01T00:00:00Z` or `2019-09-01T08:00:00-04:00`. A date without a time, a relative offset such as `30d`, or a Unix epoch returns `400`, and the message names the field and quotes the value you sent. Times in the response are UTC to the second, such as `2019-09-01T00:00:00Z`. `url`, `query_time` and `as_of` return `400` with a hint: versions takes a list of URLs and a range. ### Response The call returns `200` whenever it ran, with one result per URL. Keenable doesn't have copies of every page for every period, so a URL with no copy in the range gets `not_captured`. That's a normal result, not an error: there's nothing to return. A URL whose versions couldn't be read gets `failed`. Both come with an `error` instead of failing the call. Error statuses are kept for the request itself, such as a bad body, a missing key or a rate limit. **from** `string` The start of the range, in UTC. **to** `string` The end of the range, in UTC. **results** `array` One entry per URL, in the order you sent them. **result** **url** `string` The page's URL, as you sent it. **status** `string` `ok` when the range holds at least one version, `not_captured` when it holds none, and `failed` when the versions couldn't be read. Check `error.retryable` on `failed`. **total_versions** `integer` With `ok`: how many versions the range holds. Larger than the length of `versions` when `max_versions` capped the list. **versions** `array` With `ok`: the versions, oldest first. Each has `snapshot_at` (the moment this copy shows the page, in UTC), `published_at` and `title` (absent when unknown), `content`, `truncated` and `total_chars`. **error** `object` When `status` isn't `ok`: `code` (such as `version_not_found` or `time_machine_versions_unavailable`), `message`, `fix`, `retryable` and, when retryable, `retry_after_seconds`. Branch on `code`. **usage** `object` Versions is free during Early Access. `usage` shows what a call will be billed once it has a price: `sku` (`fetch.time_machine_versions`), `amount` (the number of versions returned), `cost` (`{"amount": 0, "currency": "usd"}` for now) and `balance` (what your organization has left, in US dollars). See [reading usage per call](/credits#reading-usage-per-call). ## Errors Errors use the [error body](/errors#error-body) shared by all endpoints. `error` is a short title, `code` is a stable machine-readable code, and `fix` says what to do next. Branch on `code`, not on the text of `error` or `message`. A call that returns an error is not billed, and its response carries no `usage`. A page that fetch or versions couldn't read is a result with a `status`, not an error response. | Status | `error` | When | | - | - | - | | 400 | `Missing required parameter` | `query` or `urls` is missing. | | 400 | `Invalid parameter` | A time isn't an RFC 3339 timestamp with a time zone, or is out of range; a value is out of range; `include_domains` has more than one domain; or `query` contains a date operator. | | 400 | `Bad request` | An unknown field, a URL as a search query, or a body that isn't a JSON object. | | 401 | `Missing authentication` or `Authentication failed` | The API key is missing or invalid. | | 402 | `Insufficient credits` | Your organization has no balance left. | | 403 | `Feature not enabled` | Time Machine is not enabled for your organization. | | 405 | `Method not allowed` | A method other than `POST`. The `Allow` header lists the methods the endpoint takes. | | 429 | `Rate limit exceeded` | Your organization's requests-per-second limit was exceeded. | | 503 | `Service unavailable` | Versions: the store of page versions couldn't be reached (`time_machine_versions_unavailable`). Retry after the `Retry-After` header. | | 5xx | Varies | A transient failure. Retry with backoff. | # Authentication Source: https://docs.keenable.ai/authentication Get an API key, sign a tool in with device login, pass the key to the API, CLI and MCP server, and read the error responses. An API key gives your organization its own rate limit with no hourly cap, in place of the shared per-IP limit. With a key, the API also returns what each call used. See [Rate limits](/rate-limits) for the numbers. To get a key, [log in](https://app.keenable.ai/login) or follow the three steps on [API keys](/api-keys). For an agent choosing between keyless calls, an API key, device login, MCP sign-in and pay per request, [Access methods for agents](/auth) puts each one in a single table. ## CLI Run this command and follow the browser flow: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} keenable login ``` The CLI uses device authorization, so an agent can run the command and give you the link to approve. To build the same login into your own tool, see [Device login](#device-login). ## MCP The CLI adds Keenable to your MCP clients with your credentials: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} # Skip if you are already logged in keenable login keenable configure-mcp --all ``` `keenable configure-mcp --all` configures every supported client it detects. To set up a client by hand, create an API key in the [console](https://app.keenable.ai/console) and send it in the [API key header](#api-key-header). If your client signs you in instead of taking a key, such as a Claude custom connector, it connects to `https://api.keenable.ai/mcp-oauth` and opens the Keenable sign-in page. See [Claude](/integrations/claude#use-your-own-account). ## API key header To set up an MCP client by hand, send your API key in the `X-API-Key` header. These configs add Keenable with a key: ```bash Claude Code theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} claude mcp add keenable \ --transport http https://api.keenable.ai/mcp \ --scope user \ --header "X-API-Key: keen_" ``` ```toml Codex theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} [mcp_servers.keenable] url = "https://api.keenable.ai/mcp" http_headers = { "X-API-Key" = "keen_" } ``` ```json JSON theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "mcpServers": { "keenable": { "url": "https://api.keenable.ai/mcp", "headers": { "X-API-Key": "keen_" } } } } ``` ```json Claude Desktop theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "mcpServers": { "keenable": { "command": "npx", "args": ["-y", "@keenable/mcp"], "env": { "KEENABLE_API_KEY": "keen_" } } } } ``` Claude Desktop needs the last config. Claude Desktop accepts only local `command` servers in its config file and ignores a remote `"url"` entry without an error. If you don't need to use your key, skip the file and add Keenable as a [connector](/mcp-server#claude-remote-connector) instead. Keys belong to your organization, never expire on their own, and can be rotated at any time. If your MCP client or framework supports only bearer tokens, send the key in the `Authorization` header with the `Bearer` scheme: ```http theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} Authorization: Bearer keen_ ``` If you send both headers, the API uses the key in `X-API-Key`. ## Check a key To check that a key works before you use it, call [`GET /v1/auth/user`](/api-reference/auth-user) with it. The call is free: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl "https://api.keenable.ai/v1/auth/user" \ -H "X-API-Key: $KEENABLE_API_KEY" ``` A `200` names the user who created the key and the organization it belongs to. A `401` or `403` means the key won't work. See [Error responses](#error-responses). ## Try it without a key You can try the MCP server, the CLI and the HTTP API before you create an account. Over HTTP, call the `/public` endpoints described in the [API reference](/api-reference#authentication). They take no key, but they need an `X-Keenable-Title` header that names your application. If you don't send a key, your requests share a public pool capped at 1,000 requests per hour and 10 requests per second per IP address. The responses carry no usage metadata: the MCP server returns the [`_meta["keenable/usage"]` block](/mcp-server#metadata-for-integrators) only for calls with a key. Keyless requests are free, but Keenable logs each one. The log records the search query, or the fetched URL and its `prompt`, along with your IP address, your user agent and the `X-Keenable-Title` value. See [Data and privacy](/data-privacy#what-each-request-log-holds). Each request also counts toward the per-IP limit. Use an API key for anything beyond a first look. Everyone on your network or egress address shares the per-IP pool, so you can't control how much of it is left. ## Pay per request without a key An agent with a wallet can [pay per request](/pay-per-request) over the x402 protocol, with no account and no key. Each search or fetch costs \$0.01 in USDC on Base, on the `/v1/x402/*` paths. That page lists the limits and error responses for these paths. For regular use, an API key costs less. ## Device login Device login gets an API key for a tool that can't show a sign-in page, such as a CLI, a coding agent or a CI job. Your tool requests a code, a person approves it in the console, and your tool collects a new API key. The flow follows the device authorization grant in [RFC 8628](https://www.rfc-editor.org/rfc/rfc8628), so an OAuth library that supports that grant can run it. `keenable login` calls the same endpoints. The SDKs don't wrap them yet, so call the HTTP API. Both endpoints accept JSON or form-encoded bodies, and only `POST`. ### 1. Request a code Send `client_id`, a short name for your tool. `label` is optional and names the API key that the login creates: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST https://api.keenable.ai/v1/auth/agent/code \ -H "Content-Type: application/json" \ -d '{"client_id": "my-agent", "label": "my-agent on build-01"}' ``` The response holds the code your tool polls with and the code for the person: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "device_code": "", "agent_code": "", "user_code": "ABCD-EFGH", "verification_uri": "https://app.keenable.ai/link?code=ABCD-EFGH", "verification_uri_complete": "https://app.keenable.ai/link?code=ABCD-EFGH", "expires_in": 600, "interval": 5 } ``` The codes expire after `expires_in` seconds. `agent_code` repeats `device_code` for older clients. If you leave out `label`, the key is named `agent `, such as `agent my-agent 2026-11-08`. ### 2. Show the code to the person Show the person `verification_uri` and `user_code`. The link already carries the code. The person signs in to the console and approves the code. The API key belongs to the organization they are signed in to. ### 3. Poll for the key Poll every `interval` seconds with the `device_code` and the same `client_id` you sent in step 1: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST https://api.keenable.ai/v1/auth/agent/token \ -d grant_type=urn:ietf:params:oauth:grant-type:device_code \ -d client_id=my-agent \ -d device_code= ``` After the person approves, the poll returns `200` with the key: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "api_key": "keen_...", "access_token": "keen_...", "token_type": "Bearer", "key_id": "...", "org_id": "...", "label": "my-agent on build-01" } ``` `api_key` and `access_token` hold the same key. Store it where your tool keeps secrets, such as the `KEENABLE_API_KEY` environment variable, and send it in the [API key header](#api-key-header). Each `device_code` returns a key only once. Until the person approves, each poll returns `400`. `error` holds the RFC 8628 value, and `code` says what happened: | `error` | `code` | What happened | What to do | | - | - | - | - | | `authorization_pending` | `authorization_pending` | The person hasn't approved the code yet. | Poll again after `interval` seconds. | | `slow_down` | `slow_down` | You polled before `interval` seconds passed. | Wait for the new `interval` in the body, which is 5 seconds longer, and use it for every later poll. | | `access_denied` | `device_code_denied` | The login was declined. | Ask the person before you request a new code. | | `expired_token` | `device_code_expired` | The code expired, or Keenable never issued it. Keenable deletes codes when they expire, so it can't tell these apart. | Request a new code and show the person the new `user_code`. | | `invalid_grant` | `device_code_already_used` | The code was already exchanged for a key. | Use the key from the first successful poll. If you lost it, revoke it in the [console](https://app.keenable.ai/console/api-keys) and start a new login. | | `invalid_grant` | `device_code_client_mismatch` | The code was issued to a different `client_id`. | Poll with the `client_id` you sent in step 1. | Each of these bodies also has `error_description` and `message` with the reason in words, a `fix` and a `docs_url`. The `authorization_pending` and `slow_down` bodies also carry `interval`. ### Request errors The first column names the endpoint that returns each error: | Endpoint | Status | `code` | What happened | What to do | | - | - | - | - | - | | `/v1/auth/agent/code` | `400` | `missing_parameter` | `client_id` is missing. `param` names it. | Send `client_id`, then retry. | | `/v1/auth/agent/token` | `400` | `missing_parameter` | `client_id`, `device_code` or `grant_type` is missing. `param` names it. | Send the field, then retry. | | `/v1/auth/agent/token` | `400` | `unsupported_grant_type` | `grant_type` is neither `urn:ietf:params:oauth:grant-type:device_code` (step 3 above) nor the older `urn:ietf:params:oauth:grant-type:agent_code` (see [Older `agent_code` grant](#older-agent_code-grant)). `error` is `Invalid parameter`. | Send `urn:ietf:params:oauth:grant-type:device_code`. | | Both | `405` | `method_not_allowed` | The request didn't use `POST`. The `Allow` header is `POST`. | Send a `POST`. | | Both | `429` | `rate_limited` | Too many requests from your IP address: more than 10 per minute to `/v1/auth/agent/code`, or more than 24 per minute to `/v1/auth/agent/token`. | Wait for the seconds in `Retry-After`, then continue. | | Both | `503` | `device_login_unavailable` | Keenable's login store didn't respond. | Wait for the seconds in `Retry-After`, which is `3`, then send the same request again. | When the person approves in the console, a mistyped or expired code returns `404` `user_code_not_found`, and a code that was already approved returns `400` `user_code_used`. ### Older `agent_code` grant Older clients poll with `grant_type=urn:ietf:params:oauth:grant-type:agent_code` and send the code in `agent_code`. That grant still works. `keenable login` polls with the `device_code` grant and switches to this one only if the server rejects that grant type. The older grant differs from `device_code` in these ways: * It answers every poll with `200` and puts the state in `error`: `authorization_pending`, `access_denied` or `expired_token`. * It reports a used code or a different `client_id` as `expired_token`, and names the reason in `code`. * On success it returns only `api_key`. * It never returns `slow_down`, and it doesn't return `503` while polling. ## Error responses An authentication error body has a `code` that says what went wrong and a `fix` that says what to do. None of these succeed if you retry the same request unchanged. | Status | Code | Meaning | Fix | | - | - | - | - | | [`401`](/errors#401-missing-key) | `missing_api_key` | No `X-API-Key` or `Authorization: Bearer` header on a keyed path | Send your key, or call the `/public` path with `X-Keenable-Title` | | [`401`](/errors#401-invalid-key) | `invalid_api_key` | The API key is malformed, unknown or mistyped | Copy the full key from the [console](https://app.keenable.ai/console/api-keys), or create a new one | | [`401`](/errors#api-key-required) | `api_key_required` | A signed-in session token was sent to an endpoint that takes only an API key, such as [`GET /v1/auth/user`](/api-reference/auth-user) | Send an API key in `X-API-Key` | | [`401`](/errors#401-invalid-token) | `invalid_bearer_token` | The bearer token wasn't accepted | Sign in again for a fresh token, or send an API key in `X-API-Key` | | [`403`](/errors#403) | `credentials_forbidden` | The key was recognized but isn't allowed, usually because it was revoked | Create a new key | | [`400`](/errors#400-missing-app-identifier) | `missing_app_title` | Missing `X-Keenable-Title` header on a keyless `/public` request | Name your app in `X-Keenable-Title` | | [`402`](/errors#402) | `insufficient_credits` | The monthly allowance is used and the prepaid balance is used up. See [Balance and usage](/credits). | Top up in the console or turn on [auto top-up](/auto-top-up) | | [`429`](/errors#429) | `rate_limit_per_second`, `public_rate_limit_per_second`, `public_rate_limit_hourly` | Rate limit exceeded. See [Rate limits](/rate-limits). | Wait for `Retry-After`, then retry | On `/v1/search` and `/v1/fetch`, a `401` also names the keyless `/public` alternative in `keyless`. Every code the API returns, with the exact body you see and how to fix it, is on [Errors](/errors#error-codes). # Auto top-up Source: https://docs.keenable.ai/auto-top-up Refill your prepaid balance automatically: the threshold, amount and monthly limit you set, when your card is charged, and what a declined charge does. Auto top-up keeps your purchased balance from running out. You choose a threshold and an amount, and whenever the balance falls below the threshold, Keenable charges your saved card that amount and adds it to your balance. A monthly limit caps how much can be charged in one month. Auto top-up is off until you turn it on under **Billing** in the [console](https://app.keenable.ai/console/billing). ## Settings | Setting | Default | Allowed | | - | - | - | | When balance falls below | \$5 | \$1 to \$10,000 | | Add | \$20 | \$5 to \$10,000 | | Monthly limit | \$1,000 | \$5 to \$100,000, and no less than one top-up | A top-up adds to your balance the same way as a top-up in the console, and the console shows how many requests each amount buys. Change the settings at any time while auto top-up is on: **Edit**, then **Save**. ## Turn on auto top-up The first time, the console sends you to Stripe to add a card. If your balance is already below the threshold, Stripe takes the first top-up in the same step. Otherwise, Stripe only saves the card. When you come back, auto top-up is on. Once a card is saved, turning auto top-up on or saving new settings takes effect at once. If your balance is already below the threshold when you turn auto top-up on or save new settings, Keenable charges your card straight away. The console says so above the button before you confirm. ## When your card is charged The threshold applies to your purchased balance, the dollar balance shown on the Billing page. The free [monthly allowance](/credits#monthly-allowance) doesn't count toward it. Keenable uses free requests first. While you have some left, your purchased balance doesn't go down and Keenable charges nothing. Every charge creates an invoice. An automatic top-up appears in the console's invoice list, like any purchase. The monthly limit counts whole top-ups. Keenable charges a top-up only if all of it fits under what is left of the limit. Once the next top-up would go over, Keenable charges nothing more until the limit resets. The limit resets on the same day as the free allowance, and the console shows how much you've been charged this month and when the limit resets. If the balance and the allowance both run out before then, requests return `402`, as described in [Balance and usage](/credits#when-credits-run-out). ## When a charge fails If the card is declined, or the bank asks to confirm the payment (3-D Secure, which cannot happen while you are away), auto top-up turns off. Nothing is retried. The person who turned it on gets an email, and the Billing page shows **Auto top-up stopped** with the reason. To start again, check the card, or replace it with **Manage** next to the card on file, under the invoices on the Billing page. Then select **Fix auto top-up** and turn it back on. If your balance is below the threshold at that point, the first top-up is charged straight away. If a charge fails for a reason other than the card, such as an outage at Keenable or Stripe, auto top-up stays on and tries again the next time the balance is low. ## Change the card or turn it off While auto top-up is on, **Change card** opens Stripe to set a different card. **Turn off** stops all further charges at once. The amounts already added stay on your balance and never expire. Automatic charges are covered by the Automatic Top-Ups section of the [Terms of Service](https://keenable.ai/terms). Turning auto top-up on authorizes charges for exactly the amounts you set. # Search API benchmarks: speed and open NEEDLE data Source: https://docs.keenable.ai/benchmarks Keenable's speed on the Artificial Analysis Search Index, and NEEDLE, the open benchmark we run: verticals, engines, raw data and how to re-score. Check how fast Keenable answers on an independent board, then download the raw results of NEEDLE, the open benchmark we run, and score them yourself. To compare providers on your own queries, follow [Evaluate search APIs](/guides/evaluate-search-apis). **Updated at:** 19 November 2026, 12:44 UTC, the newest run of NEEDLE, the open benchmark we run, in this page's snapshot. The [run index](https://keenableai.github.io/needle/data/runs.json) lists every run since. | What | Who runs it | Where to read it | | - | - | - | | Time per search call and per agent task | Artificial Analysis, an independent board | [Speed on Artificial Analysis](#speed-on-artificial-analysis) | | Ranking and answer recall in five verticals | Keenable, as open source with public data | [NEEDLE dashboard](https://keenableai.github.io/needle/) | | Results on your own queries | You | [Evaluate search APIs](/guides/evaluate-search-apis) | ## Speed on Artificial Analysis From the Artificial Analysis Search Index, published 18 August 2026: * Fastest search call on the Artificial Analysis Search Index: 0.34 s. * Lowest time per agent task on that board (15.1 s), about 1 s more than running with no search at all. Artificial Analysis measured Keenable in `realtime` mode. See the [Cost table on Search](/products/search#cost) for the two modes. Source: [Announcing the Artificial Analysis Search Index](https://artificialanalysis.ai/articles/search-api). ## NEEDLE We publish NEEDLE, the open benchmark we run, live against 20+ search APIs; anyone can re-score the raw results. Keenable runs NEEDLE, so check any NEEDLE number against the raw data below. The code is MIT licensed and the results data is CC BY 4.0. Every engine in a run gets the same query text. NEEDLE scores the ranking, titles and snippets each engine returns. It doesn't fetch pages or re-rank, the judge doesn't see engine names, and every engine's evidence is capped at the same snippet length. Queries are generated fresh from public sources, so there is no fixed set to tune for. The [NEEDLE dashboard](https://keenableai.github.io/needle/) has the full comparison protocol and the current results. ### Verticals | Vertical | Queries | Scored by | Runs | Query file | Newest run in this snapshot | | - | - | - | - | - | - | | Scholar | Find a specific paper from a degraded title, a full-text detail or a half-remembered description | recall\@10 and MRR, by arXiv ID, DOI or PMID match | Twice a day | `scholar.jsonl` | [2026-11-19T0927Z](https://huggingface.co/datasets/keenable-ai/needle-results/tree/main/runs/2026-11-19T0927Z) | | News | Breaking and developing stories, new each hour from public RSS feeds and Google Trends | nDCG\@5 from an LLM judge's 0 to 4 ratings | Every hour | `fresh.jsonl` | [2026-11-19T1201Z](https://huggingface.co/datasets/keenable-ai/needle-results/tree/main/runs/2026-11-19T1201Z) | | Finance | Company and SEC filing lookups with known answers from public registries | answer-recall\@5 and MRR\@5: is the answer in a top 5 title or snippet | Twice a day | `gold.jsonl` | [2026-11-19T0414Z](https://huggingface.co/datasets/keenable-ai/needle-results/tree/main/runs/2026-11-19T0414Z) | | AgenticRare | Obscure, long-tail entities, sampled from public agentic search logs | nDCG\@5 from an LLM judge's 0 to 4 ratings | Twice a day | `agentic_rare.jsonl` | [2026-11-19T0534Z](https://huggingface.co/datasets/keenable-ai/needle-results/tree/main/runs/2026-11-19T0534Z) | | Legal | A specific court opinion or section of the Code of Federal Regulations | recall\@5 and MRR\@5, by citation, docket or URL match | Twice a day | `legal.jsonl` | [2026-11-19T1244Z](https://huggingface.co/datasets/keenable-ai/needle-results/tree/main/runs/2026-11-19T1244Z) | ### Engines On 19 November 2026, the [NEEDLE dashboard](https://keenableai.github.io/needle/), for the open benchmark we run, listed 25 engines. These are their CLI ids, which `--engines` takes, with the dashboard name where it differs: `keenable-realtime` (shown as Keenable), `perplexity`, `perplexity-fast`, `exa`, `exa-lite`, `brave-llmcontext`, `parallel` (shown as parallel-advanced), `context` (shown as context.dev), `brave`, `parallel-fast`, `you`, `linkup`, `parallel-turbo`, `tinyfish`, `deepseek`, `claude-search`, `kagi`, `octen`, `chatgpt-search`, `firecrawl`, `bing` (shown as bing/searchapi), `google` (shown as google/serper), `tavily`, `jina`, `seltz`. A vendor with more than one mode or endpoint appears once per mode, such as `exa` and `exa-lite`. The dashboard's Keenable row is `keenable-realtime`, Keenable in `realtime` mode. The NEEDLE CLI also has `keenable`, which runs `pro` mode, and engines the dashboard doesn't show. The [NEEDLE README](https://github.com/keenableai/needle#configuration) lists each engine's API key variable. ## Public data Everything behind a NEEDLE number is public: | Data | What it holds | Where | | - | - | - | | Per-run reports | Every query and result (title, URL, snippet), judge ratings with reasoning, per-call latencies and the run's settings. Each engine's results are in `/.json`. | [keenable-ai/needle-results](https://huggingface.co/datasets/keenable-ai/needle-results) on Hugging Face, under `runs//` | | Query files | The exact queries each run sent, with gold answers where the vertical has them | The same run folder | | Run index | Every run id, its time and the files it produced | [runs.json](https://keenableai.github.io/needle/data/runs.json) | | Results tables | The current results as CSV, JSON, Markdown and PDF, plus monthly snapshots | [NEEDLE results page](https://keenableai.github.io/needle/results/) | | Code | Engine clients, the judge prompt and the metric code | [keenableai/needle](https://github.com/keenableai/needle) on GitHub | ## Re-score a run Run Keenable again on the exact queries of a published run, then compare your report with the one in the run folder. You need [uv](https://docs.astral.sh/uv/) and git. This re-runs Keenable on the exact queries of the Legal run of 19 November 2026, 12:44 UTC: ```bash Terminal theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} git clone https://github.com/keenableai/needle.git cd needle uv sync uvx --from huggingface_hub hf download keenable-ai/needle-results --repo-type dataset \ --include "runs/2026-11-19T1244Z/*" --local-dir needle-results uv run needle legal run --queries needle-results/runs/2026-11-19T1244Z/legal.jsonl \ --engines keenable-realtime --out legal.json ``` You get `legal.json`, a report with recall\@5 and MRR\@5 for `keenable-realtime`, broken down by suite (case law or regulation code), query syntax and court. Compare it with the published `legal.json` in the run folder, or with `legal/keenable-realtime.json` for that engine alone. Your numbers can differ, because the live web changes between runs. * Without `KEENABLE_API_KEY`, the CLI of NEEDLE, the open benchmark we run, calls Keenable's keyless endpoint, which allows 1,000 requests per hour per IP address. See [Rate limits](/rate-limits). * To add other engines, pass them to `--engines` and set each engine's API key. The [NEEDLE README](https://github.com/keenableai/needle#configuration) lists the variables. * Legal and Scholar score by ID match, so re-running them on a published query file needs no LLM key. News and AgenticRare use an LLM judge, so re-running them needs `OPENROUTER_API_KEY`. So does generating new queries for most verticals. * To re-score without searching again, read each engine's per-query results from the run folder and apply the metric code in `src/needle/shared/metrics.py`. ## Next steps * [Evaluate search APIs](/guides/evaluate-search-apis): build a gold set and compare providers with the same settings. * [Search](/products/search): parameters, modes and cost. * [Migrate to Keenable](/migrate): map another provider's parameters to Keenable's. # Search best practices Source: https://docs.keenable.ai/best-practices Get relevant search results at a low context cost: describe the page you want, search in parallel, filter by site and date, and fetch only what you need. These practices get your agent relevant pages in as few characters of context as possible. Each section stands alone. The samples run with no API key (see [Keyless access](/guides/keyless-access)). For one task at a time, see the [Guides](/guides). ## Describe the page you want Write the query as a description of the page that would answer the question. Search is semantic, so describe the page in plain language instead of stacking keywords. | Instead of | Write | | - | - | | `React vs Vue` | `blog post comparing React and Vue performance` | | `postgres replication slot full` | `postmortem of an outage caused by a full Postgres replication slot` | | `node release` | `release notes for a new Node.js version` | Name the kind of page you want: documentation, postmortem, release notes, comparison. ## Split a broad question into parallel searches Run one narrow search per aspect of a broad question instead of one wide query. Cap how many run at once so you stay under your [rate limit](/rate-limits), 10 requests per second by default. This sample runs three searches, at most two at a time, and prints one citable block per query: ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { Keenable } from "keenable"; const client = new Keenable(); const queries = [ "official Postgres documentation on logical replication slots", "postmortem of an outage caused by a full Postgres replication slot", "guide to monitoring Postgres replication lag with pg_stat_replication", ]; async function main() { const blocks: string[] = new Array(queries.length); let next = 0; async function worker() { while (next < queries.length) { const i = next++; const results = await client.search(queries[i], { maxResults: 3, snippetMaxLength: 500 }); blocks[i] = results.toContext(); } } await Promise.all([worker(), worker()]); // at most 2 searches in flight blocks.forEach((block, i) => console.log(`## ${queries[i]}\n${block}\n`)); } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import asyncio from keenable import AsyncKeenable QUERIES = [ "official Postgres documentation on logical replication slots", "postmortem of an outage caused by a full Postgres replication slot", "guide to monitoring Postgres replication lag with pg_stat_replication", ] async def main(): limit = asyncio.Semaphore(2) # at most 2 searches in flight async with AsyncKeenable() as client: async def search(query): async with limit: results = await client.search(query, max_results=3, snippet_max_length=500) return results.to_context() blocks = await asyncio.gather(*(search(q) for q in QUERIES)) for query, block in zip(QUERIES, blocks): print(f"## {query}\n{block}\n") asyncio.run(main()) ``` You see three blocks of three sources each, about 5,400 characters in total: ```text Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} ## official Postgres documentation on logical replication slots [1] 47.2. Logical Decoding Concepts (https://postgresql.org/docs/current/logicaldecoding-explanation.html) In the context of logical replication, a slot represents a stream of changes that can be replayed to a client… [2] 53.20. pg_replication_slots (https://postgresql.org/docs/current/view-pg-replication-slots.html) … ## postmortem of an outage caused by a full Postgres replication slot [1] Our Postgres Survived 14 TB. The Replica Nobody Watched Took Us Down. (https://medium.com/beyond-localhost/6be8c52a3fb1?sk=637721028350a012c7b0cc34dd707f21) - published 2026-05-04T14:01:02Z … ``` ## Narrow with filters, not extra words Use `site` to restrict results to one site and `published_after` to get recent pages. A filter removes every page that doesn't match it. If you set `published_after`, the results also leave out pages with no known publish date. This sample keeps pages on `nodejs.org` published in the last 30 days: ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { Keenable } from "keenable"; async function main() { const client = new Keenable(); const results = await client.search("release notes for a new Node.js version", { site: "nodejs.org", publishedAfter: "30d", maxResults: 3, }); for (const r of results) console.log(r.publishedAt?.slice(0, 10), r.title, r.url); } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from keenable import Keenable client = Keenable() results = client.search( "release notes for a new Node.js version", site="nodejs.org", published_after="30d", max_results=3, ) for r in results: print((r.published_at or "")[:10], r.title, r.url) ``` You see a publish date, a title and a URL per result, all on `nodejs.org`: ```text Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} 2026-11-05 Node.js — Blog https://nodejs.org/en/blog 2026-10-29 Node.js — Run JavaScript Everywhere https://nodejs.org/en/download/archive/v27.0.0-alpha.0.0.0 2026-10-29 Node.js — Node.js Releases https://nodejs.org/en/about/previous-releases ``` To search several sites at once, leave a site out or require an exact phrase, put operators in the query: `site:wired.com OR site:theverge.com`, `-site:reddit.com`, `"other side closed"`. [Search operators](/api-reference/search#search-operators) lists them all. [Filter by date](/guides/filter-by-date) and [Filter by domain](/guides/filter-by-domain) cover both filters in depth. For recent results, use `published_after`, not `query_time`. `query_time` sets only an upper bound: `"7d"` searches the index as it stood 7 days ago and excludes everything newer. See [Date and time filters](/api-reference/search#date-and-time-filters) for every accepted format. ## Choose the mode Leave `mode` at its default, `pro`, unless response time matters more than depth. See [Choose a search mode](/guides/choose-a-search-mode) to time both on your own queries. | Mode | Use it for | | - | - | | `pro` (default) | Deeper retrieval and higher-quality results. | | `realtime` | The fastest response, for latency-sensitive tasks. | Each mode is billed as its own SKU, at \$4 per 1,000 at standard prices. See [Balance and usage](/credits#what-a-call-costs). In the SDKs, pass `mode="realtime"` in Python, `{ mode: "realtime" }` in TypeScript, `Mode: "realtime"` in Go or `mode: Some("realtime".into())` in Rust. This request calls the HTTP API with `realtime`: ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST https://api.keenable.ai/v1/search/public \ -H "Content-Type: application/json" \ -H "X-Keenable-Title: My App" \ -d '{"query": "current weather warnings for Lisbon", "mode": "realtime", "max_results": 3, "snippet_max_length": 200}' ``` The response's `mode` field names the mode that served the request: ```json Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "query": "current weather warnings for Lisbon", "mode": "realtime", "results": [ { "title": "Lisboa, Lisboa, Portugal Weather Advisories - Warnings & Watches | AccuWeather", "url": "https://accuweather.com/en/pt/lisbon/1-274087_1_al/weather-warnings/1-274087_1_al", "description": "", "snippet": "or advisories are issued by official government meteorological authorities. Current conditions in Lisbon: Mostly cloudy, 73°, RealFeel® 80°. See the [full forecast for", "acquired_at": "2026-07-23T09:41:20Z" } ] } ``` ## Control context size Set the size of a search response in the request, then set the size of the prompt block when you render it. If you set neither, you get 10 results whose snippets often run to several thousand characters each. | Setting | Where | What it caps | | - | - | - | | `max_results` | Search request | Results returned, 1 to 50. Defaults to 10. | | `snippet_max_length` | Search request | Characters of text per result, 180 to 10000. | | `max_chars` | `to_context()` | Characters in the whole block. Defaults to 12000. | | `max_results` | `to_context()` | Results considered, from the top. | | `include_dates` | `to_context()` | Set to `false` to drop the publish date from each header. | `to_context()` adds whole results in rank order and stops before the result that would pass `max_chars`. Call `cited()` with the same limits to get the results that the block kept. This sample asks for 5 short results and renders them into a block of at most 1,200 characters: ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { Keenable } from "keenable"; async function main() { const client = new Keenable(); const results = await client.search("how HTTP/3 connection migration works", { maxResults: 5, snippetMaxLength: 400, }); const block = results.toContext({ maxChars: 1200, includeDates: false }); const cited = results.cited({ maxChars: 1200, includeDates: false }); console.log(`${results.length} results, ${cited.length} in the block, ${block.length} characters`); } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from keenable import Keenable client = Keenable() results = client.search( "how HTTP/3 connection migration works", max_results=5, snippet_max_length=400, ) block = results.to_context(max_chars=1200, include_dates=False) cited = results.cited(max_chars=1200, include_dates=False) print(f"{len(results)} results, {len(cited)} in the block, {len(block)} characters") ``` You see that the block kept 3 of the 5 results: ```text Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} 5 results, 3 in the block, 1138 characters ``` See [Result size](/guides/result-size) for `disable_cards` and sizes per job, [Context size](/sdks#context-size) for the option names in each language, and [Ground answers with citations](/guides/ground-answers-with-citations) to turn the block into a cited prompt. ## Read snippets first, then fetch Answer from the search snippets when you can. Each `snippet` is page text chosen for the query, so it often holds the answer. Fetch a page only if its snippet falls short, you need exact wording, or the user names a URL. When you fetch, ask for the part you need. `prompt` makes a model read the page and return only its answer in `content`. `max_chars` caps the characters of `content`, which defaults to 50000. The SDKs take both on `fetch` (see [SDK methods](/sdks#methods)). Over HTTP: ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -G https://api.keenable.ai/v1/fetch/public \ -H "X-Keenable-Title: My App" \ --data-urlencode "url=https://www.postgresql.org/docs/current/logicaldecoding-explanation.html" \ --data-urlencode "prompt=What happens to WAL when a replication slot's consumer stops? Answer in two sentences." \ --data-urlencode "max_chars=600" ``` `content` holds two sentences instead of the whole page: ```json Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "url": "https://www.postgresql.org/docs/current/logicaldecoding-explanation.html", "title": "47.2. Logical Decoding Concepts", "content": "The replication slot will prevent the removal of required WAL even when there is no connection using it. This consumes storage because the required WAL cannot be removed as long as it is required by the replication slot.", "description": "" } ``` See [Fetch](/products/fetch#key-parameters) for `live` and what each fetch costs, and [Search, then fetch](/guides/search-then-fetch) for when to set it. ## Group an agent run with a session ID Send the same session ID on every search and fetch in one agent run, so Keenable can group the run's requests. Name your app on every request too, so Keenable attributes the traffic to your product. | What | HTTP | SDK | | - | - | - | | Session ID, up to 128 characters | `X-Keenable-Session-Id` header, or `session_id` in the search body or the fetch query string | No argument. Send the header through the client's default headers, TypeScript from `keenable` 0.2.0 ([how](/guides/high-volume-research#group-a-run-with-a-session-id)) | | App name | `X-Keenable-Title` header | `client_source` (Python), `clientSource` (TypeScript) | If you send both the header and the `session_id` parameter, the header wins. The keyless `/public` endpoints require `X-Keenable-Title`. The SDKs send `Keenable SDK` unless you set the client source. This request tags one search with an app name and a session ID: ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST https://api.keenable.ai/v1/search/public \ -H "Content-Type: application/json" \ -H "X-Keenable-Title: Acme research agent" \ -H "X-Keenable-Session-Id: run-2026-11-09-0042" \ -d '{"query": "official Postgres documentation on logical replication slots", "max_results": 1, "snippet_max_length": 180}' ``` You see an ordinary search response. Over MCP, pass `session_id` as a tool argument. See [MCP](/mcp-server#available-tools). ## Handle 429 and 402 On `429`, wait for the time in the `Retry-After` header, then retry the same request. For many calls in parallel, see [High-volume research](/guides/high-volume-research). See [429 Rate limit exceeded](/errors#429) and [Rate limits](/rate-limits). On `402`, stop: your organization has used its allowance and prepaid balance, and every retry returns `402` until someone tops up. See [402 Out of funds](/errors#402). ## Next steps * [Recipes](/recipes): complete apps built on these practices, such as a [research loop](/recipes/research-loop), [RAG with fresh web results](/recipes/rag-with-fresh-web-results) and [fact-checking with citations](/recipes/fact-check-with-citations). * [Search](/products/search) and [Fetch](/products/fetch): cost and key parameters. * [Search API reference](/api-reference/search) and [Fetch API reference](/api-reference/fetch): every parameter and response field. * [SDKs](/sdks): configuration, methods and error classes. ## Related pages > [card] [Production checklist](/production) > > Ship Keenable search and fetch to production: keys from the environment, rate limits, retries on 429 with Retry-After, stopping on 402, timeouts and status. > [card] [Search operators](/guides/search-operators) > > How to put quoted phrases, site:, OR, - and parentheses in a query, when to use them instead of the site and exclude_domains parameters, and the 400 fix. > [card] [Evaluate search APIs](/guides/evaluate-search-apis) > > Compare web search APIs fairly: build a gold set, run the same queries with equal settings, judge results blind and avoid the pitfalls that skew scores. > [card] [Glossary](/glossary) > > Definitions of the terms you meet when you build on Keenable, from snippet, card and acquired_at to x402, MCP, monitor runs and webhook signatures. # Keenable changelog Source: https://docs.keenable.ai/changelog New Keenable features and changes by month, newest first: search and fetch parameters, the MCP server, SELECT, billing, and new integrations. **November 2026** **Time Machine search and fetch move to `/v1/time-machine/` (24 November).** Early Access. [`POST /v1/time-machine/search`](/api-reference/time-machine#search) takes `as_of` and `include_domains`. [`POST /v1/time-machine/fetch`](/api-reference/time-machine#fetch) reads up to 10 URLs per call, with a `status` per URL. Every time is an RFC 3339 timestamp with a time zone, and results name the capture time `snapshot_at`. Calls to the old paths keep working until 1 March 2027 and return a warning that names the new fields. **Time Machine versions (24 November).** Early Access. [`POST /v1/time-machine/versions`](/api-reference/time-machine#versions) lists every version of up to 10 pages that Keenable captured between `from` and `to`, oldest first, with each version's text and `snapshot_at`. It returns `200` with a `status` per URL. It's free during Early Access, and `usage` shows what a call will cost once it has a price: `cost` is \$0 for now. Time Machine search and fetch don't change. **`moderation` replaces `safety_mode` (23 November).** Search takes [`moderation`](/api-reference/search#request): `moderate` or `strict` removes results that a safety model judges unsafe, and leaving it out means no moderation. It filters exactly as `safety_mode` did, in `pro` and `realtime` modes. `safety_mode` is deprecated and stops working on 1 March 2027. Until then it works unchanged, but every request that sends it gets a `deprecated_parameter` entry in a new `warnings` list, plus `Deprecation` and `Sunset` response headers. Sending both parameters returns `400` with `invalid_parameter`. Moderation now also works with `disable_cards`. The MCP server's `search_web_pages` takes `moderation` now. The SDKs and the CLI (`--moderation`) take it from their next release, and the SDKs add `warnings` to the search response. See [Moderation replaces safety_mode](/changelog/2026-11-moderation) for the migration. **`GET /v1/fetch` is deprecated (23 November).** `GET /v1/fetch` and `GET /v1/fetch/public` stop working on 1 March 2027. Move to [`POST /v1/fetch`](/api-reference/fetch-post), or `POST /v1/fetch/public` without a key, which takes the same JSON body with one URL per call. Until then, every `GET` response carries `Deprecation: true`, a `Sunset` header and a `Link` header that points to the replacement. The last section of the [`POST /v1/fetch`](/api-reference/fetch-post) page maps each `GET` parameter. See [Versioning and deprecation](/versioning#deprecated-now). **`objective` now ranks results (22 November).** Search ranks results by `query` and `objective` together on the [Search API](/api-reference/search#request) and the [MCP server](/mcp-server). Retrieval still reads only `query`, and the price doesn't change. A URL query without `exclude_domains` is fetched as is, so there is nothing to rank. **Monitors names (20 November).** This is a breaking change to the Monitors API, with no aliases for the old names. What a monitor finds is now called a result. `GET /v1/monitors/{id}/pages` is now [`GET /v1/monitors/{id}/results`](/api-reference/monitors/results). The webhook event `monitor.hit` is now `monitor.result.found`, and `monitor.update` is now `monitor.result.changed`. An old event name in `webhook.events` returns `400`. A webhook with no `events` list now gets every type, results included. Before, it got no results unless you listed them. See [Webhook payload](/api-reference/monitors-webhook-payload). Results no longer have `score`, `favicon` or `highlights`. Monitors no longer have `agent_run_id`, `backfill`, `memory_scope`, `estimated_cost_usd` or `cost_this_month_usd`, and runs no longer have `usage`. The SDK method `monitors.results` (Go: `Monitors.Results`) and the CLI command `keenable monitors results` need the next SDK and CLI release. **Fourteen more integration pages (19 November).** Coding agents: [oh-my-pi](/integrations/oh-my-pi) (`web/keenable`), [OpenClaude](/integrations/openclaude) (`/search keenable`), [Gajae-Code](/integrations/gajae-code) (`providers.webSearch`), [FrontierAgent](/integrations/frontier-agent) (`WEB_SEARCH_PROVIDER=keenable`) and [Claude Octopus](/integrations/claude-octopus) (`OCTOPUS_RESEARCH_WEB_SEARCH=keenable`). Research and search: [hyperresearch](/integrations/hyperresearch), [career-ops](/integrations/career-ops), [Obscura](/integrations/obscura), [Qwen-MM-Plugins](/integrations/qwen-mm-plugins) and the [AgentField](/integrations/agentfield) deep research example. Also [OmniRoute](/integrations/omniroute) (`keenable-search` on its search and fetch endpoints), [npcpy](/integrations/npcpy), [Qwen Audio Agent](/integrations/qwen-audio-agent), and one page for [RL and eval environments](/integrations/rl-eval-environments) (SkillOpt and Halo). Halo needs an API key; the others work without one. genoffice, OpenFilm, trueforge, Raven, Coral and weft set Keenable up in their own settings or catalogs and are listed under [Also works with](/integrations#also-works-with). **Four more integration pages and a directories page (19 November).** Setup pages for [LazyLLM](/integrations/lazyllm) (`KeenableSearch`), [Spider](/integrations/spider) (`KeenableProvider`, the `search_keenable` feature), [PipesHub](/integrations/pipeshub) (web search provider, 1.1.0 and later) and [Cerebras](/integrations/cerebras) (the Keenable SDK with Cerebras Inference). LazyLLM and Spider have Keenable on their main branches, ahead of their next releases. [MCP registries and directories](/integrations/directories) lists every catalog that carries Keenable, with the install command for each. **Five new integration pages (19 November).** Setup pages for [AG2](/integrations/ag2) (`KeenableSearchToolkit`, AG2 1.2.2 and later), [OctoTools](/integrations/octotools) (`Keenable_Search_Tool`), [ToolUniverse](/integrations/tooluniverse) (`backend="keenable"`, 1.5.9 and later), [tgpt](/integrations/tgpt) (`SEARCH_PROVIDER=keenable`, 2.16.0 and later) and [mcporter](/integrations/mcporter) (a `keenable` entry in `mcporter.json`). All five work without an API key. DeepChat, DB-GPT and LocalAI set Keenable up in their own settings and are listed under [Also works with](/integrations#also-works-with). **Page monitors, 10-minute schedules and structured outputs (18 November).** A monitor can watch one page for changes: create it with `"type": "page"` and `page: {url, watch_for, sensitivity}` (`watchFor` in the TypeScript SDK), for example on a competitor's pricing page. Its first run records the page as a baseline. Each later run fills the run's `changes`, a change worth telling sends `monitor.page.changed`, and `GET /v1/monitors/{id}/versions` lists the page's history. Page monitors are being rolled out to organizations. Schedules can run every 10 minutes, by interval or cron, and resuming a paused monitor no longer starts a catch-up run. `output_schema` takes a documented subset of JSON Schema, checked when you send it, and a run's `output` adds `fresh` and `error`. See [Monitors](/products/monitors). **Webhooks for MCP monitors (18 November).** `create_monitor` takes an optional `webhookUrl`, a public HTTPS address that gets each new result as a signed webhook. The response returns the signing secret once, as `webhookSecret`. See [Monitors tools](/mcp-server#monitors-tools). In the [Monitors API](/api-reference/monitors/update), an update that adds a webhook to a monitor that had none now returns `webhook.secret` once. Before, it returned none, so that webhook couldn't be verified. **Four Monitors tools over MCP (18 November).** With a key or a sign-in, the [MCP server](/mcp-server#monitors-tools) lists `create_monitor`, `list_monitors`, `get_monitor_results` and `delete_monitor`. `get_monitor_results` replaces `whats_new` and `monitor_pages`: it returns the results this reader hasn't seen yet, and with `includeSeen` and a `monitorId` it returns one monitor's results, read or not. A page holds up to 50 results, where `monitor_pages` held up to 100: follow `nextCursor` for more. The server no longer lists `get_monitor`, `update_monitor`, `trigger_monitor` or `get_run`. Those actions stay in the [Monitors API](/api-reference/monitors/create), the SDKs and the CLI. A client that calls an old tool name still gets an answer. If a scheduled task calls `whats_new`, change it to `get_monitor_results`. See [Four Monitors tools over MCP](/changelog/2026-11-mcp-monitors-tools) for the old-to-new tool map and a test call. **Monitors (17 November).** A monitor watches the web for new pages about a topic, written in plain words. You get each new page as a signed `monitor.hit` webhook minutes after it's crawled, in runs on a cron, interval or one-time schedule, or by polling `GET /v1/monitors/{id}/pages`. Create one with `POST https://api.keenable.ai/v1/monitors` and an API key. Monitors is free for now, with up to 100 active monitors per organization. With a key or a sign-in, the [MCP server](/mcp-server#monitors-tools) adds tools such as `whats_new` and `create_monitor`. Five new error codes cover it: `monitors_not_enabled`, `monitor_limit_reached`, `monitor_option_not_supported`, `idempotency_conflict` and `monitors_unavailable`. See [Monitors](/products/monitors). **A Rust SDK.** `cargo add keenable` installs the official Rust client. It has the same surface as the Python, TypeScript and Go SDKs: keyless search and fetch, every search filter and fetch option, `to_context()`, tool definitions with `run_tool_call`, and typed errors. It is async, runs on Tokio and needs Rust 1.80 or newer. See [SDKs](/sdks). **Exclude a whole suffix, such as `.gov`.** `exclude_domains` accepts a public suffix written with a leading dot, `.gov` or `.co.uk`, and leaves out every host under it. `*.gov` means the same. A bare `gov` and a wildcard on a host, `*.un.org`, still return `400` with `invalid_filter`. A suffix counts as one of the 1,000 entries. See [Exclude domains](/api-reference/search#exclude-domains). **An email before your balance runs out.** When your organization has used 80% of its monthly free allowance, so that what it has left falls to 20% of the allowance, Keenable emails its admins once per billing period with what's left and the reset date. Organizations with auto top-up on get it only once auto top-up hits its monthly limit. See [Low-credit email](/credits#low-credit-email). **Plainer per-second rate-limit errors.** The `rate_limit_per_second` error now says to wait until the time the limit resets, then retry, and links the console page where you can raise the limit, instead of listing top-up terms. See [Rate limits](/rate-limits). **CLI: your saved key stays with the API it was saved for.** The CLI sends a saved API key only to the base URL that `keenable login` saved it for. With `KEENABLE_API_URL` pointing somewhere else, search and fetch stop with exit code `1` instead of sending the key there. Pass `KEENABLE_API_KEY` or `--api-key`, or run `keenable login` with the variable set. The CLI also follows redirects only within the same host, reads the key from stdin with `keenable login --api-key -`, and removes terminal control characters from page text in `-p` output. See [Saved keys and other base URLs](/cli#saved-keys-and-other-base-urls). **Safe search for pro and realtime search.** Search takes `safety_mode`: `off` (the default), `moderate` or `strict`. With `moderate` or `strict`, results that a safety model judges unsafe at that level are removed, and `strict` removes more. Removed results are not replaced, so a query can return fewer results, or none. `safety_mode` works only with `mode` set to `pro` or `realtime`. In another mode, with `disable_cards`, for a URL query, on Time Machine search, or with any other value, the request returns `400` with `invalid_parameter`. See [Safe search](/changelog/2026-11-safe-search) for a sample request and each error, and the [Search request](/api-reference/search#request). **See your credits left on every call.** The `usage` object on `/v1/search` and `/v1/fetch`, and `_meta["keenable/usage"]` on MCP tool calls, has a new field, `credits_remaining`: your organization's free allowance and purchased credits left after the call. Watch it to see the allowance running out before calls fail with `402`. See [Credits](/credits#reading-usage-per-call). **MCP: shorter fetches by default, and the rate limit in the instructions.** The MCP server's `fetch_page_content` returns at most 20,000 characters when you don't set `max_chars`, down from 50,000, so a long page no longer floods an agent's context. The `Truncated:` line gives the full length; raise `max_chars` or use `prompt` for more. The server's instructions now state the rate limit, tell agents to send at most 5 calls at once and to wait out a rate-limit error's retry time, and describe the less obvious options (`max_chars`, `live`, `snippet_max_length`, `max_results`, `output_format`, `session_id`). See [MCP server](/mcp-server). **CLI 0.5.1: an exit code for each kind of failure.** `keenable search` and `keenable fetch` exit with `3` for authentication, `4` when rate limited, `5` when out of credits, `6` when the page or site failed, `7` on a network failure, `8` for an invalid request and `9` for a server error worth retrying, instead of `1` for all of them. In YAML mode, a failure also prints a one-line summary to stderr. Scripts that only check for a nonzero code keep working. With `-p`, the CLI shows your credits left. See [CLI exit codes](/cli#exit-codes). **Leave sites out of search.** Search takes `exclude_domains`, a list of up to 1,000 host names such as `["pinterest.com", "quora.com"]`. Results from those hosts and their subdomains never come back, so fewer than `max_results` can return. An entry that isn't a host, such as a path or a wildcard, returns `400` with `invalid_filter` and names the entry. The MCP server's `search_web_pages` tool takes the same parameter. See [Exclude domains](/api-reference/search#exclude-domains). **Search and fetch refuse parameters they would misread.** A parameter you send now either takes effect or the request fails with `400`. Fetch returns `unknown_parameter` for a parameter it doesn't know, as search does, instead of ignoring it. `live` takes only `true` or `false`, and `max_results` and `max_chars` take only integers in their documented range, sent as a number or a string of digits, so `live=1` and `"max_results": true` fail instead of being read as something else. When an unknown name is close to a supported one, such as `count` for `max_results` or `q` for `query`, the message asks `Did you mean` and the new `did_you_mean` field maps it to the parameter to use. A `POST` body that isn't JSON now says so instead of reporting `"query" is required`. If your client sends extra parameters to fetch, or `live=1`, update it. See [400 Invalid request parameters](/errors#400-invalid-request). **Untitled results get a title from the URL.** A search result whose page has no title used to come back as `Untitled`. Its `title` is now built from the URL's host and path, such as `api.github.com/repos/vercel/next.js/releases/latest`, so your model can tell such results apart. The MCP fetch tools label an untitled page the same way. See [Search](/api-reference/search). **Fetch dates match search.** Fetch now returns `published_at` as an ISO 8601 timestamp in UTC, such as `2026-10-30T00:00:00Z`, the same format as search results, instead of Unix seconds. This covers `/v1/fetch`, the public, x402 and ZeroClick endpoints, and the MCP server's fetch tools. The SDKs ignored the number, so they now return the date. Code that parsed the number should accept the string. See [Fetch](/api-reference/fetch). **CLI 0.3.0: session IDs, fetch dates and clearer errors.** `keenable search` and `keenable fetch` take `--session-id` to group the calls of one agent run. Fetch output shows `published_at` and `acquired_at` as RFC 3339 timestamps in UTC, like search, and adds `truncated: true` when the content hits the `--max-chars` cap. Errors carry the API's request ID and a hint with the next step, plus `type`, `code`, `fix` and `docs_url` when the API sends them. `KEENABLE_API_URL` sends API calls to another base URL, such as a local gateway. See [Session IDs](/cli#session-ids), [Truncated content](/cli#truncated-content), [Errors](/cli#errors) and [API base URL](/cli#api-base-url). **CLI 0.3.0 on corporate networks.** The CLI trusts your operating system's certificate store, so a company root CA installed on the machine works without setup. It also reads `SSL_CERT_FILE` and `SSL_CERT_DIR`, sends requests through `HTTPS_PROXY` and reaches hosts in `NO_PROXY` directly. Add `-v` (`--verbose`) to see the proxy and certificates in use. See [Proxies and corporate networks](/cli#proxies-and-corporate-networks). To upgrade, run `keenable update`, or `brew upgrade keenable-cli` for a Homebrew install. **MCP server: clearer errors and server info.** Tool errors now say how to fix the call: a bad `mode` names `pro` and `realtime`, an unknown tool lists the available tools, an internal error carries the request id, and an invalid API key on `/mcp` says to check it or drop it to search without a key. The date filters' descriptions now mention that they take ISO timestamps and relative offsets such as `7d`, and `initialize` returns a title, description, website and icon for client UIs. See [MCP server](/mcp-server#server-info). **Search without cards.** For some queries, such as prices, exchange rates or facts about a company, search returns a card: a result that Keenable writes itself, at `https://cards.keenable.ai/w/`. Send `disable_cards: true` to get ordinary web pages in their place. `disable_cards` works in `pro` and `realtime` modes, on the [Search API](/api-reference/search) and the [MCP server](/mcp-server). **October 2026** **Pay per request with x402.** Search and fetch can now be bought one call at a time, with no account and no API key. `/v1/x402/search` and `/v1/x402/fetch` answer `402` with an [x402](https://www.x402.org) offer. The client pays \$0.01 in USDC on Base, retries, and gets the result with an on-chain receipt. Any standard x402 client works. See [Pay per request](/pay-per-request). **Auto top-up.** Keenable can now refill purchased credits automatically. Set a threshold, an amount and a monthly limit under Billing in the console, and Keenable charges your saved card whenever your balance falls below the threshold. If the card is declined, Keenable turns auto top-up off and emails you, and doesn't retry the charge. See [Auto top-up](/auto-top-up). **Built into Hermes Agent.** Keenable ships in [Hermes Agent](/integrations/hermes-agent) as a bundled web backend for `web_search` and `web_extract`, with no plugin and no key. Run `hermes config set web.backend keenable` to select it. You no longer need the standalone `hermes-keenable-web` plugin. **Versioning and deprecation policy.** A new policy sets out what can change within `/v1`, what counts as a breaking change, and at least 90 days' notice by changelog and email before anything you rely on stops working. See [Versioning and deprecation](/versioning). **In the Plugin marketplace in Antigravity.** Keenable is one of the launch plugins in Google Antigravity's new marketplace: install it from **Customizations → Marketplace** for web search and page fetch, with no key. See [Google Antigravity](/integrations/antigravity). **September 2026** **Keenable on Baseten.** Web search and page fetch run as [server-side tools](/integrations/baseten) on Baseten Model APIs. Name the two tools in a chat request and the model searches and reads pages inside Baseten's inference loop. You don't need an MCP client or a Keenable key, because Baseten meters the calls onto your Baseten invoice. **Keenable SELECT in both directories.** The [SELECT](/select) server is now a listed connector in Claude (Settings → Connectors → **Keenable SELECT**) and a published plugin in OpenAI's Plugins Directory, shared by ChatGPT and Codex. Both sign you in with your Keenable account, so there's nothing to paste. The custom-connector and developer-mode routes keep working for accounts the listings have not reached yet. **August 2026** **Point-in-time search.** The `query_time` parameter is now documented on both the [MCP tool](/mcp-server#point-in-time-search) and the [Search API](/api-reference/search): search the index as it stood at an instant, and have relative date filters resolve against that instant rather than now. **Two more search parameters.** `max_results` caps how many results come back (1–50), and `snippet_max_length` caps the snippet per result. Both are documented on the [MCP server](/mcp-server) and [Search API](/api-reference/search) pages. **Integrations directory.** A [catalog](/integrations) of the frameworks, agents and editors Keenable plugs into, with one-click installs where the client supports them. Added this month: Claude, Convex, OpenCode, Pipecat, the Vercel AI SDK tool package, Lightpanda, LibreChat, and a listing in the OpenAI Plugins Directory. **Keyless endpoints, written down.** `/v1/search/public` and `/v1/fetch/public` are documented in the [API reference](/api-reference). Use them to evaluate the API without an account. Use an API key in production. **Credits, on their own page.** The monthly credit allowance and the per-SKU pricing model moved out of Rate limits into [Credits](/credits). **July 2026** **Prompt-driven extraction.** The [Fetch endpoint](/api-reference/fetch) accepts a `prompt`, and returns what an LLM read out of the page for that instruction instead of the whole page. **Usage and overrides over MCP.** Every authenticated tool call now reports its cost under `_meta["keenable/usage"]` ([reading usage per call](/credits#reading-usage-per-call)), and an integrator can pin the search mode with `_meta["keenable/overrides"]` ([operator overrides](/mcp-server#operator-overrides-request-_meta)). **Date-only cutoffs cover the whole day.** A bare `YYYY-MM-DD` on `acquired_before` / `published_before` now resolves to `23:59:59.999` on that date, so pages from the named day are kept at either end of a window. Pass a timestamp to cut at an exact instant. **June 2026** **Live fetching on the Fetch API.** The [Fetch endpoint](/api-reference/fetch) now accepts a `live` parameter to retrieve a page in real time instead of serving the cached copy. Use it when freshness matters more than latency. **Published rate limits.** Request limits are now documented: 10 requests/second per organization for authenticated API keys, and a 1,000 requests/hour quota for unauthenticated use. See [Rate limits](/rate-limits). **One-click MCP install.** Added one-click install buttons for Cursor and VS Code (including VS Code Insiders) so you can add Keenable to your editor without editing config by hand. See [MCP server](/mcp-server). **May 2026** **Unauthenticated access.** The [CLI](/cli) and [MCP server](/mcp-server) now answer requests without an API key, on a shared public tier, so you can evaluate them before creating an account. See [Authentication](/authentication). **Authentication and rate-limit guides.** New [Authentication](/authentication) and [Rate limits](/rate-limits) pages cover the device-code login flow, API keys, and the unauthenticated vs. authenticated tiers. **April 2026** **Keenable API launch.** The initial public release of the Keenable platform for AI agents: the [Search API](/api-reference/search) (`/v1/search`), the [Fetch API](/api-reference/fetch) (`/v1/fetch`), the [CLI](/cli), and the [MCP server](/mcp-server), with one API key across all of them. # Four Monitors tools over MCP Source: https://docs.keenable.ai/changelog/2026-11-mcp-monitors-tools Released 18 November 2026: the MCP server lists four Monitors tools, and get_monitor_results replaces whats_new and monitor_pages. Released 18 November 2026. With an API key or a Keenable sign-in, the [MCP server](/mcp-server#monitors-tools) lists four Monitors tools: `create_monitor`, `list_monitors`, `get_monitor_results` and `delete_monitor`. One tool, `get_monitor_results`, now reads both new and earlier results, so your agent picks from four Monitors tools instead of nine. If a scheduled task or a prompt names `whats_new` or `monitor_pages`, change it to `get_monitor_results`. The old names still run, so nothing breaks while you switch. ## What changed | Before 18 November | From 18 November | What to do | | - | - | - | | `whats_new` | `get_monitor_results` | Rename the tool. The arguments are the same: `monitorId`, `minImportance`, `limit`, `reader` and `peek`. | | `monitor_pages` with `id` | `get_monitor_results` with `monitorId` and `includeSeen: true` | Rename the tool, rename `id` to `monitorId` and add `includeSeen: true`. A page holds up to 50 results instead of 100. | | `get_monitor`, `update_monitor`, `trigger_monitor`, `get_run` | Not listed | Use the [Monitors API](/api-reference/monitors/create), an [SDK](/sdks) or the [CLI](/cli#monitors) to read, pause, change or run a monitor. | | `create_monitor`, `list_monitors`, `delete_monitor` | Unchanged | Nothing. | `tools/list` no longer names the six old tools. A client that calls one of them by name, for example from a cached tool list, still gets an answer as before. `get_monitor_results` keeps the reader's place from `whats_new`. A scheduled task that switches tools doesn't get the same results twice, and it doesn't skip any. ## Call get_monitor_results directly The MCP server answers a single `POST` with no session, so you can test a tool call with curl. This request asks for the results of one monitor that this reader hasn't been given yet, rated 4 or higher: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl https://api.keenable.ai/mcp \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -H "X-API-Key: $KEENABLE_API_KEY" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "get_monitor_results", "arguments": { "monitorId": "mon_3kq9z2c8f1a04b7d9e6f5a21", "minImportance": 4, "peek": true } } }' ``` Replace the `monitorId` with one from `list_monitors`, or leave it out to read every monitor. `peek: true` leaves the results unread, so a test call doesn't use up results your scheduled task should get. You get a JSON-RPC response. Its `result.structuredContent` holds the tool's answer, and `result.content[0].text` holds the same answer as a string. The shape of the answer depends on whether you send `includeSeen`: | Call | Answer fields | Next page | | - | - | - | | Without `includeSeen` | `results`, oldest first, plus `count`, `hasMore` and `monitors` | If `hasMore` is `true`, call the tool again. | | With `includeSeen: true` and `monitorId` | `results`, newest first, plus `nextCursor` | Pass `nextCursor` as `cursor`. | `whats_new` returned its list under `pages`, and `monitor_pages` returned it under `data`. If your code reads the tool's answer, read `results` instead. ## Update a scheduled task If a scheduled task in Claude or ChatGPT names the old tool, edit its prompt to name the new one: ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} Every hour: call get_monitor_results on Keenable. If it returns results, tell me about them in a few lines, the most important first, with links. If it returns none, say nothing. ``` The next run calls `get_monitor_results` and continues from where `whats_new` stopped. ## Related * [Monitors tools](/mcp-server#monitors-tools): every argument of the four tools. * [Monitors](/products/monitors): webhooks, schedules and limits. * [Changelog](/changelog): every change, newest first. # Moderation replaces safety_mode on search Source: https://docs.keenable.ai/changelog/2026-11-moderation Released 23 November 2026: send moderation moderate or strict to remove unsafe results. safety_mode is deprecated and stops working on 1 March 2027. Released 23 November 2026. Search takes `moderation` to remove unsafe results before they reach your agent. It filters exactly as [`safety_mode`](/changelog/2026-11-safe-search) did, which it replaces. `safety_mode` keeps working until 1 March 2027, and every request that sends it now gets a warning. If your code sends `safety_mode`, switch to `moderation` before 1 March 2027. From that day, any request that sends `safety_mode` fails with `400`. ## What changed | Before | From 23 November | What to do | | - | - | - | | `"safety_mode": "moderate"` | `"moderation": "moderate"` | Rename the parameter. | | `"safety_mode": "strict"` | `"moderation": "strict"` | Rename the parameter. | | `"safety_mode": "off"` | Leave `moderation` out | Remove the parameter. `"moderation": "off"` returns `400`. | | No moderation | No moderation | Nothing. | `moderation` takes `moderate` or `strict`. Leave it out, or send `null` or an empty string, for no moderation. It works where `safety_mode` worked: with `mode` set to `pro` (the default) or `realtime`, on a text query, and not on Time Machine search. Results that a safety model judges unsafe are removed and not replaced, so a query can return fewer than `max_results` results, or none. Moderation and `safety_mode` now also work with `disable_cards`. ## Search with moderation This request searches without an API key and removes results judged unsafe at the moderate level: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST https://api.keenable.ai/v1/search/public \ -H "Content-Type: application/json" \ -H "X-Keenable-Title: My App" \ -d '{ "query": "best beginner snowboard tricks", "moderation": "moderate", "max_results": 5 }' ``` You get the usual search response, with up to 5 results. With an API key, send the same body to `https://api.keenable.ai/v1/search` with an `X-API-Key` header instead of `X-Keenable-Title`. The MCP server's `search_web_pages` tool takes `moderation` too. See [MCP server](/mcp-server#search_web_pages). The SDKs (`moderation` in Python, TypeScript and Rust, `Moderation` in Go) and the CLI (`--moderation`) take it from their next release. ## Warnings for safety_mode A request that sends `safety_mode`, with any value, still runs as before. The `200` response adds a `warnings` list to the body: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "warnings": [ { "code": "deprecated_parameter", "path": "/safety_mode", "message": "safety_mode is deprecated and stops working on 2027-03-01. Use moderation." } ] } ``` It also adds two headers: `Deprecation: @1795392000`, the date the parameter was deprecated as an RFC 9745 date, and `Sunset: Mon, 01 Mar 2027 00:00:00 GMT`, the date it stops working. To find the requests you still have to change, log `warnings` or these headers. See [Deprecation warnings](/api-reference/search#deprecation-warnings). Time Machine search doesn't take `moderation`, and `safety_mode` there is unchanged until 1 March 2027. See [Time Machine search](/api-reference/time-machine). ## Requests that fail A request with `moderation` fails with `400`, code `invalid_parameter` and `param` set to `moderation`, in these cases: | Request | `message` | Fix | | - | - | - | | A non-empty `moderation` and `safety_mode` together | `"moderation": replaces "safety_mode"; send only "moderation"` | Remove `safety_mode`. An empty `moderation` counts as not sent. | | A value other than `moderate` or `strict`, such as `off` | `"moderation": is not a supported moderation level; use "moderate" or "strict", or leave it out for no moderation` | Send `moderate` or `strict`, or leave `moderation` out. | | `mode` set to another mode | `"moderation": is only supported in "pro" and "realtime" modes` | Set `mode` to `pro` or `realtime`. | | A query that is a URL, with no `exclude_domains` | `"moderation": is not supported when the query is a URL: the page is fetched as is, not filtered` | Send a text query, or read the page with [Fetch](/products/fetch). | A value that differs from a supported one only in case or spaces, such as `"Strict"`, gets a message that asks `did you mean "strict"?`. If you send `safesearch`, `safe_search`, `safe` or `safety` instead, the API returns `unknown_parameter`, and `did_you_mean` maps the name to `moderation`. See [400 Invalid request parameters](/errors#400-invalid-request). ## From 1 March 2027 `safety_mode` is removed. Any request that sends it, whatever its value and on any search endpoint, including Time Machine search and the MCP server, fails with `400`, code `invalid_parameter`, `param` set to `safety_mode`, and `"safety_mode": was removed on 2027-03-01; send "moderation" instead ("moderate" or "strict", or leave it out for no moderation)`. Send `moderation` instead, or leave both out for no moderation. ## Related * [Search API reference](/api-reference/search#request): the `moderation` field and every other request field. * [Versioning and deprecation](/versioning): how long a deprecated parameter keeps working. * [Changelog](/changelog): every change, newest first. # Safe search for pro and realtime search Source: https://docs.keenable.ai/changelog/2026-11-safe-search Released November 2026: send safety_mode moderate or strict on a pro or realtime search to remove results a safety model judges unsafe. Released November 2026. Search takes `safety_mode` to remove unsafe results before they reach your agent. Send `moderate` or `strict`, and results that a safety model judges unsafe at that level don't come back. Use it when your agent shows results to people, for example in a consumer chat app. > [!WARNING] > > `safety_mode` is deprecated and stops working on 1 March 2027. Send `moderation` instead: `moderate` and `strict` filter the same way, and you leave it out for no moderation. A request with `safety_mode` now gets a `deprecated_parameter` warning. `safety_mode` now also works with `disable_cards`, so the `disable_cards` error below no longer occurs. See [Moderation replaces safety_mode](/changelog/2026-11-moderation). ## Values | `safety_mode` | What comes back | | - | - | | `off` | Every result. This is the default when you leave `safety_mode` out. | | `moderate` | Results without the ones judged unsafe at the moderate level. | | `strict` | Results without the ones judged unsafe at the strict level. `strict` removes more than `moderate`. | Removed results aren't replaced. A query can return fewer than `max_results` results, or none. ## Search with safe search This request searches without an API key and removes results judged unsafe at the moderate level. It leaves `mode` out, so the search runs in `pro`, the default: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST https://api.keenable.ai/v1/search/public \ -H "Content-Type: application/json" \ -H "X-Keenable-Title: My App" \ -d '{ "query": "best beginner snowboard tricks", "safety_mode": "moderate", "max_results": 5 }' ``` You get the usual search response, with up to 5 results. With an API key, send the same body to `https://api.keenable.ai/v1/search` with an `X-API-Key` header instead of `X-Keenable-Title`. The SDKs, the CLI and the MCP server's `search_web_pages` tool don't take `safety_mode` yet. Call the [Search API](/api-reference/search#request) over HTTP to use it. ## Requests that fail `safety_mode` set to `moderate` or `strict` works only on an ordinary `pro` or `realtime` search. Otherwise the request returns `400` with the code `invalid_parameter` and `param` set to `safety_mode`. The most common cases are below; the [`safety_mode` field](/api-reference/search#request) lists every one: | Request | `message` | Fix | | - | - | - | | `mode` set to another mode | `"safety_mode": is only supported in "pro" and "realtime" modes` | Set `mode` to `pro` or `realtime`. | | `disable_cards: true` in the same request | `"safety_mode": cannot be combined with disable_cards` | Drop one of the two. | | A query that is a URL, with no `exclude_domains` | `"safety_mode": is not supported when the query is a URL: the page is fetched as is, not filtered` | Send a text query, or read the page with [Fetch](/products/fetch). | | A value other than `off`, `moderate` or `strict` | `"safety_mode": is not a supported safety mode; use "off", "moderate" or "strict"` | Send one of the three values, in lowercase. | `safety_mode: "off"` never fails. A value that differs from a supported one only in case or spaces, such as `"Strict"`, gets a message that asks `did you mean "strict"?`. The failed request returns a body like this excerpt: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "error": "Invalid parameter", "type": "invalid_request_error", "code": "invalid_parameter", "message": "\"safety_mode\": cannot be combined with disable_cards", "fix": "Correct the \"safety_mode\" parameter (cannot be combined with disable_cards) and retry.", "docs_url": "https://docs.keenable.ai/errors#invalid-parameter", "retryable": false, "param": "safety_mode" } ``` If you send `safesearch` or `safe_search` instead, the API returns `unknown_parameter`, and `did_you_mean` maps the name to `safety_mode`. See [400 Invalid request parameters](/errors#400-invalid-request). ## Related * [Search](/products/search): every search parameter, with examples. * [Search API reference](/api-reference/search#request): the request and response fields. * [Changelog](/changelog): every change, newest first. # Choose a Keenable product for your job Source: https://docs.keenable.ai/choose Pick Search, Fetch, SELECT, Monitors or pay per request by the job your agent has to do: what each returns, the access it needs and its price. Pick a Keenable product by the job your agent has to do. Search and Fetch work with no account or API key, so you can try them first and add a key later. ## Products by job | Product | Use it to | You get | Access | Price | Connect with | | - | - | - | - | - | - | | [Search](/products/search) | Find pages about a topic | Ranked pages, each with its title, URL and an excerpt of its text | No API key needed. An API key lifts the hourly cap. | Free without an API key. With a key, 100,000 free requests a month, then \$4 per 1,000. | SDKs, MCP (`search_web_pages`), CLI, agent skill, REST | | [Fetch](/products/fetch) | Read a known URL | The page as clean markdown, or only the part a `prompt` asks for | No API key needed. An API key lifts the hourly cap. | Free without an API key. With a key, 100,000 free requests a month, then \$4 per 1,000. | SDKs, MCP (`fetch_page_content`), CLI, REST | | [SELECT](/select) | Query structured web data | A table: one read-only SQL `SELECT` over live search results, in seconds to minutes | A free Keenable account, or x402 or ZeroClick with no account | With an account, usage is metered to your organization. \$0.10 per SELECT query over x402 or ZeroClick. | SELECT MCP server, x402 | | [Monitors](/products/monitors) | Get new pages about a topic as they appear | Each new page about a topic, in your agent, at a webhook, in scheduled runs or by polling | An API key. No keyless tier. | Free for now. Up to 100 active monitors per organization. | SDKs, MCP (`get_monitor_results`), CLI, REST | | [Pay per request (x402)](/pay-per-request) | Pay per call without an account | The same responses as `/v1/search` and `/v1/fetch`, and SELECT tables | No account or API key. A wallet with USDC on Base. | \$0.01 per search or fetch, \$0.10 per SELECT query, in USDC on Base | REST (`/v1/x402/*`) | The prices with an API key are standard rates, and your organization can have its own. See [Pricing](/pricing) for every way to pay and [Rate limits](/rate-limits) for the limits with and without a key. ## Try Search and Fetch from a terminal These commands use the [CLI](/cli) with no login. The first finds pages about a topic. The second reads one known page and returns only the part the prompt asks for: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} keenable search "open-weights LLM releases this month" --max-results 3 -p keenable fetch https://docs.keenable.ai/pricing --prompt "List the ways to pay and their prices" -p ``` The search prints 3 ranked results with titles, URLs and excerpts. The fetch prints the answer to the prompt, taken from that page. ## Combine products Most agents use Search and Fetch together: 1. Search for the topic. The excerpts often answer the question. 2. Fetch the pages the agent cites, so the answer rests on the full text. Move to the other products when the job changes: | If your agent | Add | | - | - | | Runs the same search again and again to catch news | [Monitors](/products/monitors), which keeps each new page about the topic for you | | Reads many pages to fill in one table | [SELECT](/select), which searches, fetches and extracts fields in one query | | Has a wallet but no Keenable account | [Pay per request](/pay-per-request), which pays for each call in USDC | To learn how to run Search well, see [Best practices](/best-practices). ## Next steps To connect a product, copy a setup prompt from the [Quickstart](/) into your coding agent, or follow its steps yourself. To make Keenable the only web search your agent uses, see [Make Keenable the default web tool](/default-web-tool). # Keenable CLI Source: https://docs.keenable.ai/cli Install the Keenable CLI, sign in once, add Keenable to Claude Code, Cursor and Codex over MCP, and search, fetch and run monitors from the terminal. With [`keenable-cli`](https://github.com/keenableai/keenable-cli), you search the web, fetch pages, run [monitors](/products/monitors) and add Keenable to your AI clients, all from the terminal. The CLI ships as a single binary. Search and fetch work without an account. Monitors needs an API key. To use your key, run `keenable login` once. The CLI saves it and reuses it for every command. See [Rate limits](/rate-limits) for the limits with and without a key. ## Installation Install the CLI with one of these methods: ```bash Homebrew theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} brew install keenableai/tap/keenable-cli ``` ```bash macOS / Linux theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl --proto '=https' --tlsv1.2 -LsSf \ https://github.com/keenableai/keenable-cli/releases/latest/download/keenable-cli-installer.sh \ | sh ``` ```powershell PowerShell theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} irm https://github.com/keenableai/keenable-cli/releases/latest/download/keenable-cli-installer.ps1 | iex ``` ```bash Source theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} cargo install --git https://github.com/keenableai/keenable-cli ``` The macOS and Linux installer downloads a `.tar.xz` archive, so the machine needs `xz` (the `xz-utils` package on Debian and Ubuntu, `xz` on Fedora and Alpine). On a minimal image or container where `xz` is missing, the installer fails while it unpacks the archive. Install `xz` and run it again, or use Homebrew or `cargo install` instead. Run `keenable --version` to check the install. It prints the installed version. ## Quick start These commands sign you in, add Keenable to your AI clients and run a search: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} # Log in with your Keenable account keenable login # Configure MCP for your AI clients (Claude Code, Cursor, etc.) keenable configure-mcp --all # Search the web keenable search "rust async patterns" -p ``` `configure-mcp --all` shows what it will change and asks you to confirm. The search prints ranked results with titles, URLs and excerpts. ## Authentication `keenable login` signs you in with a device code. The CLI prints a code and a link, and tries to open the link in your browser. On a remote machine, open the link in any browser and enter the code. After you approve, the CLI saves an API key to `~/.keenable/config.json`. On a server or in CI, save an API key instead: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} # Device-code login (opens browser) keenable login # Save an API key from stdin (CI, servers) printenv KEENABLE_API_KEY | keenable login --api-key - # Save an API key given as an argument keenable login --api-key # Clear stored credentials keenable logout ``` `keenable login --api-key` checks the key with the API before it saves the key. If the API rejects the key, the CLI doesn't save it and exits with code `1`. Prefer `--api-key -`, which reads the key from stdin. A key passed as an argument shows up in your shell history and in the process list that other users on the machine can see. The CLI keeps the key in `~/.keenable/config.json`, readable only by you. `keenable configure-mcp` also writes the key into each client's MCP config. `keenable logout` removes the saved key and lists the clients that still hold one. To remove it from them too, run `keenable reset --all`. To use a key without saving it, set `KEENABLE_API_KEY` or pass `--api-key` to `keenable search` or `keenable fetch`. The flag overrides the variable, and both override the saved key. ## MCP setup These commands show which AI clients have Keenable configured, add it to them or remove it: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} # Show client status keenable configure-mcp # Configure all detected clients keenable configure-mcp --all # Configure specific clients keenable configure-mcp --claude-code --cursor # Configure without the confirmation prompt (CI, agents) keenable configure-mcp --all --yes # Show which clients have Keenable configured keenable reset # Remove Keenable from all clients keenable reset --all ``` `configure-mcp` and `reset` take the same client flags. `--all` selects every client the CLI detects on the machine: | Client | Flag | File the CLI edits | | - | - | - | | Claude Code | `--claude-code` | `~/.claude.json` and `~/.claude/settings.json` | | Cursor | `--cursor` | `~/.cursor/mcp.json` | | Devin Desktop | `--devin` | `~/.config/devin/mcp_config.json` | | Devin Desktop, legacy Windsurf install | `--windsurf` | `~/.codeium/windsurf/mcp_config.json` | | Codex | `--codex` | `~/.codex/config.toml` | | OpenCode | `--opencode` | `~/.config/opencode/opencode.json` | `configure-mcp` adds a `keenable` entry that points at `https://api.keenable.ai/mcp`. If you're logged in, the entry carries your API key in the `X-API-Key` header. If you aren't, the entry has no key and the client runs on the public tier. A keyless Codex or Devin Desktop entry points at the keyless endpoint, `https://api.keenable.ai/mcp-public`, instead, because `/mcp` publishes OAuth discovery, which can make Codex start a browser sign-in. To add your key later, run `keenable login`, then `configure-mcp` again. `configure-mcp` also turns off the client's own web search, so the agent uses Keenable: * In Claude Code, it adds `WebSearch` and `WebFetch` to `permissions.deny` in `~/.claude/settings.json`. It also removes them from the allow lists in the `.claude/settings.local.json` files it finds under your home directory, in folders such as `~/dev`, `~/projects` and `~/src`. * In OpenCode, it sets `permission.websearch` to `deny`. `keenable reset` removes the `keenable` entry and turns those tools back on. For Codex and Cursor, and for a routing rule, see [Make Keenable the default web tool](/default-web-tool). For an agent with no MCP client, install the [agent skill](/agent-skill) instead. Both commands ask you to confirm before they write. If stdin isn't a terminal, they exit with code `1` and ask for `--yes` (`-y`), which skips the prompt. ## Search `keenable search` prints YAML for agents by default. These examples show each flag: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} # YAML output (for agents) keenable search "AI news" # Pretty output (for humans) keenable search "AI news" -p # Only results from one site keenable search "AI news" --site techcrunch.com # Leave these hosts and their subdomains out (repeatable, or comma-separated) keenable search "AI news" --exclude-domain pinterest.com,quora.com # Pages published on or after 1 January 2026 keenable search "AI news" --published-after 2026-01-01 # Pages acquired on or before 1 May 2026 keenable search "AI news" --acquired-before 2026-05-01 # Longer snippets, in characters (180-10000) keenable search "rust async" --snippet-max-length 2000 # More results (1-50, default 10) keenable search "rust async" --max-results 25 # Point-in-time search: the index as it stood then keenable search "AI news" --query-time 2026-01-01T00:00:00Z # Fastest results instead of the pro default keenable search "AI news" --mode realtime # Group related calls under one session ID keenable search "AI news" --session-id agent-run-42 # Remove results judged unsafe (moderate or strict) keenable search "AI news" --moderation strict # Use a specific API key keenable search "AI news" --api-key KEY ``` ### Exclude domains `--exclude-domain` leaves hosts out of the results. Repeat the flag or separate hosts with commas. These two commands send the same list: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} keenable search "security council vote" --exclude-domain blogs.un.org,reddit.com keenable search "security council vote" --exclude-domain blogs.un.org --exclude-domain reddit.com ``` Each host also excludes its subdomains. To leave out every host under a public suffix, write the suffix with a leading dot: `--exclude-domain .gov` drops `irs.gov`, `www.nasa.gov` and every other host that ends in `.gov`. The CLI trims spaces around each entry and sends a blank entry, such as the end of `a.com,`, as `""`, which the API rejects. When a script builds the flag from a variable that can be empty, leave the flag out instead. A rejected entry prints the `invalid_filter` error with the entry and the reason, and the command exits with code `8`. The rules and limits are on [Exclude domains](/api-reference/search#exclude-domains). ### Search mode `--mode` takes `pro` or `realtime`. If you leave it out, the API uses your organization's default mode, or `pro` if the organization has none. To set the mode for every search, save it with `keenable config`: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} # Show both settings and their allowed values keenable config # Use realtime for a search that has no --mode keenable config set default_search_mode realtime # Use pro for every search, even one that passes --mode keenable config set forced_search_mode pro # Print one setting, or remove it keenable config get default_search_mode keenable config unset default_search_mode ``` `keenable config get` prints the value. If the setting has no value, it prints nothing and exits with code `1`. The CLI keeps these settings in `~/.keenable/config.json`. ### Moderation `--moderation` takes `moderate` or `strict` and removes results that a safety model judges unsafe at that level. Removed results aren't replaced, so a search can return fewer results, or none. Without the flag, or with an empty value (`--moderation ""`), results aren't moderated. Any other value is a usage error with exit code `2`. The API rejects the flag with exit code `8` for a URL query that is fetched as is. See [Moderation replaces safety_mode](/changelog/2026-11-moderation). If the API reports a deprecated request parameter, the YAML output carries its `warnings` list and each warning also goes to stderr as a `warning: …` line. `-p` prints each warning. `--moderation` and the warnings need the next CLI release. ### Date and time filters `--acquired-after`, `--acquired-before`, `--published-after` and `--published-before` each accept one of these formats: * A date in RFC 3339 `full-date` form (`YYYY-MM-DD`). It covers that whole day in UTC. An `--*-after` flag resolves to `00:00:00` on that date, and a `--*-before` flag resolves to `23:59:59.999`, so pages from the named day are kept at either end. To cut at an exact instant, pass a timestamp instead. * A timestamp in ISO 8601 form (`YYYY-MM-DDTHH:MM:SS[.sss][±HH:MM]`). If you leave out the timezone offset, the timestamp is read as UTC. * A relative delta (``, such as `7d` or `30min`). It resolves to the request time minus the delta, truncated to the minute, even if you set [`--query-time`](#point-in-time-search). The units are `min` (minutes), `h` (hours), `d` (days), `w` (weeks), `mo` (30 days) and `y` (365 days). These commands show what each format resolves to: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} # Resolves to 2026-01-15T00:00:00Z keenable search "AI news" --published-after 2026-01-15 # Resolves to 2026-01-15T23:59:59.999Z, so the 15th is kept keenable search "AI news" --published-before 2026-01-15 # No offset, so read as UTC keenable search "AI news" --published-after 2026-01-15T10:30:00 # Explicit offset of UTC-5 keenable search "AI news" --published-after 2026-01-15T10:30:00.500-05:00 # 7 days before request time keenable search "AI news" --acquired-after 7d # 30 minutes before request time keenable search "AI news" --acquired-after 30min ``` You can mix relative and absolute values in the two bounds of a window: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} keenable search "AI news" --published-after 1y --published-before 6mo keenable search "AI news" --acquired-after 2024-01-01 --acquired-before 30d ``` Deltas are truncated to the minute. At request time `2026-05-18T14:23:45Z`, `--acquired-after 2h` resolves to `2026-05-18T12:23:00Z`. A page acquired at `12:22:59Z` is dropped, and a page acquired at `12:23:00Z` is kept. ### Point-in-time search `--query-time` runs the search against the index as it stood at one instant. Pages acquired after that instant are left out, so you get the results the index would have returned then. The flag takes the same formats as the filters above. This command searches the index as it stood on 30 May 2025: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} keenable search "champions league final" --query-time 2025-05-30T00:00:00Z ``` Relative deltas still count back from the time you run the command, not from `--query-time`. To bound results around a past instant, use dates. This command returns pages published in the 30 days before 13 June 2026, as the index stood then: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} keenable search "cloud computing" --query-time 2026-06-13T00:00:00Z --published-after 2026-05-14 ``` A date-only `--query-time` resolves to `00:00:00` UTC, the start of the day. A date-only `--*-before` flag resolves to the end of the day. So `--query-time 2026-06-13` cuts at the start of 13 June, and `--acquired-before 2026-06-13` keeps all of 13 June. ## Fetch `keenable fetch` prints a page's content as YAML by default: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} # Fetch page content (YAML) keenable fetch https://example.com # Pretty output keenable fetch https://example.com -p # Read several pages in one call, up to 20 (needs an API key) keenable fetch https://example.com https://example.org # Read the live page instead of Keenable's indexed copy keenable fetch https://example.com --max-age-hours 0 # Re-read the page if Keenable's copy is more than a day old (needs an API key) keenable fetch https://example.com --max-age-hours 24 # Raise the content cap above the default 50000 characters keenable fetch https://example.com --max-chars 200000 # Return only the answer to a prompt instead of the full page keenable fetch https://example.com --prompt "List all pricing tiers with their monthly prices" # Group related calls under one session ID keenable fetch https://example.com --session-id agent-run-42 ``` With an API key, the CLI calls [`POST /v1/fetch`](/api-reference/fetch-post), so it also takes `--schema` (a JSON Schema, inline or `@file`, for a typed answer in `structured`), `--links N` and `--images N`. One call counts as one request toward the rate limit, and each page is billed as one fetch. With several URLs, the YAML output is `results`: one page or `{url, error}` per URL, in request order. The command fails only when every URL failed. Without a key, `fetch` takes one URL, and `--max-age-hours` only as `0`. These options need the next CLI release; earlier versions take `--live` instead of `--max-age-hours 0`. In the output, `published_at` and `acquired_at` are RFC 3339 timestamps in UTC, such as `2026-11-03T19:34:43Z`. Search results use the same format. ### Truncated content If the page is longer than `--max-chars`, the API cuts the content. The YAML output has `total_chars`, the length of the full page content, and `truncated`, which is `true` when the content was cut. This command caps the content at 100 characters: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} keenable fetch https://example.com --max-chars 100 ``` The output flags the cut content: ```yaml theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} url: https://example.com/ title: Example Domain content: This domain is for use in documentation examples without needing permission. This is not a servic... total_chars: 156 truncated: true ``` To get the rest of the page, run the command again with a larger `--max-chars`. With `-p`, the CLI prints that hint below the content. If the content isn't cut, the output has `truncated: false`. ## Monitors `keenable monitors` creates [monitors](/products/monitors) and reads their results. A monitor is a standing query: each newly crawled page that is news about its topic becomes one of its results. Monitors needs an API key, so run `keenable login` first. Without a key, the command stops with exit code `3`. ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} # Create a monitor that runs every day keenable monitors create "new open-weights LLM releases" --every 1d # Run on weekday mornings in your time zone keenable monitors create "Series A rounds in robotics" --cron "0 9 * * 1-5" --timezone Europe/Paris # Send each new result to a webhook as it's found keenable monitors create "CVE in OpenSSL" --webhook https://example.com/hook --event monitor.result.found # List your organization's monitors keenable monitors list -p # Read a monitor's results, only the important ones keenable monitors results mon_123 --min-importance 4 -p # Change the schedule; flags you leave out stay as they are keenable monitors update mon_123 --every 6h # Run it now, then check the run keenable monitors trigger mon_123 keenable monitors runs mon_123 --limit 1 # Pause it, and resume it later keenable monitors pause mon_123 keenable monitors resume mon_123 # Delete it and all its results keenable monitors delete mon_123 --yes ``` If you pass `--webhook`, `create` prints `webhook.secret` (`whsec_...`) once. Store it: you need it to [verify webhook signatures](/products/monitors#verify-a-webhook). `--idempotency-key ` makes a retry safe: the same key with the same flags returns the monitor the first call created. `delete` asks before it deletes, and without a terminal it needs `--yes`. The other subcommands are [`get`](/api-reference/monitors/get), [`run`](/api-reference/monitors/run) (one run and its results), [`deliveries`](/api-reference/monitors/deliveries) (webhook attempts of the last 7 days) and [`stats`](/api-reference/monitors/stats). [Bulk actions](/api-reference/monitors/bulk) have no subcommand: use the API or an SDK. Run `keenable monitors --help` for each one's flags. Output, errors and exit codes work as they do for search and fetch. ## Session IDs `--session-id ` tags a search or fetch with your own ID. Pass the same ID on every call in one agent run to group those calls. The CLI sends the ID as the API's `session_id` parameter. The API keeps the first 128 characters of the ID. These commands group a search and a fetch under one session: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} keenable search "rust async" --session-id agent-run-42 keenable fetch https://example.com --session-id agent-run-42 ``` Each command prints its usual output. The session ID doesn't appear in it. ## Errors If a command fails, it exits with a nonzero code. In YAML mode, `keenable search`, `keenable fetch` and `keenable monitors` print the error to stdout as YAML, so your agent can parse it like a result. They also print a one-line summary to stderr. This command asks for an out-of-range number of results: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} keenable search "rust async" --max-results 0 ``` The API rejects the request, and the CLI prints the error: ```yaml theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} error: Invalid parameter type: invalid_request_error code: invalid_parameter message: '"max_results": must be an integer between 1 and 50' fix: Correct the "max_results" parameter (must be an integer between 1 and 50) and retry. docs_url: https://docs.keenable.ai/errors#invalid-parameter request_id: 01a1c54e-7039-7486-bc8a-42a491955843 hint: Fix the request (the message says what was rejected); retrying unchanged fails the same way. ``` The error can have these keys. Each key appears only when it has a value: | Key | When it's set | What it means | | - | - | - | | `error` | Every error | Short error title, such as `Invalid parameter`. | | `type` | If the API sends it | The error category, one of the [error types](/errors#error-types). | | `code` | If the API sends it | Stable machine code, such as `invalid_api_key`. See [error codes](/errors#error-codes). | | `message` | If the API sends it | What went wrong, in words. | | `fix` | If the API sends it | The API's next step for this error. | | `retry_after` | If the API sends a retry time | Seconds to wait before retrying, from the `Retry-After` header or the error body. | | `rate_limit_reset` | On a `429` with an `X-RateLimit-Reset` header | When the rate limit window resets, as the header sent it. | | `docs_url` | If the API sends it | The section of the [errors page](/errors) for the `code`. | | `request_id` | If the API sends an `X-Request-Id` header | The ID of the failed request. Include it when you [report a problem](/errors#report-a-problem). | | `cause` | If the request failed before the API answered | The underlying network error, such as `client error (Connect) → invalid peer certificate: UnknownIssuer`. See [Proxies and corporate networks](#proxies-and-corporate-networks). | | `hint` | If the CLI or the API has a next step | What to do next, in CLI terms, such as running `keenable login` after a `401`. | Branch on `type` and `code` when they're present, not on the text of `error` or `message`. With `-p`, the CLI prints the error and the hint to stderr. It adds a `Docs:` line with the `docs_url` and a `Request ID:` line when the API sent them. ### Exit codes `keenable search`, `keenable fetch` and `keenable monitors` exit with a code for each kind of failure, so a script can branch without reading the output. Search and fetch do so from CLI 0.5.1. Earlier versions exit with `1` for every failure. See [Updating](#updating). The codes: | Code | Meaning | | - | - | | `0` | Success. | | `1` | Any other error: a local setup problem such as an unusable `SSL_CERT_FILE` or an invalid `KEENABLE_API_URL`. | | `2` | Invalid command-line arguments. | | `3` | Authentication or permission: the key is invalid, revoked or not allowed this. | | `4` | Rate limited. Wait `retry_after` seconds, then retry. See [Rate limits](/rate-limits). | | `5` | Out of funds: the allowance and the prepaid balance are used up. See [Balance and usage](/credits). | | `6` | The page or site failed, such as a page that doesn't exist or a site that blocked the fetch. | | `7` | Network: the request failed before the API answered. | | `8` | Invalid request. Fix the arguments; retrying unchanged fails the same way. | | `9` | Server error on Keenable's side. Retry later. | When the API sends an error `type`, it sets the code: for example, every `rate_limit_error` exits with `4`. Other commands exit with `1` on any error. `keenable monitors` has two cases of its own: * Without an API key, it exits with `3` before it sends a request. * `keenable monitors delete` without `--yes` exits with `1` and deletes nothing when it can't ask you to confirm, for example when stdin isn't a terminal. If you answer no at the prompt, it exits with `0`. ### Credits left With an API key, each response's `usage.credits_remaining` is what your organization has left after the call, in credits of \$0.004 each. YAML output includes it, and `-p` prints it as `Credits left: N (https://keenable.ai/console)`. See [Balance and usage](/credits). ## Updating The CLI checks for updates once per hour. To update a Homebrew install, run: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} brew update && brew upgrade keenable-cli ``` If you installed with an installer script, run `keenable update` instead. ## Proxies and corporate networks The CLI trusts its bundled root certificates and your operating system's certificate store, so a company root CA installed on the machine works without setup. If your network inspects TLS and the CA isn't in the system store, point `SSL_CERT_FILE` at a PEM bundle that contains it: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} export SSL_CERT_FILE=/path/to/company-ca.pem ``` `SSL_CERT_DIR` works too. When either is set, the CLI uses it instead of the system store and keeps its bundled roots. If the file is missing or isn't valid PEM, every command stops with `Invalid SSL_CERT_FILE: : `. To send requests through a proxy, set `HTTPS_PROXY` or `ALL_PROXY`. Put a proxy login in the URL. Hosts in `NO_PROXY` are reached directly, and lowercase names work too. Without these variables, the CLI uses the macOS or Windows system proxy settings. PAC files aren't supported. ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} export HTTPS_PROXY=http://user:password@proxy.example.com:8080 ``` Changes to these variables take effect on the next command. When a request fails on the network, the error says why and suggests a fix. In YAML output, it adds `cause` and `hint`: ```yaml theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} error: Request failed message: error sending request for url (https://api.keenable.ai/v1/search/public) cause: 'client error (Connect) → invalid peer certificate: UnknownIssuer' hint: The server's certificate isn't trusted. If you're behind a TLS-inspecting proxy, set SSL_CERT_FILE to your company's CA bundle (PEM), or add that CA to your OS certificate store. ``` Add `-v` (`--verbose`) to any command to see the proxy in use, the certificate sources the CLI loaded and the full error chain: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} keenable search "rust async patterns" -p -v ``` ## API base URL To send the CLI's API calls to another address, such as a local gateway, set `KEENABLE_API_URL` to its base URL. Without it, the CLI calls `https://api.keenable.ai`. This command sends a search to a gateway on port 8080: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} KEENABLE_API_URL=http://127.0.0.1:8080 keenable search "rust async" ``` The CLI sends the search to `http://127.0.0.1:8080/v1/search`, or to `/v1/search/public` if no API key is set. The value must follow these rules: * It starts with `https://`. Plain `http://` works only for `localhost`, `127.0.0.1` and `::1`. * It has no query string and no fragment. * It has no user name or password. * The CLI keeps a path prefix. With `https://gateway.example.com/keenable`, searches go to `https://gateway.example.com/keenable/v1/search`. * The CLI removes trailing slashes. Search, fetch, `login` and the API key check in `configure-mcp` all use this URL. `configure-mcp` still writes the production MCP URL, `https://api.keenable.ai/mcp`, into your clients. The [SDKs](/sdks#configuration) read the same variable. If the value breaks a rule, the command exits with code `1` before it sends a request. This is the YAML output for `KEENABLE_API_URL=http://example.com keenable search "rust async"`: ```yaml theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} error: Invalid KEENABLE_API_URL message: KEENABLE_API_URL must be an https:// URL (http is allowed only for localhost, 127.0.0.1 and ::1), got "http://example.com" hint: Fix KEENABLE_API_URL or unset it to use https://api.keenable.ai. ``` With `-p`, and for `login` and `configure-mcp`, the CLI prints the same message and hint to stderr. ### Saved keys and other base URLs The CLI sends a saved API key only to the base URL it was saved for. `keenable login` saves the key with the current `KEENABLE_API_URL`, or with `https://api.keenable.ai` when the variable isn't set. A search or fetch against any other base URL stops with exit code `1` and sends nothing, so a `KEENABLE_API_URL` set by a project's environment can't send your key to another host: ```yaml theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} error: Stored API key not used message: The stored API key was saved for https://api.keenable.ai and is not sent to http://127.0.0.1:8080. hint: Pass a key for http://127.0.0.1:8080 with KEENABLE_API_KEY or --api-key, or run `keenable login` with KEENABLE_API_URL set to save one for it. Unset KEENABLE_API_URL to use https://api.keenable.ai. ``` To use a gateway, pass its key with `KEENABLE_API_KEY` or `--api-key`, or run `keenable login` with `KEENABLE_API_URL` set. The CLI follows a redirect only to the same scheme, host and port. A redirect to another host, or from `https` to `http`, fails with exit code `7`, and the API key isn't sent. ## Related pages > [card] [Connect your agent (MCP)](/mcp-server) > > Connect the Keenable MCP server to Claude Code, Cursor, Codex and other clients for web search and fetch with no key. Sign in for higher limits and Monitors. > [card] [Claude](/integrations/claude) > > Add Keenable to Claude and Claude Code, and keep Claude's own web search from competing with it. > [card] [Quickstart](/index) > > Give your agent web search in under two minutes, with no account or API key. Paste one prompt into your coding agent, or install the SDK and search. > [card] [Keyless access](/guides/keyless-access) > > How to call search and fetch with no API key: the /public paths, the X-Keenable-Title header, /mcp-public, and the 1,000 per hour keyless limit per IP. # Keenable cookbook: recipes and guides for web search Source: https://docs.keenable.ai/cookbook Recipes and guides for building on Keenable. Search by topic, filter by product, and open a runnable example for search, fetch, monitors and SELECT. Runnable examples for building on Keenable. A recipe builds one complete app, from the first call to the production notes. A guide solves one task, such as filtering by date or capping page size. Every entry has code in several languages and a real response. Most run with no API key. | Entry | Type | What you get | Products | | - | - | - | - | | [RAG with fresh web results](/recipes/rag-with-fresh-web-results) | Recipe | Retrieve pages published in the last 30 days, render them as numbered sources and prompt your model to answer with citations. Runs with no API key. | Search | | [Research loop](/recipes/research-loop) | Recipe | Research a broad question with search and fetch: run focused searches at once, merge results without duplicate URLs, read the top pages with a size cap. | Search, Fetch | | [Fact-check with citations](/recipes/fact-check-with-citations) | Recipe | Check a claim against the pages that discuss it: search, then fetch each page with a prompt that returns a verdict and the quoted sentence, per URL. | Search, Fetch | | [News monitor to Slack](/recipes/news-monitor-to-slack) | Recipe | Post each new page a Keenable monitor finds to Slack: verify the monitor.result.found webhook, then forward the title, link and summary to an incoming webhook. | Monitors | | [Competitor watch](/recipes/competitor-watch) | Recipe | Watch a competitor's own domains with a Keenable monitor and get a weekday 9:00 digest of new pages, summarized in your own JSON Schema. | Monitors | | [Enrich a list with SELECT](/recipes/enrich-a-list-with-select) | Recipe | Add web facts to every item in a list with one SELECT query: one search per item, fields extracted by an LLM, one row per item with its source count. | SELECT | | [Agent pays with x402](/recipes/agent-pays-with-x402) | Recipe | Give an agent web search and fetch with no account or API key: it pays each call in USDC on Base over x402, and your client refuses offers above a cap. | Search, Fetch, Pay per request | | [Search, then fetch](/guides/search-then-fetch) | Guide | How to answer from search snippets first, fetch a page only when a snippet falls short, ask fetch for only the part you need, and when to set live=true. | Search, Fetch | | [Ground answers with citations](/guides/ground-answers-with-citations) | Guide | How to turn search results into a numbered source block with to_context(), ask the model to cite \[n], and map citations back to URLs with cited(). | Search | | [Docs lookup for coding agents](/guides/docs-lookup-for-coding-agents) | Guide | How to give a coding agent current library docs and changelogs: connect the MCP server, add an AGENTS.md rule, search one docs site, fetch with a prompt. | Search, Fetch | | [Filter by date](/guides/filter-by-date) | Guide | How to keep search results inside a date window with published_after and published_before, relative offsets such as 7d, and the acquired filters. | Search | | [Filter by domain](/guides/filter-by-domain) | Guide | How to search one site with site, leave hosts out with exclude_domains, and combine both, with the entry rules and the 400 invalid_filter fix. | Search | | [Search operators](/guides/search-operators) | Guide | How to put quoted phrases, site:, OR, - and parentheses in a query, when to use them instead of the site and exclude_domains parameters, and the 400 fix. | Search | | [Choose a search mode](/guides/choose-a-search-mode) | Guide | How to pick pro for deeper retrieval or realtime for the fastest response, set the mode in each client, and check which mode served a call. | Search | | [Result size](/guides/result-size) | Guide | How to set max_results (1 to 50) and snippet_max_length (180 to 10,000) so search results fit your context, and when to send disable_cards for web pages only. | Search | | [Fetch with a prompt](/guides/fetch-with-prompt) | Guide | How to pass a prompt to fetch so content holds only the facts you asked for, write prompts that return parseable output, and handle the 2,000-character limit. | Fetch | | [Live fetch](/guides/live-fetch) | Guide | How to set live=true so fetch reads a page from its source instead of the indexed copy, when that's worth it, and how a live read is billed as fetch.live. | Fetch | | [Long pages](/guides/long-pages) | Guide | How to cap fetch output with max_chars, read truncated and total_chars to see what was cut, and switch to a prompt when a page runs past 50,000 characters. | Fetch | | [Create a monitor](/guides/create-a-monitor) | Guide | How to create a Keenable monitor: write the topic, limit it to the sites you trust, set a cron schedule, tag it with metadata and retry safely. | Monitors | | [Read monitor results](/guides/read-monitor-results) | Guide | How to read the pages a Keenable monitor found: poll new results since your last read, read each run's digest, or let your agent read them over MCP. | Monitors | | [Monitor webhooks](/guides/monitor-webhooks) | Guide | Get each new monitor result at your endpoint: subscribe to monitor.result.found, verify the Standard Webhooks signature, test locally, debug failed deliveries. | Monitors | | [Keyless access](/guides/keyless-access) | Guide | How to call search and fetch with no API key: the /public paths, the X-Keenable-Title header, /mcp-public, and the 1,000 per hour keyless limit per IP. | Search, Fetch | | [High-volume research](/guides/high-volume-research) | Guide | How to run many searches and fetches in parallel: cap calls in flight, retry a 429 after Retry-After, group a run with a session ID, and raise your limit. | Search, Fetch | | [Cost at volume](/guides/cost-at-volume) | Guide | How to estimate a monthly Keenable bill: add searches and fetches, subtract 100,000 free requests, multiply by \$4 per 1,000, then check it with usage.credits. | Search, Fetch | | [Evaluate search APIs](/guides/evaluate-search-apis) | Guide | Compare web search APIs fairly: build a gold set, run the same queries with equal settings, judge results blind and avoid the pitfalls that skew scores. | Search | ## Build with your coding agent Every recipe starts with a **Recipe prompt** that points your coding agent at the Markdown version of the page, so the agent reads the same steps and limits you do. Paste it into Claude Code, Cursor, Codex or any agent that can read a URL. The [recipes overview](/recipes) explains which recipes need an API key. ## Related pages * [Recipes](/recipes): the complete apps, with when each one runs. * [All guides](/guides): how-to guides for search and fetch, with the parameters each covers. * [Best practices](/best-practices): query writing, parallel searches and context size. # Keenable crawlers Source: https://docs.keenable.ai/crawlers The KeenableBot and Keenable-User user agents, the published IP lists to verify them, and the robots.txt rules to allow or block KeenableBot. If you run a website, this page tells you how to recognize requests from Keenable in your logs, check that they are real, and allow or block them. Keenable.ai, Inc. identifies its requests with two user-agent tokens. Both point to the public crawler page at [keenable.ai/bot ↗](https://keenable.ai/bot), which is the reference for site owners. ## User agents | Token | What it is used for | | - | - | | `KeenableBot` | Crawling. KeenableBot collects publicly available pages to build and maintain the Keenable search index. It also fetches your `robots.txt`. | | `Keenable-User` | A request made on behalf of a person, or an agent acting for one, who asked for a specific page. For example, a [Fetch](/products/fetch) call that reads the page live. Keenable-User does not crawl the web automatically. | KeenableBot sends this `User-Agent` header: ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; KeenableBot/1.0; +https://keenable.ai/bot) ``` Keenable-User sends this `User-Agent` header: ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Keenable-User/1.0; +https://keenable.ai/bot) ``` Match on the token, `KeenableBot` or `Keenable-User`, not on the full string. ## Verify a request Anyone can copy a user-agent header, so check the source address as well. Requests that carry a Keenable token come from a fixed set of IP addresses. Keenable publishes one list per token as JSON, in the same format as Googlebot's list: | Token | IP list | | - | - | | `KeenableBot` | `https://app.keenable.ai/bot/keenablebot.json` | | `Keenable-User` | `https://app.keenable.ai/bot/keenable-user.json` | This command downloads the list for Keenable-User: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -s https://app.keenable.ai/bot/keenable-user.json ``` You get a `creationTime` and a `prefixes` array. Each entry holds one `ipv4Prefix` in CIDR notation: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "creationTime": "2026-10-09T12:04:36.000000", "prefixes": [ { "ipv4Prefix": "34.31.116.125/32" }, { "ipv4Prefix": "34.31.229.240/32" } ] } ``` The output above is trimmed. If a request names a Keenable token and its source address is not in that token's list, the request is not from Keenable. Download the lists again on a schedule, because the addresses can change. > [!NOTE] > > Keenable requests don't carry HTTP Message Signatures (Web Bot Auth) yet, so verify by IP address. Each token already has a key directory, at `https://keenablebot.keenable.ai/.well-known/http-message-signatures-directory` and `https://keenable-user.keenable.ai/.well-known/http-message-signatures-directory`. ## Allow or block KeenableBot KeenableBot follows the Robots Exclusion Protocol (RFC 9309). Use the `KeenableBot` token in your `robots.txt`. The match is not case-sensitive. If a group names `KeenableBot`, KeenableBot uses that group and ignores the `User-agent: *` group. This rule blocks KeenableBot from your whole site: ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} User-agent: KeenableBot Disallow: / ``` Keenable stops indexing your site, so your pages no longer appear in Keenable search results. This rule keeps KeenableBot out of one directory and allows the rest: ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} User-agent: KeenableBot Disallow: /private/ ``` To allow KeenableBot on a site that blocks other crawlers, add a `KeenableBot` group with `Allow: /`. A new rule takes effect after KeenableBot next fetches your `robots.txt`. ## Block at your server or firewall To refuse either agent at your web server, firewall or CDN, match the token in the `User-Agent` header, the addresses in that token's IP list, or both. To allow Keenable through a bot filter, allowlist the same addresses. ## What Keenable does with crawled pages Keenable builds a search index from the pages KeenableBot collects. The index answers queries from AI agents and applications through [Search](/products/search) and [Fetch](/products/fetch). Results link to the source page. ## Contact Email [abuse@keenable.ai](mailto:abuse@keenable.ai) to report excessive load, ask for a lower crawl rate, request removal of specific content, or report a crawler that claims to be Keenable. Include the hostname, the timestamps and the source addresses so Keenable can tell you whether the traffic is its own. # Balance and usage Source: https://docs.keenable.ai/credits The free allowance of 100,000 requests a month, your prepaid dollar balance after that, how each response reports its cost, and what happens when it runs out. [Rate limits](/rate-limits) cap how *fast* you can call the API. Your balance caps how *much*. Every organization gets a free monthly allowance, then pays from a prepaid dollar balance at \$4 per 1,000 requests. ## Monthly allowance With an API key, your organization gets 100,000 requests a month free, worth \$400 at \$4 per 1,000. The allowance resets each month. To keep going once you've used it, top up your balance on the [Billing page](https://app.keenable.ai/console/billing?tab=add): pick a package or type any amount from \$5 to \$999,999.99, the most Stripe takes in one payment. The console also shows how much of the allowance and the balance you have left. To check prices, balance and this month's usage from code, call [`GET /v1/billing`](/api-reference/billing) or the MCP tool [`get_billing`](/mcp-server#get_billing), both in beta. Plans are on [Keenable pricing](https://keenable.ai/pricing). To estimate a month's cost from your search and fetch volume, see [Cost at volume](/guides/cost-at-volume). The allowance is counted in requests because a search and a fetch each cost the same at standard prices. If your organization has its own prices, read what each call cost from the response rather than counting calls. If you don't send an API key, Keenable doesn't charge your requests. The [request limits](/rate-limits) cap them, so evaluating without a key doesn't use the allowance. [Pay-per-request](/pay-per-request) calls don't use it either: you pay for each one in USDC as you make it. ## What a call costs Each call is billed under a SKU that names what ran. At standard prices, every SKU costs \$4 per 1,000 calls. See [Pricing](/pricing#what-each-call-costs). | SKU | Operation | | - | - | | `search.realtime` | A search served in `realtime` mode | | `search.pro` | A search served in `pro` mode | | `fetch` | A fetch of Keenable's indexed copy of a page | | `fetch.live` | A fetch made live from the source: with [`live=true`](/api-reference/fetch), or when Keenable has no indexed copy of the page | The [Time Machine](/api-reference/time-machine) endpoints, in Early Access, bill under `search.time_machine` and `fetch.time_machine`. Prices can be set per organization, so read what a call actually cost from the response rather than assuming a flat rate. The search mode decides the SKU. Over HTTP, pass [`mode`](/api-reference/search#request) on `/v1/search`. Over MCP, an integrator can pin the mode with [`_meta["keenable/overrides"]`](/mcp-server#operator-overrides-request-_meta). If neither is set, the search runs in `pro` mode, unless your organization has a different default. The response includes the mode that served the call. ## Reading usage per call Every billed call reports what it cost. The API counts cost in credits: 1 credit is \$0.004, so \$1 is 250 credits and a call at \$4 per 1,000 costs 1 credit. Over HTTP, a `/v1/search` or `/v1/fetch` response ends with a `usage` object: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} "usage": { "sku": "search.pro", "amount": 1, "credits": 1, "paid": true, "credits_remaining": 99120 } ``` Over MCP, every authenticated tool call reports the same object under `_meta["keenable/usage"]`, alongside the result rather than inside the model-visible `content`: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "content": [{ "type": "text", "text": "..." }], "_meta": { "keenable/usage": { "sku": "search.realtime", "amount": 1, "credits": 1, "paid": true, "credits_remaining": 99120 } } } ``` `credits` is what the call cost. Multiply it by \$0.004 to get dollars. `paid` shows where the cost came from: `false` for the free monthly allowance, `true` for your prepaid balance. Attribute cost per call from this object. `credits_remaining` is what your organization has left after the call: the unused free allowance plus your prepaid balance. In the example, 99,120 credits are \$396.48. Watch it to see the balance running out before calls start failing with `402`. It's an estimate that can lag your other calls by a few seconds, and it's left out if the balance couldn't be read. With `-p`, the [CLI](/cli) shows it as `Credits left`. See [Metadata for integrators](/mcp-server#metadata-for-integrators) for the full field list. Calls that cost nothing report no usage: keyless calls, [x402](/pay-per-request) and ZeroClick calls, and failed calls, which are never billed. ## Low-credit email When your organization has used 80% of its monthly free allowance, meaning what it has left (unused allowance plus prepaid balance) drops to 20% of the allowance or below, Keenable emails its admins. With the standard allowance of 100,000 requests, that's at 20,000 requests, or \$80, left. The email gives what's left in credits of \$0.004 each and the date the allowance resets, and links to Billing in the console to top up or turn on auto top-up. It goes out at most once per billing period. Organizations with [auto top-up](/auto-top-up) turned on don't get it while auto top-up can still refill the balance, and do once it has reached its monthly limit. ## When credits run out If you've used the allowance and your prepaid balance is used up, `/v1/search` and `/v1/fetch` return [`402`](/errors#402) with the code `insufficient_credits`. The body links to the billing page in `billing_url`. Top up in the [console](https://app.keenable.ai/console) to resume, or wait for the allowance to reset. To avoid the `402`, turn on [auto top-up](/auto-top-up). It adds to your balance whenever it runs low. # Data and privacy Source: https://docs.keenable.ai/data-privacy What Keenable logs from your search and fetch requests, how long the policies let it keep data, how zero data retention works, and who to contact. Keenable logs and stores the content of search and fetch requests: the search query, any search `objective`, the fetched URL, any fetch prompt, and the results. This applies to keyless requests and to accounts on the default data policy. Don't send secrets or personal data in a query, an objective, a URL or a prompt. For how Keenable handles API keys and applies zero data retention to an organization, see [Security and privacy](/security). ## What each request log holds Every search and fetch request on the default data policy is logged, whether or not you send an API key. | Field | Logged | Notes | | - | - | - | | Search query | Yes | The `query` you send to search. | | Search `objective` | Yes, except under zero data retention | The `objective` you send to search. | | Fetched URL and `prompt` | Yes | The `url` and any `prompt` you send to fetch. | | Results | Yes | The search results or the fetched content. | | IP address and user agent | Yes | For keyed and keyless requests alike. | | `X-Keenable-Title` | If you send it | The keyless `/public` paths require it. See [Try it without a key](/authentication#try-it-without-a-key). | | Request ID | Yes | The value the response returns in `X-Request-Id`. | | Organization and key ID | If you send an API key | The ID of the key, not the key itself. | SELECT also stores the output of each query as a result set that later queries can read. See [Result sets](/select#result-sets). ## Retention The Privacy Policy and the Terms of Service set no fixed retention period for request logs. [Retention and use](/security#retention-and-use) on the security page says what each document allows for personal information and for the content you send. ## Zero data retention Zero data retention (ZDR) is an Enterprise data policy that Keenable sets for an organization. It follows the organization that owns the API key, so a keyless `/public` request isn't under it. [Zero data retention](/security#zero-data-retention) on the security page covers how the policy applies and the `400` errors it returns. To ask for it, see [Request other data terms](#request-other-data-terms). ### Check which policy applies to a key Fetch a page with a `prompt`. A ZDR organization doesn't allow fetching with a prompt: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -sS "https://api.keenable.ai/v1/fetch?url=https://example.com&prompt=Summarize+this+page" \ -H "X-API-Key: $KEENABLE_API_KEY" ``` | Result | Policy | | - | - | | `400` with `"code": "zdr_prompt_unsupported"` | Zero data retention. Nothing is billed. | | `200`, and `content` holds the answer to the prompt | The default policy. The call is billed as one fetch (see [Pricing](/pricing)) and logged like any other request. | To confirm your policy without a billed request, email [support@keenable.ai](mailto:support@keenable.ai) and name your organization. ## Policies * The [Privacy Policy](https://keenable.ai/privacy) covers the personal information Keenable collects about you, such as your account and how you use the service, and how long Keenable keeps it. * The [Terms of Service](https://keenable.ai/terms) cover your use of the API, the CLI, the SDKs and the MCP server. If you're a business customer, the Privacy Policy doesn't cover the data Keenable processes on your behalf. To ask how Keenable handles that data, see [Request other data terms](#request-other-data-terms). ## Request other data terms To ask about different data handling for your organization, including zero data retention, open [Talk to us](https://app.keenable.ai/console/talk-to-us) in the console and choose **Zero data retention**, use the [contact form](https://keenable.ai/contact), or email [support@keenable.ai](mailto:support@keenable.ai). For privacy questions, email [privacy@keenable.ai](mailto:privacy@keenable.ai). Include the `X-Request-Id` value from a response when your question is about a specific request. # Make Keenable your agent's default web tool Source: https://docs.keenable.ai/default-web-tool Turn off WebSearch and WebFetch in Claude Code, Codex, Cursor and OpenCode so your agent always searches with Keenable. Routing rule, check and undo. Make Keenable the only web search your agent has, and in most clients the only page fetch too, so every lookup goes through the Keenable MCP server. Claude Code, Codex, Cursor and OpenCode each ship their own web tools. If both sets are on, the agent picks between them from one call to the next. Set this up after you add the [MCP server](/mcp-server) to your client. Then turn off the client's own tools, and add a routing rule that names the Keenable tools. ## What changes in each client The [Keenable CLI](/cli) turns off the built-in tools in Claude Code and OpenCode for you. In Codex and Cursor, you change one setting yourself. | Client | Built-in tools | How to turn them off | Done by `keenable configure-mcp` | | - | - | - | - | | Claude Code | `WebSearch`, `WebFetch` | Add both to `permissions.deny` in `~/.claude/settings.json` | Yes | | OpenCode | `websearch` | Set `permission.websearch` to `"deny"` in `~/.config/opencode/opencode.json`. OpenCode's own `webfetch` stays on. | Yes | | Codex | Web search | Set the top-level key `web_search = "disabled"` in `~/.codex/config.toml` | No. It adds the MCP entry only. | | Cursor | Web Search, Web Fetch | Turn both off in Cursor's settings | No. It prints a reminder to turn them off. | ## Turn off the built-in tools with the CLI This command adds Keenable to Claude Code and OpenCode and turns off their built-in web tools. `--yes` skips the confirmation prompt: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} keenable configure-mcp --claude-code --opencode --yes ``` For Claude Code, the CLI adds `WebSearch` and `WebFetch` to `permissions.deny` in `~/.claude/settings.json`. It also removes them from the allow lists in the `.claude/settings.local.json` files it finds in `~/dev`, `~/projects`, `~/src`, `~/repos`, `~/work` and `~/code`, up to three folders deep, and in your home directory. For OpenCode, it sets `permission.websearch` to `"deny"`. To include every client the CLI detects, use `--all` instead of the client flags. See [MCP setup in the CLI](/cli#mcp-setup) for the file each client flag edits. ## Turn off the built-in tools by hand Pick your client: > [tab] Claude Code > > Add both tools to the `deny` list in `~/.claude/settings.json`. If the file already has a `permissions` block, add the two names to its `deny` list instead of adding a second block: > > ```json ~/.claude/settings.json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} > { > "permissions": { > "deny": ["WebSearch", "WebFetch"] > } > } > ``` > > To turn them off for one session without editing the file, start Claude Code like this: > > ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} > claude --disallowedTools WebSearch WebFetch > ``` > > See [Claude](/integrations/claude#turn-off-the-built-in-search) for more on the Claude apps. > [tab] Codex > > Add `web_search = "disabled"` to `~/.codex/config.toml`, above the `[mcp_servers.keenable]` line. It's a top-level key. Below a table header, it belongs to that table and Codex ignores it: > > ```toml ~/.codex/config.toml theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} > web_search = "disabled" > > [mcp_servers.keenable] > url = "https://api.keenable.ai/mcp" > http_headers = { "X-API-Key" = "keen_" } > ``` > > See [Codex](/integrations/codex#turn-off-the-built-in-search) for the other modes and a per-profile setup. > [tab] Cursor > > Open **Cursor Settings → Agents → Context and Tools** and turn off Web Search and Web Fetch. The labels can move between Cursor releases. The toggles also apply to subagents. > > See [Cursor](/integrations/cursor#turn-off-the-built-in-search) for how to check the setting in a chat. > [tab] OpenCode > > Set `permission.websearch` to `"deny"` in `~/.config/opencode/opencode.json`, next to your Keenable `mcp` entry: > > ```json ~/.config/opencode/opencode.json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} > { > "permission": { > "websearch": "deny" > } > } > ``` ## Add a routing rule A routing rule names the Keenable tools in your agent's instructions. It helps when an agent loads tool details only once it decides a tool is relevant, as Codex does, and when you keep the built-in tools on. Put the rule in `CLAUDE.md` for Claude Code, or in `AGENTS.md` for Codex and Cursor, at the root of your repository: ```markdown AGENTS.md theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} ## Web search - Use `search_web_pages` for anything that needs the web. - Follow a search with `fetch_page_content` to read the sources you cite. - Don't use the built-in web search or web fetch tools. ``` If you use the [OpenCode plugin](/integrations/opencode) instead of the MCP server, its tools are `keenable_search` and `keenable_fetch`. Name those in the rule. ## Check the setup Run `keenable configure-mcp` with no flags. It lists each detected client and flags any problem, such as `Standard tools (WebSearch, WebFetch) not disabled`: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} keenable configure-mcp ``` In Claude Code, this command prints the deny list from your settings: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} jq '.permissions.deny' ~/.claude/settings.json ``` You see `"WebSearch"` and `"WebFetch"` in the list. Then start a new chat and ask a question that needs the web. The agent calls `search_web_pages` without being told to. ## Undo the change `keenable reset` removes the Keenable MCP entry and turns the built-in tools back on. In Claude Code, it removes only the deny entries that `configure-mcp` added, so entries you wrote yourself stay. If an older CLI made the change, reset can't tell which entries it added and removes both `WebSearch` and `WebFetch`: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} keenable reset --claude-code --opencode --yes ``` To turn the built-in tools back on and keep Keenable, undo the setting by hand instead: | Client | Undo | | - | - | | Claude Code | Delete `WebSearch` and `WebFetch` from `permissions.deny` in `~/.claude/settings.json` | | OpenCode | Delete `websearch` from `permission` in `~/.config/opencode/opencode.json` | | Codex | Delete the `web_search = "disabled"` line from `~/.codex/config.toml` | | Cursor | Turn Web Search and Web Fetch back on in Cursor's settings | # Keenable API errors Source: https://docs.keenable.ai/errors Look up any Keenable API error by status or code: the cause, whether a retry helps, and the fix. Covers the error body, error types and SDK error classes. Find any error the Keenable API returns, what caused it and the exact fix. Each section has a stable anchor, so SDK error messages and agents can link straight to it. | Status | Error | Retry? | | - | - | - | | [`400`](#400-invalid-request) | Invalid request parameters | Fix, then retry | | [`400`](#400-missing-app-identifier) | Missing app identifier | Fix, then retry | | [`401`](#401-missing-key) | Missing key | Fix, then retry | | [`401`](#401-malformed-key) | Malformed key | Fix, then retry | | [`401`](#401-invalid-key) | Invalid key | Fix, then retry | | [`401`](#401-invalid-token) | Invalid bearer token | Fix, then retry | | [`402`](#402) | Out of funds | Do not retry | | [`403`](#403) | Key rejected or revoked | Do not retry; check the key, then ask a human | | [`403`](#403-time-machine-not-enabled) | Time Machine not enabled | Do not retry; drop `as_of` or ask a human | | [`404`](#404) | Page not found | Fix the URL, then retry | | [`405`](#405) | Wrong HTTP method | Fix the method, then retry | | [`422`](#422) | Content could not be extracted | Fix the URL or skip; do not retry the same URL | | [`429`](#429) | Rate limit exceeded | Wait, then retry | | [`5xx`](#5xx) | Server error | Retry up to 3 times | Over HTTP, an error body is JSON with an `error` and a `message` field. The SDKs raise an error whose message starts with the prefix shown under each entry, followed by the API's `message`. Each SDK page lists its error classes and whether the SDK retries each one: [TypeScript](/sdks/typescript#errors), [Python](/sdks/python#errors), [Go](/sdks/go#errors) and [Rust](/sdks/rust#errors). ## Troubleshooting Start from what you see. Each row names the usual cause and the fix, and links the full entry. | What you see | Usual cause | Fix | | - | - | - | | `400` `Missing app identifier` on a call without a key | The keyless `/public` paths need your app's name | Send an `X-Keenable-Title` header. See [400 Missing app identifier](#400-missing-app-identifier). | | `401` from `/v1/search` or `/v1/fetch` | No key, or the key isn't in the `X-API-Key` header | Send the key in `X-API-Key`, or call the `/public` paths without one. See [401 Missing key](#401-missing-key). | | `405` from an endpoint | The path doesn't take that method, such as a `GET` to `/v1/time-machine/fetch` | Resend the request with a method that the response's `Allow` header lists. See [405](#405). | | `429` with `public_rate_limit_hourly` | The keyless 1,000 requests per hour for your IP address are used up | Send an [API key](/api-keys), or wait until `limit.resets_at`. See [429](#429). | | `429` with `rate_limit_per_second` | Your organization sent more than its per-second limit | Wait the seconds in `Retry-After`, then retry with fewer calls in parallel. See [Production checklist](/production#stay-under-your-rate-limit). | | `402` with `insufficient_credits` | The monthly allowance and the prepaid balance are used up | Stop and ask a human to top up. Don't retry. See [402](#402). | | `403` with `Feature not enabled` | [Time Machine](/api-reference/time-machine) isn't turned on for your organization | Drop `as_of` and call search or fetch, or ask Keenable to turn it on. See [403 Time Machine not enabled](#403-time-machine-not-enabled). | | Fetch returns an older version of a page | Fetch returned Keenable's indexed copy | Pass `live=true`. See [Live fetch](/guides/live-fetch). | | `5xx` or timeouts | A failure on Keenable's side or at the target page | Check [status.keenable.ai](https://status.keenable.ai), then retry up to 3 times. See [5xx](#5xx). | | Your agent answers from its own web search, not Keenable | The client's built-in web search is still on | See [Make Keenable the default web tool](/default-web-tool). | ## Error body Every error from the `/v1` endpoints, including their `/public` and `/v1/x402` twins, is one flat JSON object. Branch on `type` for the broad handling and on `code` for the specific case, never on the text of `error` or `message`. New codes may be added, so handle an unknown `code` by its `type`, or by its HTTP status if `type` is missing. This `429` shows the fields an agent acts on: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "error": "Rate limit exceeded", "type": "rate_limit_error", "code": "rate_limit_per_second", "message": "Too many requests: your organization is limited to 10 requests per second. Wait until 2026-11-06T12:00:01.000Z (1s), then retry. For a higher limit, upgrade at https://app.keenable.ai/console/billing?tab=limits.", "fix": "Wait until 2026-11-06T12:00:01.000Z (1s), then retry. Keep under 10 requests per second, shared by all your organization's keys. For a higher limit, upgrade at https://app.keenable.ai/console/billing?tab=limits.", "docs_url": "https://docs.keenable.ai/errors#rate-limit-per-second", "request_id": "0196f0c2-7a51-7c3e-9b0e-2f4d8a1c5e77", "retryable": true, "retry_after_seconds": 1, "retryAfter": 1, "limit": { "scope": "organization", "window": "second", "max": 10, "resets_at": "2026-11-06T12:00:01.000Z" } } ``` The response also carries a `Retry-After: 1` header. The fields sit at the top level, not nested under an `error` object as in Stripe's API, because released clients read `error` and `message` as top-level strings. Which fields appear depends on the error: | Field | When it's set | What it means | | - | - | - | | `error` | Every error | Short error title, such as `Rate limit exceeded`. Kept unchanged for existing clients. | | `type` | With `code` | The category of the error, one of the seven [error types](#error-types). | | `code` | Every error on the endpoints above | Stable machine code in `snake_case`. Codes are only added, never renamed. The [error codes](#error-codes) list every value. | | `message` | Most errors | What went wrong, in words. The wording may change, so don't parse it. | | `fix` | With `code` | What to do next, including whether retrying helps. | | `param` | On validation errors | The parameter or header that failed, such as `url` or `X-Keenable-Title`. | | `docs_url` | With `code` | The section of this page for the code: `https://docs.keenable.ai/errors#` followed by the code with `_` replaced by `-`, such as `#rate-limit-per-second`. The name is `docs_url`, not Stripe's `doc_url`. | | `request_id` | Whenever one is known | The same value as the `X-Request-Id` header. Include it when you [report a problem](#report-a-problem). | | `retryable` | With `code` | `true` if the same request can succeed when sent again unchanged. `false` means change the request or follow `fix`. | | `retry_after_seconds` | On errors where `retryable` is `true` | Seconds to wait before retrying. The `Retry-After` header carries the same value. | | `retryAfter` | On `429`s from Keenable's own rate limits | Older name for `retry_after_seconds`, kept for existing clients. | | `allowed` | On `unknown_parameter` | The parameters the endpoint accepts. | | `did_you_mean` | On `unknown_parameter`, when a name is close to a supported one | Maps each such name to the parameter to rename it to, such as `{"count": "max_results"}`. | | `field`, `value`, `reason` | On a rejected `exclude_domains`, where `error` is `invalid_filter` | The filter, the entry or limit it rejected, and why. See [Exclude domains](/api-reference/search#rejected-entries). | | `details` | On `invalid_request` | Each field that failed schema validation. | | `limit` | On `429`s from Keenable's own rate limits | Which limit you hit: `scope` (`organization`, `user`, `ip`, `payer` or `agent`), `window` (`second`, `minute` or `hour`), `max` requests per window, and `resets_at`, when you can send the next request. | | `billing_url` | On `insufficient_credits` | Where to top up your balance. | | `auto_top_up_url` | On `insufficient_credits` | How to turn on [auto top-up](/auto-top-up). | | `pay_per_request` | On `insufficient_credits`, where pay-per-request is enabled | The [x402](/pay-per-request) alternative, which needs no key or balance. | | `api_keys_url` | On authentication errors and `payment_required` | Where to create or copy an API key. | | `keyless` | On `401` and `credentials_forbidden` errors from `/v1/search` and `/v1/fetch` | The keyless `/public` alternative. | No error body echoes your API key or your request body. ## Error types `type` is one of a closed set of seven values. The type belongs to the code, not to the HTTP status: `target_blocked` and `credentials_forbidden` are both `403`, but the first is a `target_error` and the second a `permission_error`. | Type | Statuses | What it means | What to do | | - | - | - | - | | [`invalid_request_error`](#invalid-request-error) | `400`, `404`, `405`, `406`, `409`, `413`, `415`, `422` | The request is wrong. | Correct it as `fix` says, then retry. | | [`authentication_error`](#authentication-error) | `401` | Credentials are missing, malformed or not accepted. | Send a valid API key. | | [`permission_error`](#permission-error) | `400`, `403` | The credentials are valid but not allowed, for example a revoked key or a private URL. | Don't retry. Follow `fix`, or ask a human. | | [`billing_error`](#billing-error) | `402`, `451` | Out of funds, or a pay-per-request payment is needed or failed. | Don't retry unchanged. Top up or pay. | | [`rate_limit_error`](#rate-limit-error) | `400`, `429` | Too many requests, to your limit or to a Keenable service. | Wait `retry_after_seconds`, then retry. | | [`target_error`](#target-error) | [Fetch target codes](#fetch-target-codes) | The page being fetched failed, not Keenable. | Retry if `retryable`, otherwise fetch another source. | | [`api_error`](#api-error) | `422`, `5xx`, `529` | Something failed on Keenable's side. | Retry with backoff, then [report it](#report-a-problem). | ## Retry rules Decide whether to retry from the response's `retryable` field, not from the status. On the MCP endpoint it's `error.data.retryable` in the JSON-RPC error. A `5xx` can be final, such as `select_timeout`, and a `4xx` can be worth repeating, such as `domain_record_missing`. The tables under [Error codes](#error-codes) show the usual value for each code. | Response | What to do | | - | - | | `"retryable": true` | Wait `retry_after_seconds`, then send the same request again. The `Retry-After` header carries the same value. | | `"retryable": false` | Don't send the same request again. Change it or act as `fix` says. | | No `retryable` field | Retry `408`, `429`, any `5xx` and connection failures, waiting longer before each attempt. Don't retry any other `4xx`, except the device login polls in the next row. This covers a non-JSON body, such as an error page from a proxy in front of the API. | | `authorization_pending` or `slow_down` | These device login answers follow RFC 8628 and have no `retryable` field. The tables mark them Poll. Keep polling every `interval` seconds, and use the new, longer `interval` after `slow_down`. See [Device login](/authentication#device-login). | Sending the same request again can repeat a write that already went through. For a monitor create, send an `Idempotency-Key` and reuse it on the retry, so a create that went through isn't made twice. See [Create a monitor](/products/monitors#create-a-monitor). A [pay-per-request](/pay-per-request) call needs a new signature for each attempt, so after a connection failure a retry can pay a second time if the first payment settled. See [What is charged](/pay-per-request#what-is-charged). Every error with `"retryable": true` carries `retry_after_seconds` and a matching `Retry-After` header. When `fix` names a number of attempts, such as once or up to 3 times, stop after that many and [report it](#report-a-problem). Some waits are long: after `public_rate_limit_hourly`, `Retry-After` can be up to an hour. The [SDKs](/sdks) retry for you, up to 2 times by default. Monitor `update`, `pause`, `resume`, `trigger` and `bulk` are retried only after a `429`. They wait `Retry-After` when the API sends it, and otherwise back off from 0.5 seconds, doubling up to 8 seconds, with jitter. A `Retry-After` over 60 seconds isn't waited out: the SDK raises the error at once. Set `max_retries` (Python), `maxRetries` (TypeScript), `MaxRetries` (Go) or `max_retries` (Rust) to change the count, or to `0` to turn retries off. ## Error codes The tables list every code by [type](#error-types), with its status, whether a retry helps and its usual `error`. After them, each code has its own section, with what happened and the fix. The section's anchor is the code with `_` replaced by `-`, which is where `docs_url` points. The `fix` in a response can be more specific than the text here, for example naming the parameter that failed. The `error` shown is the usual title for the code. A few paths send an older one, such as `Missing authentication` for `missing_api_key`. Device login polls put the RFC 8628 string in `error` instead, such as `expired_token` for `device_code_expired`. The status sections after the codes, such as [402 Out of funds](#402), show full example bodies and the SDK errors. Older `docs_url` values link to those sections, so their anchors stay. ### `invalid_request_error` The request is wrong. 43 codes, 1 retryable. | Code | Status | Retryable | `error` | | - | - | - | - | | [`authorization_pending`](#authorization-pending) | `400` | Poll | authorization_pending | | [`device_code_already_used`](#device-code-already-used) | `400` | No | Device code already used | | [`device_code_client_mismatch`](#device-code-client-mismatch) | `400` | No | Wrong client for this code | | [`device_code_expired`](#device-code-expired) | `400` | No | Device code expired | | [`invalid_json`](#invalid-json) | `400` | No | Invalid JSON | | [`invalid_parameter`](#invalid-parameter) | `400` | No | Invalid parameter | | [`invalid_request`](#invalid-request) | `400` | No | Invalid request | | [`mcp_message_too_complex`](#mcp-message-too-complex) | `400` | No | MCP message too complex | | [`missing_app_title`](#missing-app-title) | `400` | No | Missing app identifier | | [`missing_parameter`](#missing-parameter) | `400` | No | Missing required parameter | | [`monitor_option_not_supported`](#monitor-option-not-supported) | `400` | No | Monitor option not supported | | [`query_rejected`](#query-rejected) | `400` | No | Query refused | | [`search_rejected_upstream`](#search-rejected-upstream) | `400` | No | Search refused | | [`select_query_failed`](#select-query-failed) | `400` | No | SELECT query failed | | [`select_query_invalid`](#select-query-invalid) | `400` | No | Invalid SELECT query | | [`unknown_parameter`](#unknown-parameter) | `400` | No | Bad request | | [`unknown_tool`](#unknown-tool) | `400` | No | Unknown tool | | [`unsupported_grant_type`](#unsupported-grant-type) | `400` | No | Unsupported grant type | | [`user_code_used`](#user-code-used) | `400` | No | Login code already used | | [`zdr_prompt_unsupported`](#zdr-prompt-unsupported) | `400` | No | zdr_prompt_unsupported | | [`zdr_unsupported_profile`](#zdr-unsupported-profile) | `400` | No | zdr_unsupported_profile | | [`card_expired`](#card-expired) | `404` | No | Card expired | | [`card_not_found`](#card-not-found) | `404` | No | Card not found | | [`internal_route_not_public`](#internal-route-not-public) | `404` | No | Not a public path | | [`invalid_or_expired_promo_code`](#invalid-or-expired-promo-code) | `404` | No | Unknown promo code | | [`not_found`](#not-found) | `404` | No | Not found | | [`route_not_found`](#route-not-found) | `404` | No | No such endpoint | | [`user_code_not_found`](#user-code-not-found) | `404` | No | Login code not found | | [`version_not_found`](#version-not-found) | `404` | No | No stored version | | [`method_not_allowed`](#method-not-allowed) | `405` | No | Method not allowed | | [`mcp_not_acceptable`](#mcp-not-acceptable) | `406` | No | Accept header not supported | | [`domain_taken`](#domain-taken) | `409` | No | Domain already verified | | [`idempotency_conflict`](#idempotency-conflict) | `409` | No | Idempotency key reused | | [`last_admin`](#last-admin) | `409` | No | Last admin | | [`no_active_organization`](#no-active-organization) | `409` | No | No active organization | | [`remove_self`](#remove-self) | `409` | No | Cannot remove yourself | | [`request_rejected`](#request-rejected) | `409` | No | Request rejected | | [`run_in_progress`](#run-in-progress) | `409` | No | Monitor run in progress | | [`endpoint_moved`](#endpoint-moved) | `410` | No | Endpoint moved | | [`request_too_large`](#request-too-large) | `413` | No | Request body too large | | [`unsupported_content_encoding`](#unsupported-content-encoding) | `415` | No | Unsupported body encoding | | [`domain_record_missing`](#domain-record-missing) | `422` | Yes | Verification record not found | | [`unprocessable`](#unprocessable) | `422` | No | Unprocessable entity | ### `authentication_error` Credentials are missing, malformed or not accepted. 15 codes, 0 retryable. | Code | Status | Retryable | `error` | | - | - | - | - | | [`api_key_required`](#api-key-required) | `401` | No | API key required | | [`invalid_api_key`](#invalid-api-key) | `401` | No | Authentication failed | | [`invalid_authorization_header`](#invalid-authorization-header) | `401` | No | Malformed Authorization header | | [`invalid_bearer_token`](#invalid-bearer-token) | `401` | No | Authentication failed | | [`invalid_session_token`](#invalid-session-token) | `401` | No | Session not accepted | | [`missing_api_key`](#missing-api-key) | `401` | No | Missing API key | | [`missing_session_token`](#missing-session-token) | `401` | No | Sign-in required | | [`sign_in_required`](#sign-in-required) | `401` | No | Sign-in required | | [`unauthenticated`](#unauthenticated) | `401` | No | Authentication required | | [`zeroclick_request_id_missing`](#zeroclick-request-id-missing) | `401` | No | ZeroClick request id missing | | [`zeroclick_signature_expired`](#zeroclick-signature-expired) | `401` | No | ZeroClick signature expired | | [`zeroclick_signature_invalid`](#zeroclick-signature-invalid) | `401` | No | ZeroClick signature invalid | | [`zeroclick_signature_malformed`](#zeroclick-signature-malformed) | `401` | No | ZeroClick signature malformed | | [`zeroclick_signature_missing`](#zeroclick-signature-missing) | `401` | No | ZeroClick signature missing | | [`zeroclick_signing_key_unknown`](#zeroclick-signing-key-unknown) | `401` | No | ZeroClick signing key unknown | ### `permission_error` The credentials are valid but not allowed. 17 codes, 0 retryable. | Code | Status | Retryable | `error` | | - | - | - | - | | [`device_code_denied`](#device-code-denied) | `400` | No | Login declined | | [`admin_required`](#admin-required) | `403` | No | Admin required | | [`company_email_required`](#company-email-required) | `403` | No | Company address required | | [`credentials_forbidden`](#credentials-forbidden) | `403` | No | Forbidden | | [`forbidden`](#forbidden) | `403` | No | Forbidden | | [`mcp_host_not_allowed`](#mcp-host-not-allowed) | `403` | No | Host not allowed | | [`mcp_origin_not_allowed`](#mcp-origin-not-allowed) | `403` | No | Origin not allowed | | [`member_roles_not_enabled`](#member-roles-not-enabled) | `403` | No | Roles not enabled | | [`mode_requires_api_key`](#mode-requires-api-key) | `403` | No | Mode needs an API key | | [`monitor_limit_reached`](#monitor-limit-reached) | `403` | No | Active monitor limit reached | | [`monitors_not_enabled`](#monitors-not-enabled) | `403` | No | Monitors not enabled | | [`private_url_not_allowed`](#private-url-not-allowed) | `403` | No | Forbidden | | [`promo_card_required`](#promo-card-required) | `403` | No | Card required | | [`promo_card_reused`](#promo-card-reused) | `403` | No | Card already used | | [`promo_code_not_active`](#promo-code-not-active) | `403` | No | Promo code not active | | [`promo_new_accounts_only`](#promo-new-accounts-only) | `403` | No | Promo code is for new accounts | | [`time_machine_not_enabled`](#time-machine-not-enabled) | `403` | No | Time Machine not enabled | ### `billing_error` Out of funds, or a pay-per-request payment is needed or failed. 6 codes, 0 retryable. | Code | Status | Retryable | `error` | | - | - | - | - | | [`insufficient_credits`](#insufficient-credits) | `402` | No | Insufficient credits | | [`payment_rejected`](#payment-rejected) | `402` | No | Payment rejected | | [`payment_required`](#payment-required) | `402` | No | Payment required | | [`payment_settlement_failed`](#payment-settlement-failed) | `402` | No | Payment settlement failed | | [`zeroclick_allowance_denied`](#zeroclick-allowance-denied) | `402` | No | ZeroClick allowance denied | | [`payments_region_unavailable`](#payments-region-unavailable) | `451` | No | Unavailable for legal reasons | ### `rate_limit_error` Too many requests, to your limit or to a Keenable service. 11 codes, 9 retryable. | Code | Status | Retryable | `error` | | - | - | - | - | | [`slow_down`](#slow-down) | `400` | Poll | slow_down | | [`fetch_rate_limited`](#fetch-rate-limited) | `429` | Yes | Rate limit exceeded | | [`paid_rate_limit_per_second`](#paid-rate-limit-per-second) | `429` | Yes | Rate limit exceeded | | [`public_domain_requires_api_key`](#public-domain-requires-api-key) | `429` | No | API key required for this site | | [`public_rate_limit_domain`](#public-rate-limit-domain) | `429` | Yes | Rate limit exceeded | | [`public_rate_limit_hourly`](#public-rate-limit-hourly) | `429` | Yes | Rate limit exceeded | | [`public_rate_limit_per_second`](#public-rate-limit-per-second) | `429` | Yes | Rate limit exceeded | | [`rate_limit_per_second`](#rate-limit-per-second) | `429` | Yes | Rate limit exceeded | | [`rate_limited`](#rate-limited) | `429` | Yes | Rate limit exceeded | | [`search_rate_limited`](#search-rate-limited) | `429` | Yes | Rate limit exceeded | | [`select_concurrency_limited`](#select-concurrency-limited) | `429` | Yes | Too many queries running | ### `target_error` The page being fetched failed, not Keenable. 9 codes, 3 retryable. | Code | Status | Retryable | `error` | | - | - | - | - | | [`target_blocked`](#target-blocked) | `403` | No | Upstream forbidden | | [`page_not_found`](#page-not-found) | `404` | No | Not found | | [`content_not_extracted`](#content-not-extracted) | `422` | No | Unprocessable entity | | [`target_http_error`](#target-http-error) | `422` | No | Unprocessable entity | | [`target_paywalled`](#target-paywalled) | `422` | No | Unprocessable entity | | [`target_wrong_page`](#target-wrong-page) | `422` | No | Unprocessable entity | | [`target_rate_limited`](#target-rate-limited) | `429` | Yes | Rate limit exceeded | | [`target_unreachable`](#target-unreachable) | `502` | Yes | Bad gateway | | [`target_timeout`](#target-timeout) | `504` | Yes | Gateway timeout | ### `api_error` Something failed on Keenable's side. 25 codes, 20 retryable. | Code | Status | Retryable | `error` | | - | - | - | - | | [`dns_lookup_failed`](#dns-lookup-failed) | `422` | Yes | DNS lookup failed | | [`search_failed_upstream`](#search-failed-upstream) | `422` | Yes | Search failed | | [`auth_internal_error`](#auth-internal-error) | `500` | Yes | Authentication service error | | [`balance_check_unavailable`](#balance-check-unavailable) | `500` | Yes | Balance check failed | | [`billing_account_not_found`](#billing-account-not-found) | `500` | No | Billing record missing | | [`card_too_large`](#card-too-large) | `500` | No | Card too large | | [`fetch_mode_unavailable`](#fetch-mode-unavailable) | `500` | Yes | Fetch mode unavailable | | [`fetcher_unavailable`](#fetcher-unavailable) | `500` | Yes | Fetcher unavailable | | [`internal_error`](#internal-error) | `500` | Yes | Internal server error | | [`search_upstream_error`](#search-upstream-error) | `500` | Yes | Search backend failed | | [`payment_facilitator_error`](#payment-facilitator-error) | `502` | Yes | Bad gateway | | [`payment_verification_unavailable`](#payment-verification-unavailable) | `502` | Yes | Payment verification failed | | [`select_disabled`](#select-disabled) | `502` | No | SELECT switched off | | [`select_internal_error`](#select-internal-error) | `502` | Yes | SELECT failed | | [`select_timeout`](#select-timeout) | `502` | No | SELECT timed out | | [`select_unavailable`](#select-unavailable) | `502` | Yes | SELECT unavailable | | [`allowance_unavailable`](#allowance-unavailable) | `503` | Yes | Allowance check unavailable | | [`auth_unavailable`](#auth-unavailable) | `503` | Yes | Authentication temporarily unavailable | | [`card_storage_unavailable`](#card-storage-unavailable) | `503` | Yes | Card storage unavailable | | [`device_login_unavailable`](#device-login-unavailable) | `503` | Yes | Device login unavailable | | [`monitors_unavailable`](#monitors-unavailable) | `503` | Yes | Monitors temporarily unavailable | | [`payments_unavailable`](#payments-unavailable) | `503` | Yes | Payments temporarily unavailable | | [`service_not_configured`](#service-not-configured) | `503` | No | Not configured | | [`time_machine_versions_unavailable`](#time-machine-versions-unavailable) | `503` | Yes | Time Machine versions unavailable | | [`search_overloaded`](#search-overloaded) | `529` | Yes | Overloaded | ### Authentication codes Missing, malformed, unknown or revoked credentials. #### `admin_required` * **Status:** `403` * **Type:** [`permission_error`](#error-types) * **`error`:** `Admin required` * **Retryable:** No * **What happened:** Only an admin of this organization can do this; the caller is a member. * **How to fix:** Only an admin of this organization can do this, and this account is a member. Ask an admin (Team page in the console) to do it or to make this account an admin. Retrying from this account returns the same 403. #### `api_key_required` * **Status:** `401` * **Type:** [`authentication_error`](#error-types) * **`error`:** `API key required` * **Retryable:** No * **What happened:** This endpoint takes a Keenable API key, and the request sent only a session token. * **How to fix:** This endpoint takes a Keenable API key, not a console session token. Send the key in the X-API-Key header and retry. Create one at [https://app.keenable.ai/console/api-keys](https://app.keenable.ai/console/api-keys). #### `auth_unavailable` * **Status:** `503` * **Type:** [`api_error`](#error-types) * **`error`:** `Authentication temporarily unavailable` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** Keenable could not check the credentials just now. * **How to fix:** Keenable could not check your credentials just now; the key itself may be fine. Wait for Retry-After and retry the same request. * **More:** [5xx Server error](#5xx) #### `company_email_required` * **Status:** `403` * **Type:** [`permission_error`](#error-types) * **`error`:** `Company address required` * **Retryable:** No * **What happened:** Only an account signed up with a company email address can verify its domain. * **How to fix:** Domain verification needs an account signed up with a company email address (not a personal mailbox such as gmail.com). Ask a colleague who signed up with the company address to verify it. Retrying from this account returns the same 403. #### `credentials_forbidden` * **Status:** `403` * **Type:** [`permission_error`](#error-types) * **`error`:** `Forbidden` * **Retryable:** No * **What happened:** The credentials were recognized but are not allowed, usually because the key was revoked. * **How to fix:** The credentials were recognized but are not allowed, usually because the key was revoked. Retrying with them will not help: create a new key at [https://app.keenable.ai/console/api-keys](https://app.keenable.ai/console/api-keys), or ask a human with console access to create one for you. * **More:** [403 Key rejected or revoked](#403) #### `device_code_denied` * **Status:** `400` * **Type:** [`permission_error`](#error-types) * **`error`:** `Login declined` * **Retryable:** No * **What happened:** The user declined this device login. * **How to fix:** Ask the user whether to try again before you request a new code. #### `invalid_api_key` * **Status:** `401` * **Type:** [`authentication_error`](#error-types) * **`error`:** `Authentication failed` * **Retryable:** No * **What happened:** The API key is malformed, unknown or expired. * **How to fix:** The API key was not accepted. Copy the full key from [https://app.keenable.ai/console/api-keys](https://app.keenable.ai/console/api-keys), or create a new one there, and retry with it in the X-API-Key header. * **More:** [401 Invalid key](#401-invalid-key) #### `invalid_authorization_header` * **Status:** `401` * **Type:** [`authentication_error`](#error-types) * **`error`:** `Malformed Authorization header` * **Retryable:** No * **What happened:** The Authorization header is present but is not "Bearer \". * **How to fix:** Send the credential as "Authorization: Bearer \", or send a Keenable API key in the X-API-Key header (create one at [https://app.keenable.ai/console/api-keys](https://app.keenable.ai/console/api-keys)), and retry. #### `invalid_bearer_token` * **Status:** `401` * **Type:** [`authentication_error`](#error-types) * **`error`:** `Authentication failed` * **Retryable:** No * **What happened:** The bearer token is malformed or expired. * **How to fix:** The bearer token was not accepted. Sign in again for a fresh token, or send a Keenable API key from [https://app.keenable.ai/console/api-keys](https://app.keenable.ai/console/api-keys) in the X-API-Key header. * **More:** [401 Invalid token](#401-invalid-token) #### `invalid_session_token` * **Status:** `401` * **Type:** [`authentication_error`](#error-types) * **`error`:** `Session not accepted` * **Retryable:** No * **What happened:** The session token on a console endpoint is malformed, unknown or expired. * **How to fix:** The session token was not accepted. Sign in again at [https://app.keenable.ai/console](https://app.keenable.ai/console) for a fresh token and retry. API keys do not work on console endpoints. #### `mcp_host_not_allowed` * **Status:** `403` * **Type:** [`permission_error`](#error-types) * **`error`:** `Host not allowed` * **Retryable:** No * **What happened:** The MCP request carried a Host header this server does not answer for. * **How to fix:** Connect to the MCP server at its public address (for example [https://api.keenable.ai/mcp](https://api.keenable.ai/mcp)) so the Host header matches, and retry. #### `mcp_origin_not_allowed` * **Status:** `403` * **Type:** [`permission_error`](#error-types) * **`error`:** `Origin not allowed` * **Retryable:** No * **What happened:** The MCP request came from a browser Origin that is not allowed, or carried several Origin headers. * **How to fix:** Call the MCP server from an MCP client or a server, not from a web page on another origin, and send at most one Origin header. #### `member_roles_not_enabled` * **Status:** `403` * **Type:** [`permission_error`](#error-types) * **`error`:** `Roles not enabled` * **Retryable:** No * **What happened:** Admin and member roles are not turned on for this organization. * **How to fix:** Admin and member roles are not turned on for this organization, so everyone in it can already do everything. Contact us to turn them on. #### `missing_api_key` * **Status:** `401` * **Type:** [`authentication_error`](#error-types) * **`error`:** `Missing API key` * **Retryable:** No * **What happened:** The request carried no API key or bearer token. * **How to fix:** Send your Keenable API key in the X-API-Key header (or as "Authorization: Bearer \") and retry. Create a key at [https://app.keenable.ai/console/api-keys](https://app.keenable.ai/console/api-keys). * **More:** [401 Missing key](#401-missing-key) #### `missing_session_token` * **Status:** `401` * **Type:** [`authentication_error`](#error-types) * **`error`:** `Sign-in required` * **Retryable:** No * **What happened:** A console endpoint was called without a signed-in session token. * **How to fix:** This console endpoint needs a signed-in session: send the session access token as "Authorization: Bearer \". API keys do not work here; sign in at [https://app.keenable.ai/console](https://app.keenable.ai/console) for a token. #### `mode_requires_api_key` * **Status:** `403` * **Type:** [`permission_error`](#error-types) * **`error`:** `Mode needs an API key` * **Retryable:** No * **What happened:** The requested search mode works only with an API key or a signed-in user. * **How to fix:** This search mode works only with an API key. Send a key in the X-API-Key header (create one at [https://app.keenable.ai/console/api-keys](https://app.keenable.ai/console/api-keys)) on /v1/search, or drop "mode" (or set it to "pro" or "realtime") and retry. #### `monitor_limit_reached` * **Status:** `403` * **Type:** [`permission_error`](#error-types) * **`error`:** `Active monitor limit reached` * **Retryable:** No * **What happened:** The organization already has the most active monitors it may have. * **How to fix:** The organization already has the most active monitors it may have; the message gives the limit. Pause or delete a monitor (PATCH status "paused", or DELETE), then retry. #### `monitors_not_enabled` * **Status:** `403` * **Type:** [`permission_error`](#error-types) * **`error`:** `Monitors not enabled` * **Retryable:** No * **What happened:** Monitors is turned off for this organization. * **How to fix:** Monitors is turned off for this organization. Contact [support@keenable.ai](mailto:support@keenable.ai) to turn it on. Retrying returns the same 403. #### `promo_card_required` * **Status:** `403` * **Type:** [`permission_error`](#error-types) * **`error`:** `Card required` * **Retryable:** No * **What happened:** The promo code needs a card on file; details.checkoutUrl is where to save one. * **How to fix:** Save a card at details.checkoutUrl. The credits are added once the card is saved, and nothing is charged. #### `promo_card_reused` * **Status:** `403` * **Type:** [`permission_error`](#error-types) * **`error`:** `Card already used` * **Retryable:** No * **What happened:** The card on file already redeemed this promo code. * **How to fix:** Each card can redeem a promo code once, to stop credit farming. Save a card that has not redeemed this code, then retry. #### `promo_code_not_active` * **Status:** `403` * **Type:** [`permission_error`](#error-types) * **`error`:** `Promo code not active` * **Retryable:** No * **What happened:** The promo code exists but is outside the dates it can be redeemed. * **How to fix:** This promo code can only be redeemed within its dates, and now is outside them; "message" says whether it is not active yet or has expired. Retrying now returns the same 403. #### `promo_new_accounts_only` * **Status:** `403` * **Type:** [`permission_error`](#error-types) * **`error`:** `Promo code is for new accounts` * **Retryable:** No * **What happened:** The promo code works only on accounts created in the last 24 hours. * **How to fix:** This code works only on accounts created in the last 24 hours, and this account is older. Retrying gives the same answer. #### `sign_in_required` * **Status:** `401` * **Type:** [`authentication_error`](#error-types) * **`error`:** `Sign-in required` * **Retryable:** No * **What happened:** This MCP endpoint, or the WebQL mode requested on it, needs a signed-in user or an API key. * **How to fix:** Connect with OAuth sign-in, or send a Keenable API key in the X-API-Key header (create one at [https://app.keenable.ai/console/api-keys](https://app.keenable.ai/console/api-keys)), and retry. Keyless MCP works on the default endpoint without WebQL mode. #### `time_machine_not_enabled` * **Status:** `403` * **Type:** [`permission_error`](#error-types) * **`error`:** `Time Machine not enabled` * **Retryable:** No * **What happened:** The request called a Time Machine endpoint, which is not enabled for the organization. * **How to fix:** Time Machine is not enabled for your organization, so retrying returns the same 403. To use it, contact Keenable support at [support@keenable.ai](mailto:support@keenable.ai) and ask them to enable Time Machine for your organization; include the request_id from this response. For current results meanwhile, drop as_of and send the request to /v1/search or /v1/fetch. #### `zeroclick_request_id_missing` * **Status:** `401` * **Type:** [`authentication_error`](#error-types) * **`error`:** `ZeroClick request id missing` * **Retryable:** No * **What happened:** A signed ZeroClick call has no zc-request-id header. * **How to fix:** Send the zc-request-id that ZeroClick issued for this call, include it in the signature, and resend. #### `zeroclick_signature_expired` * **Status:** `401` * **Type:** [`authentication_error`](#error-types) * **`error`:** `ZeroClick signature expired` * **Retryable:** No * **What happened:** The zc-signature timestamp is too far from the server clock. * **How to fix:** Sign the request again with the current time and resend it. If it repeats, the signer's clock is off: sync it with NTP. #### `zeroclick_signature_invalid` * **Status:** `401` * **Type:** [`authentication_error`](#error-types) * **`error`:** `ZeroClick signature invalid` * **Retryable:** No * **What happened:** The zc-signature does not match the request that was sent. * **How to fix:** Sign the exact method, path, body, request id and agent id you send, and resend. A proxy that rewrites the path or the body breaks the signature. #### `zeroclick_signature_malformed` * **Status:** `401` * **Type:** [`authentication_error`](#error-types) * **`error`:** `ZeroClick signature malformed` * **Retryable:** No * **What happened:** The zc-signature header does not parse as t=\,kid=\,v1=\<64 hex>. * **How to fix:** ZeroClick builds this header. Rebuild it as t=\,kid=\,v1=\<64 lowercase hex>, or, if you called through ZeroClick, report it to ZeroClick with the request_id. #### `zeroclick_signature_missing` * **Status:** `401` * **Type:** [`authentication_error`](#error-types) * **`error`:** `ZeroClick signature missing` * **Retryable:** No * **What happened:** A ZeroClick path was called without the zc-signature header. * **How to fix:** This path accepts only calls that ZeroClick signs and forwards. Buy and call it through ZeroClick; to pay per request with a wallet use /v1/x402/\*, or use an API key ([https://app.keenable.ai/console/api-keys](https://app.keenable.ai/console/api-keys)) on /v1/search and /v1/fetch. #### `zeroclick_signing_key_unknown` * **Status:** `401` * **Type:** [`authentication_error`](#error-types) * **`error`:** `ZeroClick signing key unknown` * **Retryable:** No * **What happened:** The zc-signature names a key id Keenable does not hold. * **How to fix:** Sign with a current ZeroClick signing key. After a key rotation, ask Keenable to load the new key, then retry. ### Validation codes The request itself is wrong. Correct it as `fix` says; sending it again unchanged returns the same error. #### `authorization_pending` * **Status:** `400` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `authorization_pending` * **Retryable:** Poll again after `interval` seconds. The body has no `retryable` field. * **What happened:** The user has not approved this device login yet; "interval" is how long to wait before polling again. * **How to fix:** Poll again after the number of seconds in "interval". Keep showing the user the user_code and verification_uri. #### `card_expired` * **Status:** `404` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Card expired` * **Retryable:** No * **What happened:** The card at this address has expired and was deleted. * **How to fix:** The card expired and is gone for good, so retrying returns the same 404. Run the search again for a fresh card. #### `card_not_found` * **Status:** `404` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Card not found` * **Retryable:** No * **What happened:** No card exists at this address. * **How to fix:** No card exists at this address. Check that the link is complete and copied exactly. Retrying the same link returns the same 404. #### `device_code_already_used` * **Status:** `400` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Device code already used` * **Retryable:** No * **What happened:** The device code was already exchanged for an API key; each code works once. * **How to fix:** Use the API key from the first successful poll. If you lost it, revoke it in the console and request a new code with POST /v1/auth/agent/code. #### `device_code_client_mismatch` * **Status:** `400` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Wrong client for this code` * **Retryable:** No * **What happened:** The device code was issued to a different client_id. * **How to fix:** Poll with the same client_id you sent to POST /v1/auth/agent/code. #### `device_code_expired` * **Status:** `400` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Device code expired` * **Retryable:** No * **What happened:** The device code expired or was never issued. * **How to fix:** Request a new code with POST /v1/auth/agent/code and show the user the new user_code. #### `domain_record_missing` * **Status:** `422` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Verification record not found` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The domain does not publish the Keenable verification TXT record yet. * **How to fix:** Publish the TXT record named in "message" on the domain, wait for Retry-After (DNS changes can take a few minutes to show up), then verify again. #### `domain_taken` * **Status:** `409` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Domain already verified` * **Retryable:** No * **What happened:** Another Keenable organization already verified this domain. * **How to fix:** Another Keenable organization already verified this domain, so this one cannot. Ask a colleague to invite you to that organization, or contact us with the request_id if the domain is yours. #### `endpoint_moved` * **Status:** `410` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Endpoint moved` * **Retryable:** No * **What happened:** This endpoint was removed after its sunset date; the message and the Link header name the one that replaces it. * **How to fix:** This endpoint was removed, so retrying returns the same 410. Send the request to the endpoint named in the message and the Link header, with the field changes the message lists. See [https://docs.keenable.ai/api-reference](https://docs.keenable.ai/api-reference). #### `idempotency_conflict` * **Status:** `409` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Idempotency key reused` * **Retryable:** No * **What happened:** The Idempotency-Key was already used with a different request body. * **How to fix:** This Idempotency-Key was already used with a different request body. Send a new key for a new request, or resend the original body to get the original result. #### `internal_route_not_public` * **Status:** `404` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Not a public path` * **Retryable:** No * **What happened:** Paths under /internal/ are not served on the public API; the load balancer answers this itself. * **How to fix:** Use the public API under /v1 instead. #### `invalid_json` * **Status:** `400` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Invalid JSON` * **Retryable:** No * **What happened:** The request body is not valid JSON. * **How to fix:** The request body could not be parsed as JSON. Send a valid JSON object with Content-Type: application/json (check quoting and trailing commas), or send the parameters in the query string, and retry. #### `invalid_or_expired_promo_code` * **Status:** `404` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Unknown promo code` * **Retryable:** No * **What happened:** No promo code with this name exists. * **How to fix:** Check the spelling with whoever gave you the code. Retrying the same code returns the same 404. #### `invalid_parameter` * **Status:** `400` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Invalid parameter` * **Retryable:** No * **What happened:** A parameter has a value the endpoint does not accept; "param" names it. * **How to fix:** Correct the parameter named in "param" and retry; the API reference lists the values it accepts. * **More:** [400 Invalid request parameters](#400-invalid-request) #### `invalid_request` * **Status:** `400` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Invalid request` * **Retryable:** No * **What happened:** The request did not match the schema, or was rejected as invalid. * **How to fix:** Read "message" for what to change, and "details", when present, for each field that failed; correct the request and retry. * **More:** [400 Invalid request parameters](#400-invalid-request) #### `last_admin` * **Status:** `409` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Last admin` * **Retryable:** No * **What happened:** The change would leave the organization without an admin. * **How to fix:** An organization always keeps at least one admin, and this change would remove the last one. Make someone else an admin first, then retry. #### `mcp_message_too_complex` * **Status:** `400` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `MCP message too complex` * **Retryable:** No * **What happened:** The JSON-RPC message nests too deeply, has too many values or an array that is too long. * **How to fix:** Send a smaller JSON-RPC message: at most 64 levels deep, 50,000 values and 1,000 items per array. #### `mcp_not_acceptable` * **Status:** `406` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Accept header not supported` * **Retryable:** No * **What happened:** The MCP request did not accept both application/json and text/event-stream. * **How to fix:** Send the header "Accept: application/json, text/event-stream" (the Streamable HTTP transport needs both) and retry. #### `method_not_allowed` * **Status:** `405` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Method not allowed` * **Retryable:** No * **What happened:** The path exists but does not accept this HTTP method; the Allow header and "allowed" list the ones it does. * **How to fix:** Send the request again with one of the methods listed in "allowed" (also in the Allow header). #### `missing_app_title` * **Status:** `400` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Missing app identifier` * **Retryable:** No * **What happened:** A keyless request did not name its app. * **How to fix:** Name your app in the X-Keenable-Title header (or the keenable_title query parameter) and retry. With an API key, call /v1/search or /v1/fetch instead, which do not need it. * **More:** [400 Missing app identifier](#400-missing-app-identifier) #### `missing_parameter` * **Status:** `400` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Missing required parameter` * **Retryable:** No * **What happened:** A required parameter is missing; "param" names it. * **How to fix:** Send the parameter named in "param"; it is required. Then retry. * **More:** [400 Invalid request parameters](#400-invalid-request) #### `monitor_option_not_supported` * **Status:** `400` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Monitor option not supported` * **Retryable:** No * **What happened:** The monitor request uses an option Monitors does not offer yet; the message names it. * **How to fix:** The monitor request uses an option Monitors does not offer yet: read "message" for its name, remove it and retry. Retrying unchanged returns the same 400. #### `no_active_organization` * **Status:** `409` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `No active organization` * **Retryable:** No * **What happened:** The signed-in account has no active organization to bill. * **How to fix:** This account is signed in but has no active organization, so there is nothing to bill. Create or join an organization at [https://app.keenable.ai/console](https://app.keenable.ai/console), or call with an API key, then retry. #### `query_rejected` * **Status:** `400` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Query refused` * **Retryable:** No * **What happened:** The query broke a traffic rule; "message" says which. * **How to fix:** Read "message" for the limit the query broke, change the query and retry. Sending it unchanged returns the same 400. #### `remove_self` * **Status:** `409` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Cannot remove yourself` * **Retryable:** No * **What happened:** An admin tried to remove their own account from the organization. * **How to fix:** An admin cannot remove their own account. Ask another admin to remove it. #### `request_too_large` * **Status:** `413` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Request body too large` * **Retryable:** No * **What happened:** The JSON request body is larger than the server accepts. * **How to fix:** The JSON request body is larger than the server accepts. Send only the documented parameters, with a shorter query, and retry. * **More:** [400 Invalid request parameters](#400-invalid-request) #### `route_not_found` * **Status:** `404` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `No such endpoint` * **Retryable:** No * **What happened:** No endpoint is served at this path. * **How to fix:** No endpoint is served at this path. Check the path against the API reference at [https://docs.keenable.ai/api-reference](https://docs.keenable.ai/api-reference) (for example /v1/search or /v1/fetch) and retry. #### `run_in_progress` * **Status:** `409` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Monitor run in progress` * **Retryable:** No * **What happened:** The monitor is already running, so the request was not applied: a triggered run was not started, or a new page.url was not saved. * **How to fix:** The monitor is already running. Wait for its current run to finish (GET /v1/monitors/\{id}/runs shows it), then send the same request again: trigger it again, or resend the update with the new page.url. Retrying while it runs returns the same 409. #### `search_rejected_upstream` * **Status:** `400` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Search refused` * **Retryable:** No * **What happened:** The search backend refused the request; "message" carries its reason. * **How to fix:** Our search backend refused this request; "message" has its reason. Change the query or the filter it names and retry. Sending it unchanged returns the same 400; if the query looks valid, report it with the request_id. #### `select_query_failed` * **Status:** `400` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `SELECT query failed` * **Retryable:** No * **What happened:** The query is valid but failed while it ran; "message" has the reason. * **How to fix:** Nothing was charged. The query failed while it ran (see "message"). Change it, for example narrow WEB_SEARCH or simplify the extraction, using [https://select.keenable.ai/guide.md](https://select.keenable.ai/guide.md), then send it again. #### `select_query_invalid` * **Status:** `400` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Invalid SELECT query` * **Retryable:** No * **What happened:** SELECT refused the query as invalid; "message" has its reason. * **How to fix:** Nothing was charged. Fix the query using "message" and the guide at [https://select.keenable.ai/guide.md](https://select.keenable.ai/guide.md), then send it again. Retrying it unchanged returns the same 400. #### `unknown_parameter` * **Status:** `400` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Bad request` * **Retryable:** No * **What happened:** The request has a parameter the endpoint does not know; "allowed" lists the ones it does, and "did_you_mean" maps a name that is close to a supported parameter to that parameter. * **How to fix:** Remove the unknown parameter, or rename it to one of the parameters listed in "allowed", and retry. * **More:** [400 Invalid request parameters](#400-invalid-request) #### `unknown_tool` * **Status:** `400` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Unknown tool` * **Retryable:** No * **What happened:** The MCP tools/call named a tool this server does not have. * **How to fix:** Call tools/list for the tools this server offers, and call one of them by its exact name. #### `unsupported_content_encoding` * **Status:** `415` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Unsupported body encoding` * **Retryable:** No * **What happened:** The request body uses a Content-Encoding or charset the server does not read. * **How to fix:** Send the JSON body in UTF-8, uncompressed or with gzip, deflate or br Content-Encoding, and retry. #### `unsupported_grant_type` * **Status:** `400` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Unsupported grant type` * **Retryable:** No * **What happened:** The device login poll named a grant_type other than the device code grant. * **How to fix:** Send grant_type=urn:ietf:params:oauth:grant-type:device_code with your device_code and client_id. #### `user_code_not_found` * **Status:** `404` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Login code not found` * **Retryable:** No * **What happened:** No pending login matches this user_code; it may be mistyped or expired. * **How to fix:** Check the code shown by the agent or CLI. If it still fails, run `keenable login` again or ask the agent for a new code. #### `user_code_used` * **Status:** `400` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Login code already used` * **Retryable:** No * **What happened:** This login was already approved. * **How to fix:** This login was already approved, so the agent or CLI already has its key. To log in again, run `keenable login` again or ask the agent for a new code. #### `version_not_found` * **Status:** `404` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `No stored version` * **Retryable:** No * **What happened:** Time Machine has no copy of this page at or before as_of (fetch), or between from and to (versions). * **How to fix:** No copy of this page was captured in the time you asked for. On POST /v1/time-machine/fetch and POST /v1/time-machine/versions this is not an HTTP error: it arrives as that page's result, with status not_captured, inside a 200 response. For fetch, try a later as_of; for versions, widen from and to. Also check the URL: http\:// and https\:// are looked up as different URLs. Retrying the same request returns the same result. The deprecated GET /v1/time_machine/fetch returns it as a 404; there, try a later query_time. #### `zdr_prompt_unsupported` * **Status:** `400` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `zdr_prompt_unsupported` * **Retryable:** No * **What happened:** The zero data retention policy does not allow fetching with a prompt. * **How to fix:** This request runs under a zero data retention policy, which does not allow fetching with a prompt. Remove the prompt parameter. Retrying the same request returns the same 400. * **More:** [400 Invalid request parameters](#400-invalid-request) #### `zdr_unsupported_profile` * **Status:** `400` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `zdr_unsupported_profile` * **Retryable:** No * **What happened:** The zero data retention policy does not allow the data sources this request needs. * **How to fix:** This request runs under a zero data retention policy, which does not allow the data sources it needs. Retrying the same request returns the same 400. * **More:** [400 Invalid request parameters](#400-invalid-request) ### Credits and payment codes Credits for keyed requests, and payments on the [pay-per-request](/pay-per-request) paths. #### `insufficient_credits` * **Status:** `402` * **Type:** [`billing_error`](#error-types) * **`error`:** `Insufficient credits` * **Retryable:** No * **What happened:** This month's free requests and the purchased credits are used up. * **How to fix:** Retrying returns the same 402 until credits are added. Ask a human with console access to buy credits at the URL in this response's billing_url field (the Billing page of the Keenable console), and to turn on auto top-up there so the balance refills itself ([https://docs.keenable.ai/auto-top-up.md](https://docs.keenable.ai/auto-top-up.md)). * **More:** [402 Out of credits](#402) #### `payment_facilitator_error` * **Status:** `502` * **Type:** [`api_error`](#error-types) * **`error`:** `Bad gateway` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The x402 payment facilitator failed while settling. * **How to fix:** The x402 facilitator failed while settling, so nothing was returned. Wait a few seconds and retry with a new payment. * **More:** [Pay per request errors](/pay-per-request#errors) #### `payment_rejected` * **Status:** `402` * **Type:** [`billing_error`](#error-types) * **`error`:** `Payment rejected` * **Retryable:** No * **What happened:** A PAYMENT-SIGNATURE was sent but the payment was not accepted; "reason" says why. * **How to fix:** Nothing was charged. Read "reason", then sign one of the "accepts" offers exactly as given (scheme, network, asset, amount and payTo) with a funded wallet and resend it in the PAYMENT-SIGNATURE header. #### `payment_required` * **Status:** `402` * **Type:** [`billing_error`](#error-types) * **`error`:** `Payment required` * **Retryable:** No * **What happened:** A pay-per-request endpoint (x402, or ZeroClick on /v1/zeroclick/\*) was called without a payment. * **How to fix:** Pay and send the same request again: with x402, sign one of the "accepts" offers and retry with the PAYMENT-SIGNATURE header; through ZeroClick, retry as an agent whose allowance covers the usage. Without either, call /v1/search or /v1/fetch with an API key instead. * **More:** [Pay per request errors](/pay-per-request#errors) #### `payment_settlement_failed` * **Status:** `402` * **Type:** [`billing_error`](#error-types) * **`error`:** `Payment settlement failed` * **Retryable:** No * **What happened:** The payment was verified but could not be settled, so the result was withheld. * **How to fix:** Nothing was charged. Sign a new payment for the offer and retry; reusing the same PAYMENT-SIGNATURE fails again. * **More:** [Pay per request errors](/pay-per-request#errors) #### `payments_region_unavailable` * **Status:** `451` * **Type:** [`billing_error`](#error-types) * **`error`:** `Unavailable for legal reasons` * **Retryable:** No * **What happened:** Pay-per-request access is not offered in the caller's region. * **How to fix:** Pay-per-request is not offered in your region, so retrying will not help. Call /v1/search and /v1/fetch with an API key ([https://app.keenable.ai/console/api-keys](https://app.keenable.ai/console/api-keys)) instead. * **More:** [Pay per request errors](/pay-per-request#errors) #### `payments_unavailable` * **Status:** `503` * **Type:** [`api_error`](#error-types) * **`error`:** `Payments temporarily unavailable` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** Pay-per-request access is briefly unavailable. * **How to fix:** Pay-per-request is briefly unavailable. Wait for Retry-After and retry, or call /v1/search and /v1/fetch with an API key ([https://app.keenable.ai/console/api-keys](https://app.keenable.ai/console/api-keys)). * **More:** [Pay per request errors](/pay-per-request#errors) #### `zeroclick_allowance_denied` * **Status:** `402` * **Type:** [`billing_error`](#error-types) * **`error`:** `ZeroClick allowance denied` * **Retryable:** No * **What happened:** ZeroClick did not authorize this agent to pay for the call; "reason" has its reason. * **How to fix:** Nothing was charged. Top up or raise this agent's allowance on ZeroClick, then retry; ZeroClick's reason is in "reason". Without ZeroClick, use an API key ([https://app.keenable.ai/console/api-keys](https://app.keenable.ai/console/api-keys)) on /v1/search and /v1/fetch. ### Rate limit codes Your own limits, and Keenable services that are briefly busy. See [Rate limits](/rate-limits) for every tier. #### `fetch_rate_limited` * **Status:** `429` * **Type:** [`rate_limit_error`](#error-types) * **`error`:** `Rate limit exceeded` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The fetcher is briefly rate-limited on the Keenable side, not by your own limit. * **How to fix:** The fetcher is briefly rate-limited on our side; this is not your own limit. Wait for Retry-After and retry. * **More:** [429 Rate limit exceeded](#429) #### `paid_rate_limit_per_second` * **Status:** `429` * **Type:** [`rate_limit_error`](#error-types) * **`error`:** `Rate limit exceeded` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The per-second limit on pay-per-request access was exceeded. * **How to fix:** Wait for Retry-After and retry. For a limit that can be raised, use an API key with prepaid credits ([https://app.keenable.ai/console/api-keys](https://app.keenable.ai/console/api-keys)) on /v1/search and /v1/fetch. * **More:** [429 Rate limit exceeded](#429) #### `public_domain_requires_api_key` * **Status:** `429` * **Type:** [`rate_limit_error`](#error-types) * **`error`:** `API key required for this site` * **Retryable:** No * **What happened:** Keyless requests that target a restricted site (PUBLIC_BLOCKED_REQUEST_DOMAINS) are not served; they need an API key. * **How to fix:** Requests that target this site need an API key. Run `keenable login`, or create a free API key at [https://app.keenable.ai/console/api-keys](https://app.keenable.ai/console/api-keys) and call /v1/search or /v1/fetch with it in the X-API-Key header. Retrying without a key returns 429 again. No account yet? Sign up at [https://app.keenable.ai/signup](https://app.keenable.ai/signup): the free API key includes 100,000 requests a month. #### `public_rate_limit_domain` * **Status:** `429` * **Type:** [`rate_limit_error`](#error-types) * **`error`:** `Rate limit exceeded` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The per-second limit for keyless requests that target a restricted site, shared by every keyless caller, was exceeded. * **How to fix:** Send an API key (create one at [https://app.keenable.ai/console/api-keys](https://app.keenable.ai/console/api-keys)) to /v1/search or /v1/fetch: keyed requests are not under this limit. Otherwise wait for Retry-After and retry. No account yet? Sign up at [https://app.keenable.ai/signup](https://app.keenable.ai/signup): the free API key includes 100,000 requests a month. #### `public_rate_limit_hourly` * **Status:** `429` * **Type:** [`rate_limit_error`](#error-types) * **`error`:** `Rate limit exceeded` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The hourly limit for keyless requests from this IP address was reached. * **How to fix:** Wait for Retry-After (up to an hour) before retrying; a retry sooner returns 429 again. To continue now instead, create a free API key at [https://app.keenable.ai/console/api-keys](https://app.keenable.ai/console/api-keys) and call /v1/search or /v1/fetch with it in the X-API-Key header: keyed requests have no hourly cap. No account yet? Sign up at [https://app.keenable.ai/signup](https://app.keenable.ai/signup): the free API key includes 100,000 requests a month. * **More:** [429 Rate limit exceeded](#429) #### `public_rate_limit_per_second` * **Status:** `429` * **Type:** [`rate_limit_error`](#error-types) * **`error`:** `Rate limit exceeded` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The per-second limit for keyless requests from this IP address was exceeded. * **How to fix:** Wait for Retry-After and retry, or send an API key (create one at [https://app.keenable.ai/console/api-keys](https://app.keenable.ai/console/api-keys)) to /v1/search or /v1/fetch for your organization's own limit. No account yet? Sign up at [https://app.keenable.ai/signup](https://app.keenable.ai/signup): the free API key includes 100,000 requests a month. * **More:** [429 Rate limit exceeded](#429) #### `rate_limit_per_second` * **Status:** `429` * **Type:** [`rate_limit_error`](#error-types) * **`error`:** `Rate limit exceeded` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The organization's requests-per-second limit, shared by all its keys, was exceeded. * **How to fix:** Wait for Retry-After, then retry, and keep under your organization's per-second limit. For a higher limit, upgrade at [https://app.keenable.ai/console/billing?tab=limits](https://app.keenable.ai/console/billing?tab=limits). * **More:** [429 Rate limit exceeded](#429) #### `search_overloaded` * **Status:** `529` * **Type:** [`api_error`](#error-types) * **`error`:** `Overloaded` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** Search is briefly overloaded. * **How to fix:** Search is briefly overloaded. Wait for Retry-After and retry, backing off if it repeats. * **More:** [5xx Server error](#5xx) #### `search_rate_limited` * **Status:** `429` * **Type:** [`rate_limit_error`](#error-types) * **`error`:** `Rate limit exceeded` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** Search is briefly rate-limited on the Keenable side, not by your own limit. * **How to fix:** Search is briefly rate-limited on our side; this is not your own limit. Wait for Retry-After and retry. * **More:** [429 Rate limit exceeded](#429) #### `select_concurrency_limited` * **Status:** `429` * **Type:** [`rate_limit_error`](#error-types) * **`error`:** `Too many queries running` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** Too many of this buyer's SELECT queries are running at once. * **How to fix:** Nothing was charged. Wait for Retry-After, or for one of your running queries to finish, then send the query again. #### `slow_down` * **Status:** `400` * **Type:** [`rate_limit_error`](#error-types) * **`error`:** `slow_down` * **Retryable:** Poll again after `interval` seconds. The body has no `retryable` field. * **What happened:** The device login was polled again before the interval passed; "interval" is the new, longer interval. * **How to fix:** Wait the number of seconds in "interval" between polls from now on. ### Fetch target codes These come from fetch, and from search when `query` is a URL. They describe the page you asked for, not your request or your key. #### `content_not_extracted` * **Status:** `422` * **Type:** [`target_error`](#error-types) * **`error`:** `Unprocessable entity` * **Retryable:** No * **What happened:** The page was reached but has no readable text to extract. * **How to fix:** The page was reached but has no readable text to extract. Retrying will not help: fetch another source. * **More:** [422 Content could not be extracted](#422) #### `page_not_found` * **Status:** `404` * **Type:** [`target_error`](#error-types) * **`error`:** `Not found` * **Retryable:** No * **What happened:** The site says the page does not exist. * **How to fix:** The site says the page does not exist. Retrying the same URL returns the same 404: check the URL, or use another search result. * **More:** [404 Page not found](#404) #### `private_url_not_allowed` * **Status:** `403` * **Type:** [`permission_error`](#error-types) * **`error`:** `Forbidden` * **Retryable:** No * **What happened:** The URL points to a private or non-routable address. * **How to fix:** The fetcher only reaches public http and https pages. Use a public URL; retrying this one returns the same 403. * **More:** [403 Key rejected or revoked](#403) #### `target_blocked` * **Status:** `403` * **Type:** [`target_error`](#error-types) * **`error`:** `Upstream forbidden` * **Retryable:** No * **What happened:** The site refused the fetcher, for example with a bot check. * **How to fix:** The site refused the fetcher, for example with a bot check or an access rule. This is not about your API key, and retrying the same URL will not help: fetch another source for the same content. * **More:** [422 Content could not be extracted](#422) #### `target_http_error` * **Status:** `422` * **Type:** [`target_error`](#error-types) * **`error`:** `Unprocessable entity` * **Retryable:** No * **What happened:** The site answered with an error status for this URL. * **How to fix:** The site answered with an error status for this URL. Retrying the same URL will not help: check the URL or fetch another source. * **More:** [422 Content could not be extracted](#422) #### `target_paywalled` * **Status:** `422` * **Type:** [`target_error`](#error-types) * **`error`:** `Unprocessable entity` * **Retryable:** No * **What happened:** The page needs a login or a subscription. * **How to fix:** The page needs a login or a subscription, so there is no content to return. Retrying will not help: fetch another source. * **More:** [422 Content could not be extracted](#422) #### `target_rate_limited` * **Status:** `429` * **Type:** [`target_error`](#error-types) * **`error`:** `Rate limit exceeded` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The target site rate-limited the fetch. * **How to fix:** The target site rate-limited the fetch. This is not your Keenable limit: wait for Retry-After and retry, or fetch another source. * **More:** [429 Rate limit exceeded](#429) #### `target_timeout` * **Status:** `504` * **Type:** [`target_error`](#error-types) * **`error`:** `Gateway timeout` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The page took too long to respond. * **How to fix:** The page took too long to respond. Retrying can help: wait a few seconds and retry up to 3 times, then try another URL. * **More:** [5xx Server error](#5xx) #### `target_unreachable` * **Status:** `502` * **Type:** [`target_error`](#error-types) * **`error`:** `Bad gateway` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The fetcher could not reach the page. * **How to fix:** The fetcher could not reach the page: a connection, DNS or TLS failure, or a server error on the site. This is often transient: wait a few seconds and retry up to 3 times, then try another URL. * **More:** [5xx Server error](#5xx) #### `target_wrong_page` * **Status:** `422` * **Type:** [`target_error`](#error-types) * **`error`:** `Unprocessable entity` * **Retryable:** No * **What happened:** The site served a different page than the one requested. * **How to fix:** The site served a different page than the one requested, such as a redirect to its home page. Retrying will not help: check the URL or fetch another source. * **More:** [422 Content could not be extracted](#422) ### Fallback codes An error with no more specific code gets one of these, based on its HTTP status. A `400` with no specific code gets [`invalid_request`](#invalid-request). A fallback code keeps the type listed for it whatever the status. Every `402` and `451` the API sends has its own [`billing_error`](#error-types) code, so a fallback never stands for a billing or payment problem. #### `allowance_unavailable` * **Status:** `503` * **Type:** [`api_error`](#error-types) * **`error`:** `Allowance check unavailable` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** ZeroClick could not confirm the agent's allowance just now. * **How to fix:** ZeroClick could not confirm the allowance, and nothing was charged. Wait for Retry-After and send the same call again. #### `auth_internal_error` * **Status:** `500` * **Type:** [`api_error`](#error-types) * **`error`:** `Authentication service error` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The credentials could not be checked because of an error on the Keenable side; they may be fine. * **How to fix:** Your credentials could not be checked because of an error on our side; they may be fine. Wait for Retry-After and retry up to 3 times. If it keeps failing, report it with the request_id. #### `balance_check_unavailable` * **Status:** `500` * **Type:** [`api_error`](#error-types) * **`error`:** `Balance check failed` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The organization's credit balance could not be read, so the request was not run. * **How to fix:** Your balance could not be read on our side; nothing was charged and your credits are fine. Wait for Retry-After and retry up to 3 times, then report the request_id. #### `billing_account_not_found` * **Status:** `500` * **Type:** [`api_error`](#error-types) * **`error`:** `Billing record missing` * **Retryable:** No * **What happened:** The organization has no balance record, so the request could not be billed. * **How to fix:** Your organization has no billing record on our side, so the request could not be billed. Retrying will not help: contact us at [https://keenable.ai/contact](https://keenable.ai/contact) with the request_id. #### `card_storage_unavailable` * **Status:** `503` * **Type:** [`api_error`](#error-types) * **`error`:** `Card storage unavailable` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The card could not be read from storage on the Keenable side. * **How to fix:** The card could not be read from our storage. Wait for Retry-After and retry; if it keeps failing, report it with the request_id. #### `card_too_large` * **Status:** `500` * **Type:** [`api_error`](#error-types) * **`error`:** `Card too large` * **Retryable:** No * **What happened:** The stored card is larger than the 1 MiB that is served. * **How to fix:** This card is larger than the 1 MiB we serve, so retrying returns the same error. Report it with the request_id. #### `device_login_unavailable` * **Status:** `503` * **Type:** [`api_error`](#error-types) * **`error`:** `Device login unavailable` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The login store did not respond, so the device login could not start or be checked. * **How to fix:** Wait for Retry-After and retry the same request. #### `dns_lookup_failed` * **Status:** `422` * **Type:** [`api_error`](#error-types) * **`error`:** `DNS lookup failed` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The domain's DNS records could not be looked up just now. * **How to fix:** The domain's DNS records could not be looked up just now. Wait for Retry-After and verify again; if it keeps failing, check that the domain's name servers answer. #### `fetch_mode_unavailable` * **Status:** `500` * **Type:** [`api_error`](#error-types) * **`error`:** `Fetch mode unavailable` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The fetch mode this request needs is turned off on the Keenable side. * **How to fix:** The fetch mode this request needs is turned off on our side; your URL is not the cause. Wait for Retry-After and retry. If you sent live=true, retrying without it may return the indexed copy. #### `fetcher_unavailable` * **Status:** `500` * **Type:** [`api_error`](#error-types) * **`error`:** `Fetcher unavailable` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** Keenable's fetcher failed or could not be reached; the URL is not the cause. * **How to fix:** Our fetcher failed; the URL is not the cause and nothing was charged. Wait for Retry-After and retry the same request up to 3 times, then report the request_id. #### `forbidden` * **Status:** `403` * **Type:** [`permission_error`](#error-types) * **`error`:** `Forbidden` * **Retryable:** No * **What happened:** The request is not allowed; the message gives the reason. * **How to fix:** This request is not allowed: read "message" for the reason. Retrying the same request returns the same 403. * **More:** [403 Key rejected or revoked](#403) #### `internal_error` * **Status:** `500` * **Type:** [`api_error`](#error-types) * **`error`:** `Internal server error` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** Something failed on the Keenable side, usually with 500; any other 5xx without a more specific code also uses it. * **How to fix:** Something failed on our side; the request itself may be fine. Wait a few seconds and retry up to 3 times, then report it with the request_id. * **More:** [5xx Server error](#5xx) #### `monitors_unavailable` * **Status:** `503` * **Type:** [`api_error`](#error-types) * **`error`:** `Monitors temporarily unavailable` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The Monitors service did not answer just now. * **How to fix:** The Monitors service did not answer just now; the request may not have been applied. Wait a few seconds and retry; send an Idempotency-Key with creates so a retry cannot make a second monitor. #### `not_found` * **Status:** `404` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Not found` * **Retryable:** No * **What happened:** Nothing was found for this request. * **How to fix:** Nothing was found for this request: read "message", correct it and retry. * **More:** [404 Page not found](#404) #### `payment_verification_unavailable` * **Status:** `502` * **Type:** [`api_error`](#error-types) * **`error`:** `Payment verification failed` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The x402 facilitator failed while verifying the payment; nothing was charged. * **How to fix:** Verification moves no funds, so the same payment is still good. Wait for Retry-After and resend the same request with the same PAYMENT-SIGNATURE. #### `rate_limited` * **Status:** `429` * **Type:** [`rate_limit_error`](#error-types) * **`error`:** `Rate limit exceeded` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** Too many requests to this endpoint in a short time. * **How to fix:** Wait for Retry-After and retry, and send requests less often. * **More:** [429 Rate limit exceeded](#429) #### `request_rejected` * **Status:** `409` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Request rejected` * **Retryable:** No * **What happened:** The request was rejected, usually with 409 Conflict; any other 4xx without a more specific code also uses it. The message names the step to take first. * **How to fix:** The request was rejected: read "message" for the step to take first. Retrying the same request unchanged returns the same error. #### `search_failed_upstream` * **Status:** `422` * **Type:** [`api_error`](#error-types) * **`error`:** `Search failed` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The search backend answered with an unexpected status; the cause was not identified. * **How to fix:** Search failed with an unexpected status from our backend, and nothing was charged. Wait for Retry-After and retry once; if it fails again, report the request_id. #### `search_upstream_error` * **Status:** `500` * **Type:** [`api_error`](#error-types) * **`error`:** `Search backend failed` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The search backend failed while answering; the request itself is not the cause. * **How to fix:** Our search backend failed; your request is not the cause and nothing was charged. Wait for Retry-After and retry up to 3 times, then report the request_id. #### `select_disabled` * **Status:** `502` * **Type:** [`api_error`](#error-types) * **`error`:** `SELECT switched off` * **Retryable:** No * **What happened:** Paid SELECT is switched off or not deployed right now; nothing was charged. * **How to fix:** Paid SELECT is switched off on our side right now, and nothing was charged. Retrying now returns the same error: try again later, or use search and fetch in the meantime. #### `select_internal_error` * **Status:** `502` * **Type:** [`api_error`](#error-types) * **`error`:** `SELECT failed` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The SELECT service answered in a way Keenable could not use; nothing was charged. * **How to fix:** This is a fault on our side, not in your query, and nothing was charged. Wait for Retry-After and retry once; if it repeats, report the request_id. #### `select_timeout` * **Status:** `502` * **Type:** [`api_error`](#error-types) * **`error`:** `SELECT timed out` * **Retryable:** No * **What happened:** The SELECT service did not answer in time, so the result was withheld; nothing was charged. * **How to fix:** Nothing was charged. A long query is the usual cause, so narrowing it (add LIMIT, filter WEB_SEARCH, or set show_preview to true) is the surest fix. If the query is already small, the service was slow: retry once later. #### `select_unavailable` * **Status:** `502` * **Type:** [`api_error`](#error-types) * **`error`:** `SELECT unavailable` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** The SELECT service failed or could not be reached; nothing was charged. * **How to fix:** Nothing was charged. Wait for Retry-After and send the same query again, at most 2 more times; then report the request_id. #### `service_not_configured` * **Status:** `503` * **Type:** [`api_error`](#error-types) * **`error`:** `Not configured` * **Retryable:** No * **What happened:** The feature this endpoint needs is not configured on this server. * **How to fix:** This endpoint is not configured on our side, so retrying will not help until we fix it. Report it with the request_id. #### `time_machine_versions_unavailable` * **Status:** `503` * **Type:** [`api_error`](#error-types) * **`error`:** `Time Machine versions unavailable` * **Retryable:** Yes, after `retry_after_seconds` * **What happened:** Keenable could not list or read stored page versions just now. * **How to fix:** Keenable could not reach the store of page versions just now; your request is fine. Wait for Retry-After and retry. If it keeps failing, contact support with the request_id. #### `unauthenticated` * **Status:** `401` * **Type:** [`authentication_error`](#error-types) * **`error`:** `Authentication required` * **Retryable:** No * **What happened:** The request was not authenticated; the message names what is missing or wrong. * **How to fix:** Read "message" for the credential that is missing or was rejected, sign in again or send a valid key, and retry. #### `unprocessable` * **Status:** `422` * **Type:** [`invalid_request_error`](#error-types) * **`error`:** `Unprocessable entity` * **Retryable:** No * **What happened:** The request was understood but could not be completed. * **How to fix:** The request was understood but could not be completed: read "message". Retrying the same request returns the same 422. * **More:** [422 Content could not be extracted](#422) ## 400 Invalid request parameters **Retry: fix, then retry.** **What you see** If a parameter is missing or invalid, search and fetch return `400` with an `error` such as `Invalid parameter`. This fetch call has no `url`: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "error": "Missing required parameter", "type": "invalid_request_error", "code": "missing_parameter", "message": "\"url\" is required", "fix": "Send the \"url\" parameter; it is required. Then retry.", "docs_url": "https://docs.keenable.ai/errors#missing-parameter", "retryable": false, "param": "url" } ``` The `code` is one of the [validation codes](#validation-codes). `param` names the parameter that failed. An `invalid_request` error adds `details`, which lists each failing field. A JSON body that is too large returns `413` with the code `request_too_large`. A parameter you send either takes effect or the request fails. Search and fetch don't ignore a parameter they don't know, and they don't guess at a value they can't read: `"max_results": true` and `live=1` return `400`. An integer parameter, such as `max_results`, `snippet_max_length` or `max_chars`, accepts its value as a number or as a string of digits, such as `"5"`. The value must still be inside the range the reference lists. An `unknown_parameter` error adds `allowed`, the parameters the endpoint accepts. When the name is close to a supported one, `message` asks `Did you mean`, and `did_you_mean` maps the name you sent to the one to use. This search call sends `count` instead of `max_results`: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "error": "Bad request", "type": "invalid_request_error", "code": "unknown_parameter", "message": "Unknown parameter(s): count. Did you mean max_results? Supported parameters: query, mode, query_time, snippet_max_length, max_results, disable_cards, acquired_after, acquired_before, published_after, published_before, site", "fix": "Rename \"count\" to \"max_results\". Then retry.", "docs_url": "https://docs.keenable.ai/errors#unknown-parameter", "retryable": false, "param": "count", "allowed": ["query", "mode", "query_time", "snippet_max_length", "max_results", "disable_cards", "acquired_after", "acquired_before", "published_after", "published_before", "site"], "did_you_mean": { "count": "max_results" } } ``` Rename the parameter as `did_you_mean` says and send the call again. A required parameter sent under another name, such as `q` for `query`, returns this error too. **Cause** A request parameter does not match what the endpoint accepts: a missing `query` or `url`, a parameter the endpoint doesn't know, a value outside its range, a bad date filter, or a type the schema rejects. A `POST` body that isn't a JSON object sent with `Content-Type: application/json` returns `invalid_request`. Both the keyed paths, such as `/v1/search` and `/v1/fetch`, and the `/public` paths return it. If your organization has a zero data retention policy, a request it doesn't allow returns `400` with the code `zdr_unsupported_profile` or `zdr_prompt_unsupported`. **Fix** 1. Read the `fix`, `param` and any `details` in the response body. They name the field that failed and what to change. 2. Check the request against the [Search](/api-reference/search) or [Fetch](/api-reference/fetch) parameter list and send the call again with a corrected body. 3. If the body says `Missing app identifier` instead, see [400 Missing app identifier](#400-missing-app-identifier). ## 400 Missing app identifier **Retry: fix, then retry.** **What you see** ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "error": "Missing app identifier", "type": "invalid_request_error", "code": "missing_app_title", "message": "X-Keenable-Title header is required for token-less requests", "fix": "Name your app in the X-Keenable-Title header (or the keenable_title query parameter) and retry. With an API key, call /v1/search or /v1/fetch instead, which do not need it.", "docs_url": "https://docs.keenable.ai/errors#missing-app-title", "retryable": false, "param": "X-Keenable-Title" } ``` The SDKs send this header for you, so you get this error only over raw HTTP. **Cause** A keyless request to `/v1/search/public` or `/v1/fetch/public` arrived without the `X-Keenable-Title` header. Keyed requests to `/v1/search` or `/v1/fetch` never need this header. A `400` on those paths means an [invalid parameter](#400-invalid-request). **Fix** Add the header with your application's name. If you can't set a header, pass the same value in the `keenable_title` query parameter. This request includes the header: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST https://api.keenable.ai/v1/search/public \ -H "Content-Type: application/json" \ -H "X-Keenable-Title: My agent" \ -d '{"query": "fastest inference providers 2026", "max_results": 3}' ``` You get search results instead of the `400`. If you have an [API key](/api-keys), call `/v1/search` instead, which doesn't need the header. ## 401 Missing key **Retry: fix, then retry.** **What you see** If a request to a keyed path such as `/v1/search` or `/v1/fetch` carries no key at all, the API returns: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "error": "Missing authentication", "type": "authentication_error", "code": "missing_api_key", "message": "Either X-API-Key header or Authorization Bearer token is required", "fix": "Send your Keenable API key in the X-API-Key header (or as \"Authorization: Bearer \") and retry. Create a key at https://app.keenable.ai/console/api-keys.", "keyless": "/v1/search/public and /v1/fetch/public work without a key, rate-limited per IP. Name your app in the X-Keenable-Title header (or the keenable_title query parameter); public requests without it get a 400.", "api_keys_url": "https://app.keenable.ai/console/api-keys", "docs_url": "https://docs.keenable.ai/errors#missing-api-key", "retryable": false } ``` The `keyless` field appears only on `/v1/search` and `/v1/fetch`, which have a `/public` twin. A `401` from the time machine endpoints leaves it out. The SDKs never send a request with no key. If `KEENABLE_API_KEY` isn't set, they call the keyless `/public` paths, so you get this body only over raw HTTP. **Cause** The request reached a keyed path without an `X-API-Key` or `Authorization: Bearer` header. **Fix** Send the key in the `X-API-Key` header. To call without a key, use `/v1/search/public` or `/v1/fetch/public` with an `X-Keenable-Title` header instead. ## 401 Malformed key **Retry: fix, then retry.** **What you see** If the key has the wrong format, the API returns `401` with `"error": "Authentication failed"`, `"message": "Malformed API key"` and the code `invalid_api_key`. That code also covers an [unknown key](#401-invalid-key), so check the `message`. A request with no key at all gets [`missing_api_key`](#401-missing-key) instead. The SDKs raise `KeenableAuthError` (Python, TypeScript), `*keenable.AuthError` (Go) or `keenable::Error::Auth` (Rust) with the message prefix `Keenable authentication failed (401)`. **Cause** `Malformed API key` means the value does not look like a Keenable key at all. Common causes are a truncated copy, a stray quote or space, or a placeholder such as `keen_` left in place. **Fix** 1. Check the value of `KEENABLE_API_KEY`. It starts with `keen_` and has no quotes or whitespace around it. 2. Over raw HTTP, send the key in the `X-API-Key` header. To call without a key, use `/v1/search/public` or `/v1/fetch/public` with an `X-Keenable-Title` header instead. 3. To keep working while you sort it out, unset `KEENABLE_API_KEY`. The SDKs fall back to the keyless tier. ## 401 Invalid key **Retry: fix, then retry.** **What you see** The API returns: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "error": "Authentication failed", "type": "authentication_error", "code": "invalid_api_key", "message": "Invalid API key", "fix": "The API key was not accepted. Copy the full key from https://app.keenable.ai/console/api-keys, or create a new one there, and retry with it in the X-API-Key header.", "keyless": "/v1/search/public and /v1/fetch/public work without a key, rate-limited per IP. Name your app in the X-Keenable-Title header (or the keenable_title query parameter); public requests without it get a 400.", "api_keys_url": "https://app.keenable.ai/console/api-keys", "docs_url": "https://docs.keenable.ai/errors#invalid-api-key", "retryable": false } ``` The SDKs raise `KeenableAuthError` (Python, TypeScript), `*keenable.AuthError` (Go) or `keenable::Error::Auth` (Rust) with the message prefix `Keenable authentication failed (401)`. **Cause** The key has the right format, but Keenable has no key with that value. A typo that keeps the `keen_` prefix causes this. A [malformed key](#401-malformed-key) returns the same `invalid_api_key` code with `"message": "Malformed API key"`, so check the `message` to tell the two apart. If you sent a bearer token that isn't an API key and it was rejected, see [401 Invalid token](#401-invalid-token). **Fix** 1. Compare `KEENABLE_API_KEY` with the key in the [console ↗](https://app.keenable.ai/console). 2. If you cannot find it there, create a new key and replace the old value. See [API keys](/api-keys). 3. To keep working while you sort it out, unset `KEENABLE_API_KEY`. The SDKs fall back to the keyless tier. ## 401 Invalid token **Retry: fix, then retry.** **What you see** The API returns `401` with `"error": "Authentication failed"` and the code `invalid_bearer_token`. **Cause** The request sent a bearer token in `Authorization: Bearer` that isn't an API key, and the token was malformed or expired. A bearer value that looks like a Keenable API key is checked as a key, so a bad key there gets [`invalid_api_key`](#401-invalid-key) instead. **Fix** Sign in again for a fresh token, or send an [API key](/api-keys) in the `X-API-Key` header. ## 402 Out of funds **Retry: do not retry.** **What you see** Over HTTP, the body has the code `insufficient_credits` and `"retryable": false`. It adds `billing_url`, where to top up, and `auto_top_up_url`, which links [auto top-up](/auto-top-up). Where pay-per-request is enabled, `pay_per_request` describes the [x402](/pay-per-request) paths, which an agent with a crypto wallet can call with no key or credits. The SDKs raise `KeenableInsufficientCreditsError` (Python, TypeScript), a subclass of `KeenableAPIError`, `*keenable.InsufficientCreditsError` (Go) or `keenable::Error::InsufficientCredits` (Rust) with status `402` and the message prefix `Keenable: insufficient credits (402)`. **Cause** Your organization has spent its free monthly allowance, 100,000 requests on the standard plan, and its prepaid balance is used up. Every retry returns the same `402` until someone tops up or the allowance resets. See [Balance and usage](/credits#when-credits-run-out). **Fix** Stop and ask a human to top up or turn on [auto top-up](/auto-top-up) in the [console ↗](https://app.keenable.ai/console). Catch the API error and check its status. The dedicated credits error is a subclass of it, so this works in every SDK version. This code stops on `402` and passes every other error through: ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { Keenable, KeenableAPIError } from "keenable"; const client = new Keenable(); try { const results = await client.search("fastest inference providers 2026", { maxResults: 3 }); } catch (err) { if (err instanceof KeenableAPIError && err.statusCode === 402) { // Out of funds: retrying will not help. Hand off to a human. throw new Error("Keenable is out of funds. Top up or turn on auto top-up in the console."); } throw err; } ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from keenable import Keenable, KeenableAPIError client = Keenable() try: results = client.search("fastest inference providers 2026", max_results=3) except KeenableAPIError as err: if err.status_code == 402: # Out of funds: retrying will not help. Hand off to a human. raise SystemExit("Keenable is out of funds. Top up or turn on auto top-up in the console.") raise ``` ```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} _, err := client.Search(ctx, "fastest inference providers 2026", &keenable.SearchOptions{MaxResults: 3}) var apiErr *keenable.APIError if errors.As(err, &apiErr) && apiErr.StatusCode == 402 { // Out of funds: retrying will not help. Hand off to a human. log.Fatal("Keenable is out of funds. Top up or turn on auto top-up in the console.") } if err != nil { log.Fatal(err) } ``` Your program exits with the message instead of retrying. The SDKs also have a typed error for `402`: `KeenableCreditsError` in Python and TypeScript, `*keenable.CreditsError` in Go. You can catch that type instead of checking the status. ## 403 Key rejected or revoked **Retry: do not retry; check the key, then ask a human.** **What you see** A revoked key returns: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "error": "Forbidden", "type": "permission_error", "code": "credentials_forbidden", "message": "Key revoked", "fix": "The credentials were recognized but are not allowed, usually because the key was revoked. Retrying with them will not help: create a new key at https://app.keenable.ai/console/api-keys, or ask a human with console access to create one for you.", "api_keys_url": "https://app.keenable.ai/console/api-keys", "docs_url": "https://docs.keenable.ai/errors#credentials-forbidden", "retryable": false } ``` On `/v1/search` and `/v1/fetch`, the body also has `keyless`, the same `/public` alternative a `401` names. The SDKs raise `KeenableAuthError` (Python, TypeScript), `*keenable.AuthError` (Go) or `keenable::Error::Auth` (Rust) with the message prefix `Keenable authentication failed (403)`. **Cause** `403` means the server won't accept this key. Two cases return the same status: * On `/v1/search`, `/v1/fetch` and `/mcp`, the key usually exists but was [revoked](/api-keys#key-lifetime-and-rotation) in your organization. * On `/mcp-public`, a key the server doesn't accept also returns `403`, not `401`, so a mistyped or unknown key looks like a revoked one. See [MCP server](/mcp-server#keyless-endpoint-for-listings-and-presets). Fetch also returns `403` for reasons unrelated to your key. Check the `code` before you touch the key: * `target_blocked` (`"error": "Upstream forbidden"`): the target site blocked the fetch, for example with a bot check. Try a different URL. * `private_url_not_allowed`: the URL points at a private or internal address. Use a public `http` or `https` URL. * `forbidden`: the request isn't allowed for another reason, such as a search mode your access doesn't include. `message` says which. **Fix** 1. Compare the key value with the one in the [console ↗](https://app.keenable.ai/console). Fix typos, stray quotes and leftover placeholders before treating the key as revoked. 2. If the value matches and still gets `403`, ask a human with console access to issue a new key, then update `KEENABLE_API_KEY`. 3. On `/mcp-public`, you can also drop the key and stay on the public tier, or switch the URL to `/mcp` once the key is confirmed. ## 403 Time Machine not enabled **Retry: do not retry; drop `as_of` or ask a human.** **What you see** A Time Machine search or fetch from an organization without the feature returns `403` with `"error": "Feature not enabled"`, `"feature": "time_machine"` and a `message` that names both ways forward. **Cause** Time Machine, which searches and fetches the web as of a past date, isn't enabled for your organization. **Fix** Drop `as_of` and send the request to `/v1/search` or `/v1/fetch`, which return current results. To keep the past date, ask a human to enable Time Machine for the organization. ## 404 Page not found **Retry: fix the URL, then retry.** **What you see** If the target page doesn't exist, fetch returns `404`: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "error": "Not found", "type": "target_error", "code": "page_not_found", "message": "The page does not exist at this URL. Check that the URL is correct.", "fix": "The site says the page does not exist. Retrying the same URL returns the same 404: check the URL, or use another search result.", "docs_url": "https://docs.keenable.ai/errors#page-not-found", "retryable": false } ``` Search returns `404` only when `query` is a URL, which it fetches instead of searching. **Cause** Keenable couldn't find the URL you passed to [Fetch](/api-reference/fetch): a typo, a moved page, or a link that never resolved. **Fix** Check the URL, then call fetch again with a corrected one. Retrying the same URL returns the same `404`. If search gave you the link, try the next result instead. ## 405 Wrong HTTP method **Retry: fix the method, then retry.** **What you see** The path exists but doesn't take the method you used, for example a `GET` to Time Machine fetch: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "error": "Method not allowed", "type": "invalid_request_error", "code": "method_not_allowed", "message": "/v1/time-machine/fetch does not accept GET. Use POST. See https://docs.keenable.ai/api-reference", "fix": "/v1/time-machine/fetch does not accept GET. Send the request again as POST.", "allowed": ["POST"], "docs_url": "https://docs.keenable.ai/errors#method-not-allowed", "retryable": false } ``` `allowed` and the `Allow` response header list the methods the path takes. **Cause** Search and fetch take `GET` or `POST`. `GET /v1/fetch` is [deprecated](/versioning#deprecated-now): use `POST /v1/fetch`. Time Machine search, fetch and versions take only `POST`. **Fix** Send the request again with a method from `allowed`. For fetch, that's `GET /v1/fetch?url=...`. The [SDKs](/sdks) pick the right method for you. ## 422 Content could not be extracted **Retry: fix the URL or skip; do not retry the same URL.** **What you see** If the page exists but Keenable can't extract readable content from it, fetch returns `422` with `"error": "Unprocessable entity"`, `"retryable": false` and a `message` such as `The page is behind a login or paywall`. The `code` says why: | Code | Meaning | | - | - | | `target_paywalled` | The page needs a login or a subscription. | | `target_blocked` | The site served a bot check instead of the page. | | `target_wrong_page` | The site served a different page, such as a redirect to its home page. | | `content_not_extracted` | The page was reached but has no readable text. | | `target_http_error` | The site answered with an error status for this URL. | Search returns `422` with `Search failed` and a status code in the `message` when Keenable's search backend answers with an unexpected status. That one is retryable: wait for `Retry-After`, retry once, then [report it](#report-a-problem). **Cause** The URL is reachable, but extraction failed: an unsupported domain, a login wall or paywall, a page that is mostly binary or empty of text, an error status from the target site, or a failure inside the extractor. **Fix** Don't retry the same URL. It fails the same way every time. Try a different URL from search, or fetch a cleaner source for the same topic. If many URLs from one site fail, the domain is probably unsupported, so skip that site. ## 429 Rate limit exceeded **Retry: wait, then retry.** **What you see** Over HTTP, the `code` says which limit you hit, and `retry_after_seconds` says how long to wait. A `429` from one of Keenable's own limits adds `limit`, with its `scope`, `window`, `max` and `resets_at`. See [Error body](#error-body) for an example. The SDKs raise `KeenableRateLimitError` (Python, TypeScript), `*keenable.RateLimitError` (Go) or `keenable::Error::RateLimit` (Rust) with the message prefix `Keenable rate limit exceeded (429)`. Keyless responses carry these headers for the hourly window, and every `429` adds `Retry-After`. Keyed responses carry only `Retry-After`, on a `429`, so pace keyed calls with it. | Header | Meaning | | - | - | | `X-RateLimit-Limit` | Keyless requests allowed per hour | | `X-RateLimit-Remaining` | Keyless requests left in the current hour | | `X-RateLimit-Reset` | When the hourly window resets, as an ISO 8601 timestamp | | `Retry-After` | How long to wait before the next request | **Cause** You sent requests faster than your limit allows: * `public_rate_limit_hourly` and `public_rate_limit_per_second`: keyless, 1,000 requests per hour and 10 per second per IP, on a pool shared with everyone else on your egress address. * `rate_limit_per_second`: with an API key, 10 requests per second per organization by default, with no hourly cap. * `paid_rate_limit_per_second`: [pay per request](/pay-per-request#limits), per paying wallet, per IP, or per agent for ZeroClick. See [rate limits](/rate-limits) for every tier. A `429` can also come from further down the line. The codes `target_rate_limited` (the target server rate-limited the fetch), `search_rate_limited` and `fetch_rate_limited` mean your own limit isn't the cause. Those responses carry `Retry-After: 1`. **Fix** Wait for the time in `Retry-After`, then retry. If you hit the keyless hourly cap, retrying before `limit.resets_at` returns `429` again. Add an [API key](/api-keys) instead: it removes the hourly cap and gives you your own limit. For a higher per-second limit, see [Raise your limit](/rate-limits#raise-your-limit). ## 5xx Server error **Retry: retry up to 3 times.** **What you see** Over HTTP, the body has `"retryable": true` and `retry_after_seconds`, and the response has a matching `Retry-After` header. The SDKs raise `KeenableAPIError` (Python, TypeScript), `*keenable.APIError` (Go) or `keenable::Error::Api` (Rust) with the message prefix `Keenable API error (5xx)`, where `5xx` is the actual status, such as `500` or `503`. **Cause** Something failed on Keenable's side or on the way to the target page. The request itself is fine. The `code` tells the cases apart: * `500` `internal_error`: something failed on Keenable's side. The response carries `Retry-After: 2`. * `500` `search_upstream_error`: Keenable's search backend failed while answering. Nothing was charged. The response carries `Retry-After: 2`. * `500` `fetcher_unavailable`: Keenable's fetcher failed. The URL isn't the cause. The response carries `Retry-After: 5`. * `500` `fetch_mode_unavailable`: this fetch mode is turned off for a while on Keenable's side. The response carries `Retry-After: 30`. * `502` `target_unreachable`: fetch couldn't reach the target page, for example after a DNS, TLS or connection failure. The response carries `Retry-After: 2`. * `503` `auth_unavailable`: Keenable couldn't verify your key. The response carries `Retry-After: 5`. * `504` `target_timeout`: the target page took too long to respond. The response carries `Retry-After: 5`. * `529` `search_overloaded`: search is temporarily overloaded. The response carries `Retry-After: 1`. The pay-per-request paths have their own `502` and `503` codes, listed under [credits and payment codes](#credits-and-payment-codes). **Fix** Retry up to 3 times, waiting longer before each attempt (for example 1, 2 and 4 seconds). If the response has a `Retry-After` header, wait at least that long. If the error persists after 3 attempts, stop and [report it](#report-a-problem). ## Report a problem Responses carry an `X-Request-Id` header, and error bodies repeat it as `request_id`. Include its value when you [get help](/help), so we can find your request in our logs. The Go and Rust SDKs add it to the error message as `request_id`. If a response has no request ID, include the time of the request and the full response body. # Keenable FAQ Source: https://docs.keenable.ai/faq Short answers about keyless use, API keys, search modes, live fetch, prices, 402 and 429 errors and getting help, each linking to the full detail. Find a short answer to a common question about Keenable, then follow its link to the page with the detail. For a term or field name you don't know, see the [Glossary](/glossary). ## Getting started ### Account and API key You need no account and no API key to search or fetch. If you send an API key, your organization gets its own limit of 10 requests per second with no hourly cap, and 100,000 free requests a month. Top-ups of \$1,000 within 90 days raise that limit to 25 requests per second for 90 days. See [Raise your limit](/rate-limits#raise-your-limit). Responses to keyed calls also report what each call cost in a `usage` object. To add a key, see [API keys](/api-keys). ### Keyless billing and limits Keyless requests are free. If you don't send an API key, Keenable allows 1,000 requests per hour and 10 per second per IP address, counted separately for search and for fetch. All traffic from your IP address shares that pool, so other callers on your network reduce your headroom. See [Rate limits](/rate-limits). ### The index behind the results Search and fetch run on Keenable's own index. Each search result carries `acquired_at`, the time Keenable indexed the page, so you can judge how fresh its `snippet` is. See the [Search response](/api-reference/search#response). Keenable's crawler, KeenableBot, builds the index. See [Keenable crawlers](/crawlers). ### Search, Fetch and SELECT Search returns ranked web pages about a topic, each with text from the page in `snippet`. Fetch returns one page as markdown when you already have its URL. SELECT is a separate MCP server that needs a Keenable account: your agent writes one read-only SQL `SELECT`, and the server returns a table built from live web pages. Start with [Search](/products/search), [Fetch](/products/fetch) or [SELECT](/select). To compare all five products side by side, see [Choose a product](/choose). ### Index crawling Keenable crawls the web with its own crawler, KeenableBot, which collects public pages to build and maintain the Keenable search index. KeenableBot follows `robots.txt`, so a site that blocks it no longer appears in Keenable search results. When a fetch reads a page live from its source, the request goes out as Keenable-User. See [Keenable crawlers](/crawlers) for the user agents and the IP lists that verify them. ## Search and fetch ### Search modes Search has two modes. `pro` does deeper retrieval and is the mode a search runs in if you set none and your organization has no other default. `realtime` returns the fastest response, for latency-sensitive agent loops. Each mode is billed as its own SKU, and the response names the mode that served the call in `mode`. See the [Search request](/api-reference/search#request). ### Recent results and `query_time` To get recent results, set `published_after` to a date, a timestamp or a relative delta such as `7d`. The results then leave out pages with no known publish date. `query_time` isn't a recency filter: it searches the index as it stood at that moment and sets no lower bound. See [Date and time filters](/api-reference/search#date-and-time-filters). ### Card results A card is a result that Keenable writes for queries such as prices, exchange rates or facts about a company. Its `url` starts with `https://cards.keenable.ai/w/`. To get ordinary web pages in place of cards, send `disable_cards: true`. You still get the same number of results. See the [Search request](/api-reference/search#request). ### Empty `description` field The `description` field is deprecated and always an empty string. Read the page text from `snippet` on a search result and from `content` on a fetch response. See [Versioning and deprecation](/versioning#deprecated-now). ### Pages with no indexed copy, and `live=true` By default, Fetch returns Keenable's indexed copy of a page. If Keenable has no indexed copy, it fetches the page live from the source and bills the call as `fetch.live`, even if you didn't send `live=true`. Send `live=true` when you need the current version of a page that changes often. See [Fetch](/products/fetch#gotchas). ## Keys, prices and limits ### Cost of a call Search and fetch each cost \$4 per 1,000 requests, and every organization gets 100,000 free requests a month. Your organization can have its own prices, so read `usage.credits` in each keyed response to see what the call cost. One credit is \$0.004. Keyless calls and failed calls report no `usage`. See [Pricing](/pricing) and [Balance and usage](/credits#reading-usage-per-call). ### Out of funds If you've used the monthly allowance and your prepaid balance is used up, `/v1/search` and `/v1/fetch` return `402` with the code `insufficient_credits`. The body's `billing_url` links to the billing page. Top up your balance in the console, or wait for the allowance to reset. See [Balance and usage](/credits#when-credits-run-out). ### Prepaid balance and auto top-up Keenable uses your free requests first, so your prepaid balance goes down only once the monthly allowance is spent. Auto top-up is off until you turn it on in the console. Once it is on, Keenable charges your saved card the amount you set whenever the prepaid balance falls below your threshold, up to your monthly limit. See [Auto top-up](/auto-top-up). ### `429` and `402` Retry a `429`, and don't retry a `402`. A `429` means you sent requests faster than your rate limit allows: wait for the time in the `Retry-After` header, then send the request again. A `402` means your organization is out of funds, and every retry returns the same `402` until someone tops up or the allowance resets. See [Errors](/errors#429). ### High request volumes With an API key, your organization gets 10 requests per second with no hourly cap. The limit rises to 25 once your completed top-ups reach \$1,000 within 90 days. For more than 25 requests per second, [contact Keenable](https://keenable.ai/contact). Dedicated capacity, in the cloud or on-premises, is described under [Plans and volume pricing](/pricing#plans-and-volume-pricing). If you send calls in parallel, keep each batch under your per-second limit, and after a `429` wait for `Retry-After` before you retry. See [Raise your limit](/rate-limits#raise-your-limit). ### Zero data retention Zero data retention (ZDR) is a data retention policy that Keenable sets for an organization as part of the Enterprise offer. The console has no switch for it: ask through [Talk to us](https://app.keenable.ai/console/talk-to-us) in the console, or use the [contact form](https://keenable.ai/contact). The policy follows the API key, so send a key from the ZDR organization on every call. A keyless request isn't under your organization's policy. Under ZDR, a fetch with a `prompt` returns `400` with `zdr_prompt_unsupported`. On the default policy, Keenable logs every search and fetch request. See [Zero data retention](/security#zero-data-retention). ## Connecting ### SDK, MCP server, REST API or CLI | You want to | Use | | - | - | | Call search and fetch from Python, TypeScript, Go or Rust code | The [SDKs](/sdks) | | Give an agent in an MCP client, such as Claude Code or Cursor, search and fetch tools | The [MCP server](/mcp-server) | | Search from a terminal, or add Keenable to the MCP clients on your machine | The [CLI](/cli) | | Call from another language, or send a parameter the SDKs don't send yet | The [REST API](/api-reference) | | Give an agent web search with no MCP client and no API key | The [agent skill](/agent-skill) | All five work without an API key. For a first search with each, see the [Quickstart](/). To have your coding agent do the setup, use **Copy setup prompt** on the [Quickstart](/). ### Keyless calls over HTTP To call the HTTP API without a key, send the request to the `/public` twin of the endpoint, such as `/v1/search/public` or `/v1/fetch/public`, with an `X-Keenable-Title` header that names your application. If the header is missing, the API returns `400` with `Missing app identifier`. If you can't set a header, pass the same value in the `?keenable_title=` query parameter. The MCP server at `https://api.keenable.ai/mcp` needs no key either. See [API authentication](/api-reference#authentication). ### Send a session ID from an SDK No SDK has a `session_id` argument. Send the `X-Keenable-Session-Id` header through the client's default headers (TypeScript from `keenable` 0.2.0). See [Group a run with a session ID](/guides/high-volume-research#group-a-run-with-a-session-id). ### A client that keeps using its own web search Turn off the client's own web tools and add a routing rule, as [Make Keenable the default web tool](/default-web-tool) shows for Claude Code, Codex, Cursor and OpenCode. ### Paying per request without an account An agent with a wallet can call search and fetch with no account and no API key on the `/v1/x402/*` paths. Each search or fetch costs \$0.01 in USDC on Base, paid over the x402 protocol. If you call Keenable regularly, an API key costs less. See [Pay per request](/pay-per-request). ## Help and changes ### Report a problem Email [support@keenable.ai](mailto:support@keenable.ai) about your account, billing or the API. Include the `X-Request-Id` header value from the response so Keenable can find your request in its logs. For a bug in an SDK or the CLI, open a GitHub issue in its repository. See [Get help](/help). ### Breaking changes Within `/v1`, Keenable ships only backward-compatible changes and announces them in the [changelog](/changelog). A deprecated endpoint, parameter, response field or MCP tool is announced in the changelog and by email to organization owners, and keeps working for at least 90 days after the announcement. Anything the docs mark as experimental can change without that notice. See [Versioning and deprecation](/versioning#deprecation-policy). # Keenable glossary Source: https://docs.keenable.ai/glossary Definitions of the terms you meet when you build on Keenable, from snippet, card and acquired_at to x402, MCP, monitor runs and webhook signatures. Look up a term from the Keenable API, the MCP server or Monitors, then follow its link to the page with the detail. ## Fields in a search response This request runs one search with your API key and asks for a single short result: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST "https://api.keenable.ai/v1/search" \ -H "X-API-Key: $KEENABLE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "query": "open-weights LLM release", "max_results": 1, "snippet_max_length": 180 }' ``` You get a response in this shape. The comments name the glossary term for each field, and the values are examples: ```jsonc theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "query": "open-weights LLM release", // the query you sent, unchanged "mode": "pro", // mode: the mode that served the call "results": [ { "title": "Example Labs releases a 70B open-weights model", "url": "https://example.com/news/example-70b", // a card URL starts with https://cards.keenable.ai/w/ "description": "", // deprecated, always empty: read snippet "snippet": "Example Labs published the weights of its 70B model under an open license on Monday...", // snippet "published_at": "2026-11-16T00:00:00Z", // published_at: when the page was published "acquired_at": "2026-11-16T09:12:44Z" // acquired_at: when Keenable indexed the page } ], "usage": { // usage: only on successful calls made with an API key "sku": "search.pro", // SKU: what the call was billed as "amount": 1, "credits": 1, // credit: one credit is $0.004 "paid": false, // false: the call came from the monthly allowance "credits_remaining": 99999 } } ``` The response headers carry `X-Request-Id`. A keyless call to `/v1/search/public` returns the same shape without `usage`. See the [Search response](/api-reference/search#response) for every field. ## Search and fetch | Term | Meaning | Detail | | - | - | - | | Search | `POST /v1/search` returns ranked web pages for a query, best match first, from 1 to 50 results. | [Search](/products/search) | | Result | One ranked page in `results`, with `title`, `url` and, when Keenable knows them, `snippet`, `published_at` and `acquired_at`. | [Search response](/api-reference/search#response) | | `snippet` | Text from the page, chosen for the query, in markdown. It can start or end mid-sentence, and `snippet_max_length` caps it at 180 to 10,000 characters. | [Search response](/api-reference/search#response) | | Card | A result that Keenable writes itself for queries such as prices, exchange rates or facts about a company. Its URL starts with `https://cards.keenable.ai/w/` and works for one day. Send `disable_cards: true` to get web pages in its place. | [Search request](/api-reference/search#request) | | `published_at` | When the page was published, as an ISO 8601 timestamp in UTC. The field is left out when the publish date is unknown. | [Search response](/api-reference/search#response) | | `acquired_at` | When Keenable indexed the page. Use it to judge how fresh the `snippet` is. | [Search response](/api-reference/search#response) | | `published_after`, `published_before` | Filters that keep pages published inside a window. `published_after` is the filter for recent results, and it leaves out pages with no known publish date. | [Date and time filters](/api-reference/search#date-and-time-filters) | | `acquired_after`, `acquired_before` | Filters on the time Keenable indexed a page, whatever its publish date. Use `acquired_after` to find pages that are new to the index. | [Search request](/api-reference/search#request) | | `query_time` | Searches the index as it stood at that moment, so pages acquired later are left out. It sets no lower bound and isn't a recency filter. | [Point-in-time search](/mcp-server#point-in-time-search) | | Mode | How hard a search works: `pro`, the default, does deeper retrieval, and `realtime` returns the fastest response. Each mode is billed as its own SKU. | [Search request](/api-reference/search#request) | | Search operators | A quoted phrase for exact wording, `site:` for one or more sites, and `-` to leave out a word, a phrase or a site, written inside `query`. | [Search operators](/api-reference/search#search-operators) | | `exclude_domains` | Hosts that never appear in the results, with their subdomains. A leading dot, such as `.gov`, excludes a whole public suffix. | [Exclude domains](/api-reference/search#exclude-domains) | | Fetch | `GET /v1/fetch` returns one page as markdown in `content`, with navigation and boilerplate stripped. | [Fetch](/products/fetch) | | Live fetch | A fetch made from the source page instead of Keenable's indexed copy, billed as `fetch.live`. Send `live=true` to ask for one. Keenable also fetches live when it has no indexed copy. | [Fetch gotchas](/products/fetch#gotchas) | | Fetch `prompt` | An instruction of at most 2,000 characters. A model reads the page, and `content` holds only its answer. | [Fetch request](/api-reference/fetch) | | `max_chars` | The cap on the characters of fetched `content`, 50,000 by default. Cut content sets `truncated` to `true`, and `total_chars` gives the full length. | [Fetch request](/api-reference/fetch) | | `session_id` | Your own ID, up to 128 characters, that groups the requests of one agent session. Send the same value on every call, or send the `X-Keenable-Session-Id` header. | [Search request](/api-reference/search#request) | ## Access and billing | Term | Meaning | Detail | | - | - | - | | Keyless tier | Calls with no API key, on the `/public` paths or the MCP server. They are free, rate limited per IP address for each endpoint, and return no `usage`. | [Rate limits](/rate-limits) | | `X-Keenable-Title` | The header that names your application on a keyless `/public` call. Without it, the API returns `400` with `Missing app identifier`. | [API authentication](/api-reference#authentication) | | API key | A key that starts with `keen_`, sent in the `X-API-Key` header or as `Authorization: Bearer`. It belongs to your organization and never expires on its own. | [API keys](/api-keys) | | Organization | The account that owns your API keys. All its keys share one per-second rate limit. | [Rate limits](/rate-limits) | | Device login | A sign-in for tools that can't show a sign-in page, following RFC 8628. Your tool requests a code, a person approves it in the console, and your tool collects a new API key. `keenable login` uses it. | [Device login](/authentication#device-login) | | Monthly allowance | The free requests each month that an organization gets with an API key. Keenable uses it before your prepaid balance. | [Monthly allowance](/credits#monthly-allowance) | | `usage` | The object on each successful keyed response that says what the call was billed: `sku`, `amount`, `credits`, `paid` and `credits_remaining`. | [Reading usage per call](/credits#reading-usage-per-call) | | Credit | The unit `usage.credits` reports. One credit is \$0.004, so a call at \$4 per 1,000 costs 1 credit. | [Pricing](/pricing) | | SKU | The name a call is billed under: `search.pro`, `search.realtime`, `fetch` or `fetch.live`. | [What each call costs](/pricing#what-each-call-costs) | | Auto top-up | A setting that charges your saved card when your prepaid balance falls below a threshold you set. It is off until you turn it on. | [Auto top-up](/auto-top-up) | | `X-Request-Id` | The response header that identifies one request. Include it when you report a problem, so support can find the request in the logs. | [What to include](/help#what-to-include) | | `Retry-After` | The header on a `429` that says how many seconds to wait before you retry. | [When you hit a limit](/rate-limits#when-you-hit-a-limit) | | x402 | An open payment protocol built on HTTP `402 Payment Required`. An agent with a wallet pays for each search or fetch in USDC on Base on the `/v1/x402/*` paths, with no account. | [Pay per request](/pay-per-request) | | ZeroClick | A storefront where an agent with no account buys a prepaid balance and spends it on searches and fetches. | [Prepaid credits through ZeroClick](/pay-per-request#prepaid-credits-through-zeroclick) | | Zero data retention (ZDR) | A data retention policy that Keenable sets for an organization. It follows the API key, and a fetch with a `prompt` returns `400` with `zdr_prompt_unsupported` under it. | [Zero data retention](/security#zero-data-retention) | ## MCP, agents and crawlers | Term | Meaning | Detail | | - | - | - | | MCP | The Model Context Protocol, the way agent clients such as Claude Code and Cursor discover and call tools. The Keenable MCP server at `https://api.keenable.ai/mcp` gives an agent the `search_web_pages` and `fetch_page_content` tools. | [MCP server](/mcp-server) | | Streamable HTTP | The MCP transport that the remote Keenable server speaks. In a config file it is usually `"type": "http"`, and in Cline it is `"type": "streamableHttp"`. | [Other MCP clients](/mcp-server#other-mcp-clients) | | MCP URLs | `/mcp` takes no key or an API key, `/mcp-oauth` is for clients that sign in through a browser, and `/mcp-public` publishes no OAuth discovery metadata. All three serve the same web tools. | [Which URL to use](/mcp-server#which-url-to-use) | | Local bridge | The `@keenable/mcp` package, which runs as a local stdio server and forwards calls with your API key. Clients that accept only local servers, such as Claude Desktop, need it. | [Local bridge](/mcp-server#local-bridge-with-an-api-key) | | Agent skill | The `keenable-web-search` skill: instructions and one Python script that let an agent search without an MCP client or an API key. | [Agent skill](/agent-skill) | | SELECT | A separate MCP server that needs a Keenable account. Your agent writes one read-only SQL `SELECT`, and the server returns a table built from live web pages. | [SELECT](/select) | | Result set | The stored output of a SELECT query, with an id that a later query can put in `FROM` to read the rows again without new searches. | [Result sets](/select#result-sets) | | KeenableBot | The crawler that collects public pages for the Keenable index. It follows `robots.txt`. | [Keenable crawlers](/crawlers) | | Keenable-User | The user agent of a request made for a person or agent who asked for one page, such as a live fetch. It doesn't crawl. | [Keenable crawlers](/crawlers#user-agents) | ## Monitors | Term | Meaning | Detail | | - | - | - | | Monitor | A standing watch that tells you what's new. A search monitor has a topic: Keenable checks every page it crawls against it and keeps the pages that report something new. A page monitor reads one page on a schedule and tells you when it changes in a way worth knowing. It needs an API key. | [Monitors](/products/monitors) | | Monitor result | A page a monitor kept, with the fields of a search result plus `summary`, `importance` and `matched_at`. | [Read the results](/products/monitors#read-the-results) | | `importance` | How much a result matters for the monitor's topic, from 1 to 5. A monitor doesn't accept pages under 3. | [Read the results](/products/monitors#read-the-results) | | Schedule | When a monitor runs: a `cron` expression, an `interval` such as `6h`, or `once`. Runs are at least 10 minutes apart. | [Schedules](/products/monitors#schedules) | | Run | One scheduled or triggered pass. A search monitor's run returns the results found since the previous run, most important first. A page monitor's run checks the page once and fills `changes`. | [What a run returns](/products/monitors#what-a-run-returns) | | Webhook event | A JSON body with `id`, `type`, `created_at`, `data` and `metadata` that Keenable posts to your webhook. `monitor.result.found` carries one new page minutes after it was crawled. | [Webhook events](/products/monitors#webhook-events) | | Delivery | One webhook event sent to your endpoint, with its attempts and last error. A failed delivery is retried with backoff. | [List deliveries](/api-reference/monitors/deliveries) | | Page version | One stored copy of the page a page monitor watches, kept when the page's text changed. Version 1 is the baseline. | [Changes and versions](/products/monitors#changes-and-versions) | | Webhook signature | An HMAC-SHA256 signature in the `webhook-signature` header, made with the monitor's `webhook.secret` under the Standard Webhooks scheme. Check it on the raw body before you parse it. | [Verify a webhook](/products/monitors#verify-a-webhook) | For short answers to common questions, see the [FAQ](/faq). # Choose a search mode: pro or realtime Source: https://docs.keenable.ai/guides/choose-a-search-mode How to pick pro for deeper retrieval or realtime for the fastest response, set the mode in each client, and check which mode served a call. Pick the search mode that fits your agent's time budget. Leave `mode` at `pro` for deeper retrieval, and switch to `realtime` when response time matters more than depth, such as in a voice agent that searches while the user waits. ## Parameters | Parameter | In | Type | Default | Limits | What it does | | - | - | - | - | - | - | | `mode` | Body, `/v1/search` | string | Your organization's default mode (`pro` unless changed) | One of `pro`, `realtime` | How hard to search: `pro` (default) for deeper retrieval and the best ranking, `realtime` for the fastest response. Each mode is billed as its own SKU (`search.pro`, `search.realtime`). If you leave it out, your organization's default mode applies, which is `pro` unless changed. | ## Compare the two modes | | `pro` | `realtime` | | - | - | - | | What you get | Deeper retrieval | The fastest response | | Use it for | Research, multi-step agents, answers you cite | Voice agents, chat turns with a tight latency budget | | Billed as | `search.pro` | `search.realtime` | | Works without an API key | Yes | Yes, over HTTP and the SDKs | | Filters, operators, `moderation`, `disable_cards` | Yes | Yes | Both SKUs cost the same at standard prices. See [Pricing](/pricing). ## Time both modes on your own queries This sample runs the same query in each mode and prints the mode that served the call, the number of results and the time it took. It runs with no API key: ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { Keenable } from "keenable"; async function main() { const client = new Keenable(); // keyless: no API key needed to try it const query = "current weather warnings for Lisbon"; for (const mode of ["pro", "realtime"] as const) { const start = performance.now(); const results = await client.search(query, { mode, maxResults: 3, snippetMaxLength: 200 }); const elapsedMs = performance.now() - start; console.log(`${results.mode}: ${results.length} results in ${elapsedMs.toFixed(0)} ms`); } } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import time from keenable import Keenable client = Keenable() # keyless: no API key needed to try it query = "current weather warnings for Lisbon" for mode in ("pro", "realtime"): start = time.perf_counter() results = client.search(query, mode=mode, max_results=3, snippet_max_length=200) elapsed_ms = (time.perf_counter() - start) * 1000 print(f"{results.mode}: {len(results)} results in {elapsed_ms:.0f} ms") ``` ```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} package main import ( "context" "fmt" "log" "time" "github.com/keenableai/keenable-sdk/go" ) func main() { client, err := keenable.New(nil) // keyless: no API key needed to try it if err != nil { log.Fatal(err) } defer client.Close() query := "current weather warnings for Lisbon" snippetCap := 200 for _, mode := range []string{"pro", "realtime"} { start := time.Now() results, err := client.Search(context.Background(), query, &keenable.SearchOptions{Mode: mode, MaxResults: 3, SnippetMaxLength: &snippetCap}) if err != nil { log.Fatal(err) } served := mode if results.Mode != nil { served = *results.Mode } fmt.Printf("%s: %d results in %d ms\n", served, len(results.Results), time.Since(start).Milliseconds()) } } ``` ```rust Rust theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} use std::time::Instant; use keenable::{Client, SearchOptions}; #[tokio::main] async fn main() -> Result<(), keenable::Error> { let client = Client::new()?; // keyless: no API key needed to try it let query = "current weather warnings for Lisbon"; for mode in ["pro", "realtime"] { let start = Instant::now(); let results = client .search_with( query, &SearchOptions { mode: Some(mode.into()), max_results: Some(3), snippet_max_length: Some(200), ..Default::default() }, ) .await?; let served = results.mode.as_deref().unwrap_or(mode); println!( "{}: {} results in {} ms", served, results.results.len(), start.elapsed().as_millis() ); } Ok(()) } ``` ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} for mode in pro realtime; do curl -s -w '\n%{time_total}' \ -X POST https://api.keenable.ai/v1/search/public \ -H "Content-Type: application/json" \ -H "X-Keenable-Title: My App" \ -d "{\"query\": \"current weather warnings for Lisbon\", \"mode\": \"$mode\", \"max_results\": 3, \"snippet_max_length\": 200}" | jq -rn --arg asked "$mode" 'input as $r | input as $secs | if $r.results then "\($r.mode): \($r.results | length) results in \($secs * 1000 | round) ms" else "\($asked) failed: \($r.error // $r)" end' done ``` You see one line per mode: ```text Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} pro: 3 results in ms realtime: 3 results in ms ``` Times depend on the query and on the network between your code and the API, so measure from where your agent runs. The response's `mode` field names the mode that served the call. The curl sample reads it with `jq` and prints the API's error message when a call fails. This is the body of the same curl request with `mode` set to `realtime`, `max_results` to 1 and `snippet_max_length` to 180: ```json Response · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "query": "current weather warnings for Lisbon", "mode": "realtime", "results": [ { "title": "Lisbon, Lisboa, Portugal Weather Advisories - Warnings & Watches | AccuWeather", "url": "https://accuweather.com/en/pt/lisbon/274087/weather-warnings/274087", "description": "", "snippet": "The following official weather warnings and advisories are currently in effect for Lisbon, issued by Portuguese Institute for the Sea and the Atmosphere. AccuWeather aggregates", "acquired_at": "2026-11-18T15:31:02Z" } ] } ``` ## Know which mode applies If you leave `mode` out, the mode that applies depends on the client: | Client | Mode when you leave it out | | - | - | | HTTP API | Your organization's default mode, which is `pro` unless changed | | Python, TypeScript, Go and Rust SDKs | `pro`. Each SDK sends `pro` when you don't set a mode. | | CLI | `default_search_mode` from `keenable config`, then your organization's mode, then `pro`. A `forced_search_mode` in `keenable config` overrides both `--mode` and `default_search_mode`. | | MCP server | The mode the model passes to `search_web_pages`. If the model leaves it out, the `default_search_mode` query parameter on the server URL, then your organization's default mode. On `/mcp-public`, the tool doesn't offer `mode`. | Set the mode in each language's style: `mode="realtime"` in Python, `{ mode: "realtime" }` in TypeScript, `Mode: "realtime"` in Go, `mode: Some("realtime".into())` in Rust and `--mode realtime` in the CLI. ## Voice agents A voice agent searches while the user waits for a spoken answer, so use `realtime`. In Pipecat, `KeenableWebSearch` uses `realtime` by default when you pass an API key. See [Pipecat](/integrations/pipecat#pick-a-search-mode). ## Common mistakes | Wrong | Right | Why | | - | - | - | | `"mode": "fast"` | `"mode": "realtime"` | The API returns `400` with `"mode": is not a supported search mode; use "pro" or "realtime"`. | | `"mode": "Realtime"` | `"mode": "realtime"` | Modes are lower case. The API returns `400` and asks whether you meant `realtime`. | | Leave `mode` out of an HTTP call and expect `pro` | Send `"mode": "pro"` | Without it, your organization's default mode applies. | | Expect a `mode` argument on `/mcp-public` | Use `https://api.keenable.ai/mcp` with an API key | `/mcp-public` doesn't list `mode`. See [MCP server](/mcp-server#keyless-endpoint-for-listings-and-presets). | ## API reference * [Search request](/api-reference/search#request): `mode` and every other parameter. * [Balance and usage](/credits#what-a-call-costs): how `search.pro` and `search.realtime` are reported. * [Search, then fetch](/guides/search-then-fetch): keep each turn small once you've picked a mode. # Estimate your monthly cost from search and fetch volume Source: https://docs.keenable.ai/guides/cost-at-volume How to estimate a monthly Keenable bill: add searches and fetches, subtract 100,000 free requests, multiply by $4 per 1,000, then check it with usage.credits. Work out what a month of searches and fetches costs before you ship. At standard prices, every search and every fetch costs the same \$4 per 1,000 requests, and your organization's first 100,000 requests each month are free. So the estimate is one line: add up the requests, subtract 100,000, and multiply what is left by \$0.004. ## Prices that go into the estimate These are the standard rates from [Pricing](/pricing). Your organization can have its own prices. If it does, read what each call costs from `usage.credits` (see [Check the estimate](#check-the-estimate-against-real-calls)). | Item | Standard rate | | - | - | | Free allowance with an API key | 100,000 requests a month, worth \$400. 1,000 a month if you signed up with a disposable or privacy mail domain and haven't saved a card. | | Search, in `pro` or `realtime` mode | \$4 per 1,000 requests | | Fetch, from the indexed copy or live | \$4 per 1,000 requests | | One credit in `usage.credits` | \$0.004. A \$4-per-1,000 call costs 1 credit. | | Results per search | Not billed. A search is one request whether it returns 1 result or 50. | | Failed calls and keyless calls | Not billed | A fetch with a `prompt` is billed as one `fetch`, and a fetch with `live=true` as one `fetch.live`, both at the same \$4 per 1,000. The allowance resets each month, on the day of the month your organization was activated. ## Calculate the monthly cost This function returns the monthly cost in dollars for a number of searches and fetches at standard prices. Change `free_requests` or `usd_per_1000` if your organization has its own allowance or price: ```python cost_estimate.py theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} def monthly_cost(searches: int, fetches: int, free_requests: int = 100_000, usd_per_1000: float = 4.0) -> float: billable = max(0, searches + fetches - free_requests) return billable * usd_per_1000 / 1000 # An agent that runs 4 searches and 2 fetches per task, 2,000 tasks a day, for 30 days tasks = 2_000 * 30 print(f"${monthly_cost(searches=4 * tasks, fetches=2 * tasks):,.2f}") ``` You see the monthly cost for 240,000 searches and 120,000 fetches. The first 100,000 requests are free and the other 260,000 cost \$4 per 1,000: ```text Output theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} $1,040.00 ``` ## Worked examples Each row is a 30-day month at standard prices. The last column is the average rate across the month, to compare with your [rate limit](/rate-limits) of 10 requests per second per organization by default. | Searches a month | Fetches a month | Total requests | Billable after 100,000 free | Monthly cost | Average requests per second | | - | - | - | - | - | - | | 60,000 | 30,000 | 90,000 | 0 | \$0 | 0.03 | | 240,000 | 120,000 | 360,000 | 260,000 | \$1,040 | 0.14 | | 1,000,000 | 500,000 | 1,500,000 | 1,400,000 | \$5,600 | 0.58 | | 5,000,000 | 2,000,000 | 7,000,000 | 6,900,000 | \$27,600 | 2.70 | An average rate isn't a peak rate. If your traffic comes in bursts, size it against the per-second limit, not the monthly total. See [High-volume research](/guides/high-volume-research). ## Monthly volume your rate limit allows The per-second limit also caps how many requests your organization can send in a month. A 30-day month has 2,592,000 seconds: | Rate limit | Most requests in a 30-day month | | - | - | | 10 requests per second, the default | 25,920,000 | | 25 requests per second, after \$1,000 of top-ups in 90 days | 64,800,000 | If your estimate runs close to these numbers, see [Raise your limit](/rate-limits#raise-your-limit). Prices for dedicated capacity and volume quotes are under [Plans and volume pricing](/pricing#plans-and-volume-pricing). ## Compare the ways to pay The same 360,000 requests from the example cost a different amount on each payment path. Only the API key path has a free allowance: | Way to pay | Price | Cost of 240,000 searches and 120,000 fetches | | - | - | - | | API key, free allowance then prepaid balance | \$4 per 1,000 after 100,000 free | \$1,040 | | [Pay per request](/pay-per-request) over x402 | \$0.01 per search or fetch, in USDC on Base | \$3,600 | | [ZeroClick prepaid balance](/pay-per-request#prepaid-credits-through-zeroclick) | \$4 per 1,000 searches or fetches | \$1,440 | | No API key | Free | \$0 only if traffic stays under 1,000 requests per hour per IP address for each endpoint: 240,000 searches a month fit only at a steady 333 an hour | x402 and ZeroClick calls never draw on your organization's allowance or balance. SELECT queries are priced separately and aren't in these numbers. ## Check the estimate against real calls Every keyed `/v1/search` and `/v1/fetch` response ends with a `usage` object. This request prints it for one search: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -s -X POST https://api.keenable.ai/v1/search \ -H "X-API-Key: $KEENABLE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"query": "postgres 18 release notes", "max_results": 3}' | jq .usage ``` You see the SKU that ran and what the call cost in credits: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "sku": "search.pro", "amount": 1, "credits": 1, "paid": true, "credits_remaining": 99120 } ``` Add up `credits` across a day of real traffic and multiply by \$0.004 to get what the day's traffic is worth, then by 30 for the month. Compare that with your estimate before you subtract the allowance. `paid` is `false` while the call came from the free allowance and `true` once it came from your prepaid balance. `credits_remaining` is the allowance and balance left. See [Reading usage per call](/credits#reading-usage-per-call). ## Lower the cost per task | Change | Effect on the bill | | - | - | | Answer from search snippets, and fetch only when they fall short | Each fetch you skip saves one request. See [Search, then fetch](/guides/search-then-fetch). | | Ask for more results in one search instead of running several searches | `max_results` up to 50 costs the same one request. See [Result size](/guides/result-size). | ## Avoid a 402 at month end If the allowance and your prepaid balance both run out, `/v1/search` and `/v1/fetch` return `402` with the code `insufficient_credits` until you top up or the allowance resets. Turn on [auto top-up](/auto-top-up) so a busy month doesn't stop your agent. ## Related pages * [Pricing](/pricing): every rate, SKU and payment path. * [Balance and usage](/credits): the allowance, the balance and the `usage` object. * [Rate limits](/rate-limits): per-second limits and how to raise them. # Create a web monitor with a schedule and sources Source: https://docs.keenable.ai/guides/create-a-monitor How to create a Keenable monitor: write the topic, limit it to the sites you trust, set a cron schedule, tag it with metadata and retry safely. Create a monitor that watches the web for one topic and hands you the new pages on a schedule you pick. You describe the topic once, limit it to the sources you trust, and get a digest of new results at each run. For what a monitor is and every way to read it, see [Monitors](/products/monitors). You need an [API key](/api-keys). Monitors has no keyless tier. An agent that signed in with AgentID creates its own key. Otherwise a person approves one login: have the agent run `keenable login` and show you the link and code, then approve it in the console. See [Get a key from an agent or the CLI](/api-keys#get-a-key-from-an-agent-or-the-cli). After that, the agent uses the saved key without you. ## Request fields A create request is a JSON body sent to `POST /v1/monitors`. Only `search.query` is required: | Field | What it sets | Rules | | - | - | - | | `search.query` | The topic, in plain words | 1 to 2,000 characters | | `search.max_results` | How many results a run returns at most | 1 to 100, default 10 | | `search.include_domains` | Keep only pages from these hosts | A list of hosts, such as `["euractiv.com"]` | | `search.exclude_domains` | Drop pages from these hosts | A list of hosts | | `search.content.text` | Add each result's page text, its first 6,000 characters | `true` or `false` | | `name` | A label for you and your team | Up to 200 characters | | `schedule` | When runs happen: `cron`, `interval` or `once` | Runs at least 10 minutes apart. See [Schedules](/products/monitors#schedules) | | `webhook` | Where events go, and which events | A public HTTPS URL. The create response carries the signing secret. See [Receive monitor webhooks](/guides/monitor-webhooks) | | `metadata` | Your own string tags, sent back in every webhook event | At most 50 keys | | `output_schema` | A JSON Schema for a summary of each run | See [Structured outputs](/products/monitors#structured-outputs) | | `Idempotency-Key` header | Makes a retried create return the first monitor | Kept for 24 hours | ## Create a scheduled monitor This sample creates a monitor for EU AI Act enforcement news from two sites. It runs at 9:00 Paris time on weekdays, returns up to 20 results per run, and carries a `team` tag. It prints the monitor's ID, its status and its next three run times: ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { Keenable } from "keenable"; async function main() { // reads KEENABLE_API_KEY from the environment const client = new Keenable(); const monitor = await client.monitors.create({ name: "EU AI Act enforcement", search: { query: "EU AI Act enforcement actions and fines", maxResults: 20, includeDomains: ["euractiv.com", "reuters.com"], }, schedule: { type: "cron", value: "0 9 * * 1-5", timezone: "Europe/Paris" }, metadata: { team: "policy" }, idempotencyKey: "eu-ai-act-enforcement-v1", }); console.log(monitor.id, monitor.status); for (const runAt of monitor.upcomingRuns) { console.log(runAt); } } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from keenable import Keenable # reads KEENABLE_API_KEY from the environment client = Keenable() monitor = client.monitors.create( name="EU AI Act enforcement", search={ "query": "EU AI Act enforcement actions and fines", "max_results": 20, "include_domains": ["euractiv.com", "reuters.com"], }, schedule={"type": "cron", "value": "0 9 * * 1-5", "timezone": "Europe/Paris"}, metadata={"team": "policy"}, idempotency_key="eu-ai-act-enforcement-v1", ) print(monitor.id, monitor.status) for run_at in monitor.upcoming_runs: print(run_at) ``` ```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} package main import ( "context" "fmt" "log" "github.com/keenableai/keenable-sdk/go" ) func main() { // reads KEENABLE_API_KEY from the environment client, err := keenable.New(nil) if err != nil { log.Fatal(err) } defer client.Close() monitor, err := client.Monitors.Create(context.Background(), &keenable.MonitorCreateParams{ Name: "EU AI Act enforcement", Search: keenable.MonitorSearchParams{ Query: "EU AI Act enforcement actions and fines", MaxResults: 20, IncludeDomains: []string{"euractiv.com", "reuters.com"}, }, Schedule: &keenable.MonitorScheduleParams{Type: "cron", Value: "0 9 * * 1-5", Timezone: "Europe/Paris"}, Metadata: map[string]string{"team": "policy"}, IdempotencyKey: "eu-ai-act-enforcement-v1", }) if err != nil { log.Fatal(err) } fmt.Println(monitor.ID, monitor.Status) for _, runAt := range monitor.UpcomingRuns { fmt.Println(runAt) } } ``` ```rust Rust theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} use std::collections::HashMap; use keenable::{Client, MonitorCreateParams, MonitorScheduleParams, MonitorSearchParams}; #[tokio::main] async fn main() -> Result<(), keenable::Error> { // reads KEENABLE_API_KEY from the environment let client = Client::new()?; let monitor = client .monitors() .create(&MonitorCreateParams { name: Some("EU AI Act enforcement".into()), search: MonitorSearchParams { query: "EU AI Act enforcement actions and fines".into(), max_results: Some(20), include_domains: Some(vec!["euractiv.com".into(), "reuters.com".into()]), ..Default::default() }, schedule: Some(MonitorScheduleParams { schedule_type: "cron".into(), value: Some("0 9 * * 1-5".into()), timezone: Some("Europe/Paris".into()), }), metadata: Some(HashMap::from([("team".to_string(), "policy".to_string())])), idempotency_key: Some("eu-ai-act-enforcement-v1".into()), ..Default::default() }) .await?; println!("{} {}", monitor.id, monitor.status); for run_at in &monitor.upcoming_runs { println!("{run_at}"); } Ok(()) } ``` ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST https://api.keenable.ai/v1/monitors \ -H "X-API-Key: $KEENABLE_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: eu-ai-act-enforcement-v1" \ -d '{ "name": "EU AI Act enforcement", "search": { "query": "EU AI Act enforcement actions and fines", "max_results": 20, "include_domains": ["euractiv.com", "reuters.com"] }, "schedule": {"type": "cron", "value": "0 9 * * 1-5", "timezone": "Europe/Paris"}, "metadata": {"team": "policy"} }' ``` The SDK tabs need SDK 0.2.0 or later, the first version with Monitors. If your package manager doesn't offer 0.2.0 yet, use the curl tab. You see the ID, `active` and three run times in UTC. 9:00 in Paris is 08:00 UTC in winter: ```text Example output theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} mon_3kq9z2c8f1a04b7d9e6f5a21 active 2026-11-20T08:00:00.000Z 2026-11-23T08:00:00.000Z 2026-11-24T08:00:00.000Z ``` The create call takes a few seconds. The monitor starts empty and matches only pages crawled after you create it. Each run returns the results found since the previous run. To read them, see [Read monitor results](/guides/read-monitor-results). ## Check that a new monitor works A new monitor has no results for minutes to hours, so an empty list doesn't mean it is broken. To confirm the setup right away: 1. Check that the create response has `status: "active"` and a list of `upcoming_runs`. If the schedule was refused, the API returns `400` instead. 2. [Trigger a run](/api-reference/monitors/trigger) and read it with [Get a run](/api-reference/monitors/run). A run that found nothing new still completes, with no results. 3. If the monitor has a webhook, send it a signed sample event. See [Test your handler locally](/guides/monitor-webhooks#test-your-handler-locally). Then come back for results after the monitor has had time to match new pages. ## Reuse a monitor before you create one Every API key in your organization sees the same monitors. Before you create a monitor, list the ones whose name contains your topic. This request returns active monitors with `AI Act` in their name: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -G https://api.keenable.ai/v1/monitors \ -H "X-API-Key: $KEENABLE_API_KEY" \ --data-urlencode "name=AI Act" \ --data-urlencode "status=active" ``` You get `{"data": [...], "has_more": false, "next_cursor": null}`. If `data` holds a monitor on your topic, use its `id` instead of creating another. To find monitors by tag, pass `metadata[team]=policy` instead of `name`. See [List monitors](/api-reference/monitors/list). ## Retry a create safely A create can time out after the monitor was made. Send the same `Idempotency-Key` header when you retry, so the retry returns the first monitor instead of creating a second one: | You send | Within 24 hours of the first call, you get | | - | - | | The same key and the same body | `201` with the monitor the first call created, its `webhook.secret` and the header `Idempotent-Replayed: true` | | The same key and a different body | `409` with `idempotency_conflict` | | A new key, or no key | A new monitor | Pick one key per monitor you mean to create, such as `eu-ai-act-enforcement-v1`. The SDKs send the key from `idempotency_key` (`idempotencyKey` in TypeScript, `IdempotencyKey` in Go). ## Change a monitor after you create it Send only the fields that change to [Update a monitor](/api-reference/monitors/update). The API merges `search` and `webhook` into the stored values. This request moves the run to 7:00 Paris time and keeps the query and sites: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X PATCH https://api.keenable.ai/v1/monitors/mon_3kq9z2c8f1a04b7d9e6f5a21 \ -H "X-API-Key: $KEENABLE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"schedule": {"type": "cron", "value": "0 7 * * 1-5", "timezone": "Europe/Paris"}}' ``` The response is the monitor with new `upcoming_runs`. To stop runs without losing results, send `{"status": "paused"}`. `{"schedule": null}` removes the schedule, and the monitor then runs only when you [trigger a run](/api-reference/monitors/trigger). ## Common mistakes | Wrong | Right | Why | | - | - | - | | `"query": "AI Act AND (fine OR penalty)"` | `"query": "EU AI Act enforcement actions and fines"` | The monitor reads the query as a topic, not as search operators. See [Write a good query](/products/monitors#write-a-good-query). | | `"value": "*/5 * * * *"` | `"value": "*/10 * * * *"` or slower | The API returns `400` with `a cron schedule may run at most once every 10 minutes`. | | `{"type": "interval", "value": "6h", "timezone": "Europe/Paris"}` | `{"type": "interval", "value": "6h"}` | The API returns `400` with `schedule.timezone applies only to a cron schedule`. | | `"url": "http://localhost:3000/hook"` | A public `https://` URL | The API returns `400` with `webhook.url must be a public HTTPS address`. | | `"search": {"query": "...", "published_after": "7d"}` | Leave the field out | A monitor accepts only new pages already. Any search field other than `query`, `max_results`, `include_domains`, `exclude_domains` and `content.text` returns `400` with `monitor_option_not_supported`. | | Creating the monitor, then reading `webhook.secret` later | Store `webhook.secret` from the create response | Only the create response carries the secret, or an update that adds a webhook to a monitor that had none. | ## API reference * [Create a monitor](/api-reference/monitors/create): every field and status code. * [Get a monitor](/api-reference/monitors/get): check `upcoming_runs` and the stored schedule. * [Read monitor results](/guides/read-monitor-results): poll results, read runs or let your agent read them. * [Receive monitor webhooks](/guides/monitor-webhooks): get each new page at your endpoint. # Look up current library docs from a coding agent Source: https://docs.keenable.ai/guides/docs-lookup-for-coding-agents How to give a coding agent current library docs and changelogs: connect the MCP server, add an AGENTS.md rule, search one docs site, fetch with a prompt. Give your coding agent the docs for the library version you run, instead of what it remembers from training. Connect the Keenable MCP server, add a rule that tells the agent to check the library's own docs before it writes code, and the agent searches one docs site with `site`, then reads only the part of the page it needs with a fetch `prompt`. ## What to send for each lookup Each docs task maps to one tool call and one or two parameters: | Task | Tool | What to send | | - | - | - | | Find the docs page for a function or setting | `search_web_pages` | `site` set to the docs host and version path, such as `docs.pydantic.dev/latest` | | Read a signature, a config key or an example | `fetch_page_content` | `prompt` naming the function or key, and `max_chars` to cap the answer | | Find what changed in a release | `search_web_pages` | `site` set to the repository, such as `github.com/pydantic/pydantic`, and `published_after` such as `180d` | | Search for an exact error message | `search_web_pages` | The error string in double quotes inside `query`. See [Search operators](/guides/search-operators). | | Read a page that changed today | `fetch_page_content` | `max_age_hours: 0`. See [Live fetch](/guides/live-fetch). | The `site` value covers subdomains, and a path narrows it further, so `github.com/pydantic/pydantic` searches one repository. See [Search request](/api-reference/search#request) for the full `site` rules and [Filter by domain](/guides/filter-by-domain) for leaving hosts out. ## Connect the MCP server The [Keenable CLI](/cli) adds the server to every coding agent it finds among Claude Code, Cursor, Devin Desktop, Codex and OpenCode: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} keenable configure-mcp --all ``` To add it to Claude Code by hand, run this command. It needs no API key: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} claude mcp add --transport http --scope user keenable https://api.keenable.ai/mcp ``` Without a key, the agent's calls share the keyless limit of 1,000 requests per hour per IP address. Add `--header "X-API-Key: keen_"` at the end of the command to lift the hourly cap. [MCP server](/mcp-server#installation) has the config for Codex, Cursor and other clients. ## Tell the agent to check the docs An agent that has the tools still answers from memory unless you tell it when to look. Add this block to `AGENTS.md` at the root of your repository. Codex and Cursor read `AGENTS.md`, and Codex also reads `~/.codex/AGENTS.md` for every project: ```markdown AGENTS.md theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} ## Library docs - Before you write or change code that calls a third-party library, check its current docs with Keenable. Don't rely on memory for signatures, config keys or defaults. - Find the page with `search_web_pages`. Set `site` to the library's docs host, with the version path if the docs have one, for example `docs.pydantic.dev/latest`. - Read the page with `fetch_page_content`. Pass a `prompt` that names the function or setting you need, so you get that part instead of the whole page. - For upgrades and breaking changes, search the repository with `site` set to `github.com//` and `published_after` set to `180d`. - Put the URL of the docs page you used in your reply or the commit message. ``` Claude Code, from v2.1.277, reads `AGENTS.md` only when the repository has no `CLAUDE.md`. If it has one, add a line with `@AGENTS.md` to `CLAUDE.md` so Claude Code imports the block, or paste the block into `CLAUDE.md`. For every project on your machine, put the block in `~/.claude/CLAUDE.md`. If your agent also has a built-in web search, turn it off so the rule isn't split between two tools. See [Claude](/integrations/claude#turn-off-the-built-in-search), [Codex](/integrations/codex) and [Cursor](/integrations/cursor). ## Search one docs site, then read the answer The agent makes the same two calls as this sample. The sample searches the current Pydantic docs, takes the top result, and fetches only the example it needs. The curl tab runs with no API key. The SDK tabs need one, because the SDKs' `fetch` calls [`POST /v1/fetch`](/api-reference/fetch-post): ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { Keenable } from "keenable"; async function main() { const client = new Keenable(); // reads KEENABLE_API_KEY from the environment // 1. Search only the current docs of one library const results = await client.search("how to validate one field against another with a model validator", { site: "docs.pydantic.dev/latest", // the /latest path skips old versioned docs maxResults: 3, }); const top = results.results[0]; console.log(`Top result: ${top.title} (${top.url})`); // 2. Read only the part of that page you need const { results: pages } = await client.fetch([top.url], { prompt: "Show how a model validator with mode='after' checks one field against another. Answer with one short code block and one sentence.", maxChars: 800, }); console.log(pages[0].content); } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from keenable import Keenable client = Keenable() # reads KEENABLE_API_KEY from the environment # 1. Search only the current docs of one library results = client.search( "how to validate one field against another with a model validator", site="docs.pydantic.dev/latest", # the /latest path skips old versioned docs max_results=3, ) top = results[0] print(f"Top result: {top.title} ({top.url})") # 2. Read only the part of that page you need page = client.fetch( [top.url], prompt="Show how a model validator with mode='after' checks one field against another. Answer with one short code block and one sentence.", max_chars=800, ).results[0] print(page.content) ``` ```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} package main import ( "context" "fmt" "log" "github.com/keenableai/keenable-sdk/go" ) func main() { ctx := context.Background() client, err := keenable.New(nil) // reads KEENABLE_API_KEY from the environment if err != nil { log.Fatal(err) } defer client.Close() // 1. Search only the current docs of one library results, err := client.Search(ctx, "how to validate one field against another with a model validator", &keenable.SearchOptions{ Site: "docs.pydantic.dev/latest", // the /latest path skips old versioned docs MaxResults: 3, }) if err != nil { log.Fatal(err) } if len(results.Results) == 0 { log.Fatal("no results") } top := results.Results[0] fmt.Printf("Top result: %s (%s)\n", top.Title, top.URL) // 2. Read only the part of that page you need resp, err := client.FetchWithOptions(ctx, []string{top.URL}, &keenable.FetchOptions{ Prompt: "Show how a model validator with mode='after' checks one field against another. Answer with one short code block and one sentence.", MaxChars: 800, }) if err != nil { log.Fatal(err) } fmt.Println(resp.Results[0].Content) } ``` ```rust Rust theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} use keenable::{Client, FetchOptions, SearchOptions}; #[tokio::main] async fn main() -> Result<(), keenable::Error> { let client = Client::new()?; // reads KEENABLE_API_KEY from the environment // 1. Search only the current docs of one library let results = client .search_with( "how to validate one field against another with a model validator", &SearchOptions { site: Some("docs.pydantic.dev/latest".into()), // the /latest path skips old versioned docs max_results: Some(3), ..Default::default() }, ) .await?; let top = &results.results[0]; println!("Top result: {} ({})", top.title, top.url); // 2. Read only the part of that page you need let response = client .fetch_with( [&top.url], &FetchOptions { prompt: Some( "Show how a model validator with mode='after' checks one field against another. Answer with one short code block and one sentence." .into(), ), max_chars: Some(800), ..Default::default() }, ) .await?; println!("{}", response.results[0].content); Ok(()) } ``` ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} # 1. Search only the current docs of one library curl -X POST https://api.keenable.ai/v1/search/public \ -H "Content-Type: application/json" \ -H "X-Keenable-Title: My App" \ -d '{ "query": "how to validate one field against another with a model validator", "site": "docs.pydantic.dev/latest", "max_results": 3 }' # 2. Fetch the URL you picked, and only the part you need curl -G https://api.keenable.ai/v1/fetch/public \ -H "X-Keenable-Title: My App" \ --data-urlencode "url=https://docs.pydantic.dev/latest/examples/custom_validators" \ --data-urlencode "prompt=Show how a model validator with mode='after' checks one field against another. Answer with one short code block and one sentence." \ --data-urlencode "max_chars=800" ``` You see the page the search picked, then the code example and one sentence from that page. This run was made on 19 November 2026 with the Python sample: ````text Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} Top result: Custom Validators (https://docs.pydantic.dev/latest/examples/custom_validators) ```python class Organization(BaseModel): forbidden_passwords: list[str] users: list[User] @model_validator(mode='after') def validate_user_passwords(self) -> Self: for user in self.users: current_pw = user.password if current_pw in self.forbidden_passwords: raise ValueError( f'Password {current_pw} is forbidden. Please choose another password for user {user.username}.' ) return self ``` A model validator with `mode='after'` can check fields against one another by iterating through the model's attributes (such as checking `user.password` against `self.forbidden_passwords`) after standard validation has completed. ```` The prompt returns under 800 characters, the `max_chars` cap, instead of the whole page. That keeps the agent's context free for your code. See [Fetch with a prompt](/guides/fetch-with-prompt) for prompts that return parseable output. ## Pin the docs version Many docs sites keep a copy for every release. If `site` names only the host, old versions can rank first. On 19 November 2026, a search for `model_validator` with `site` set to `docs.pydantic.dev` returned only pages under version paths such as `/2.8/` in its top 3. With `docs.pydantic.dev/latest`, every result came from the current docs. | Docs layout | `site` value | | - | - | | A `latest` or `stable` path for the current release | The host and that path, such as `docs.pydantic.dev/latest` | | A path per version | The host and the version you run, read from your lockfile | | One copy, no version paths | The host alone | | Release notes on GitHub | `github.com//` with `published_after` | ## Common mistakes | Wrong | Right | Why | | - | - | - | | `site` set to the docs host when the site keeps old versions | The host plus the version path | Old versioned pages can rank above the current one. | | Fetch the whole docs page into context | Fetch with a `prompt` and `max_chars` | A reference page can run to tens of thousands of characters. See [Long pages](/guides/long-pages). | | A rule that says only "use Keenable for the web" | A rule that says when to check docs and which `site` to use | The agent decides that it knows a library and skips the lookup. | | The rule in `AGENTS.md` while the repository also has a `CLAUDE.md` | Import it with `@AGENTS.md` in `CLAUDE.md` | Claude Code reads `CLAUDE.md` instead of `AGENTS.md` when both exist. | | `published_after` on a docs site search | `published_after` on a repository or blog search | `published_after` leaves out every page with no known publish date, and docs pages often have none. See [Filter by date](/guides/filter-by-date#publish-date-or-index-date). | ## Verify Start a new session in your repository and ask the agent to change code that uses a library, such as "Add a model validator that checks `end` is after `start`." The agent should call `search_web_pages` with `site` set to the docs host before it edits the file, and name the docs URL in its reply. ## API reference * [MCP server tools](/mcp-server#available-tools): every `search_web_pages` and `fetch_page_content` argument. * [Search request](/api-reference/search#request): `site` and `published_after` over HTTP. * [Agent skill](/agent-skill): search from a shell script when the agent has no MCP client. # Evaluate search APIs on your own queries Source: https://docs.keenable.ai/guides/evaluate-search-apis Compare web search APIs fairly: build a gold set, run the same queries with equal settings, judge results blind and avoid the pitfalls that skew scores. Find out which search API fits your agent by running your own queries through each provider with the same settings. You build a gold set, run a harness that records every result, judge the results blind and compare the scores. For public numbers, see [Benchmarks](/benchmarks). Its NEEDLE section follows the same rules as this guide. ## Build a gold set Take queries from your agent's logs, in the words your agent sends. A query you write by hand for the test tells you less about your agent than one it sent last week. Each line of `gold.jsonl` is one query: ```json gold.jsonl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} {"id": "q1", "query": "asyncio TaskGroup reference in the Python standard library docs", "gold_urls": ["https://docs.python.org/3/library/asyncio-task.html", "https://docs.python.org/3.12/library/asyncio-task.html"]} {"id": "q2", "query": "RFC that defines HTTP semantics and status codes", "gold_urls": ["https://www.rfc-editor.org/rfc/rfc9110", "https://httpwg.org/specs/rfc9110.html"]} {"id": "q3", "query": "latest news on EU AI Act enforcement", "published_after": "7d"} ``` | Field | Required | What it holds | | - | - | - | | `id` | Yes | A stable id, so you can join results from different runs and providers | | `query` | Yes | The query text, sent unchanged to every provider | | `gold_urls` | No | Every URL that answers the query. Queries with gold URLs are scored without a judge. | | `published_after` | No | A recency bound for news queries, such as `7d`. Send the same bound to every provider. | Mix two kinds of query. A known-item query has an answer page, so you list it in `gold_urls` and score recall with no judge. An open query, such as news, has many good answers, so an LLM judge rates the results. ## Run the harness This harness sends every query in `gold.jsonl` to Keenable with fixed settings and writes each result to `keenable.results.jsonl`. Install the SDK with `pip install keenable` or `npm install keenable`, then run `python eval_keenable.py gold.jsonl` or `npx tsx eval-keenable.ts gold.jsonl`: ```typescript eval-keenable.ts theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { appendFileSync, readFileSync, writeFileSync } from "node:fs"; import { Keenable, KeenableRateLimitError } from "keenable"; const K = 10; // the same max_results for every provider const SNIPPET_CHARS = 2000; // the same text budget per result for every provider interface GoldItem { id: string; query: string; gold_urls?: string[]; published_after?: string; } interface Row { id: string; query: string; latency_ms: number; results: { rank: number; url: string; title: string; snippet: string; published_at: string | null }[]; first_hit?: number | null; } const client = new Keenable(); // reads KEENABLE_API_KEY; without it, keyless limits apply function normalize(url: string): string { let out = url.split("#")[0].replace(/\/+$/, "").toLowerCase(); for (const prefix of ["https://", "http://", "www."]) { if (out.startsWith(prefix)) out = out.slice(prefix.length); } return out; } async function run(item: GoldItem): Promise { const start = performance.now(); const response = await client.search(item.query, { maxResults: K, snippetMaxLength: SNIPPET_CHARS, publishedAfter: item.published_after, }); const latency_ms = Math.round(performance.now() - start); const results = response.results.map((r, i) => ({ rank: i + 1, url: r.url, title: r.title, snippet: r.snippet, published_at: r.publishedAt ?? null, })); const row: Row = { id: item.id, query: item.query, latency_ms, results }; if (item.gold_urls?.length) { const gold = new Set(item.gold_urls.map(normalize)); row.first_hit = results.find((r) => gold.has(normalize(r.url)))?.rank ?? null; } return row; } async function main() { const goldSet: GoldItem[] = readFileSync(process.argv[2], "utf8") .split("\n") .filter((line) => line.trim()) .map((line) => JSON.parse(line)); await client.search(goldSet[0].query, { maxResults: 1 }); // warm-up, not timed const rows: Row[] = []; let dropped = 0; writeFileSync("keenable.results.jsonl", ""); for (const item of goldSet) { try { const row = await run(item); rows.push(row); appendFileSync("keenable.results.jsonl", JSON.stringify(row) + "\n"); // saved as it goes } catch (err) { if (!(err instanceof KeenableRateLimitError)) throw err; dropped++; // a 429 is not a miss: leave the query out of the scores } } if (dropped) console.log(`dropped ${dropped} rate-limited queries`); const ranks = rows.filter((r) => r.first_hit !== undefined).map((r) => r.first_hit ?? null); if (ranks.length) { const recall5 = ranks.filter((r) => r !== null && r <= 5).length / ranks.length; const mrr = ranks.reduce((sum, r) => sum + (r ? 1 / r : 0), 0) / ranks.length; console.log(`recall@5 ${recall5.toFixed(2)}`); console.log(`MRR@${K} ${mrr.toFixed(2)}`); } const latencies = rows.map((r) => r.latency_ms).sort((a, b) => a - b); const mid = Math.floor(latencies.length / 2); const p50 = latencies.length % 2 ? latencies[mid] : (latencies[mid - 1] + latencies[mid]) / 2; console.log(`latency p50 ${p50} ms over ${latencies.length} searches`); } main(); ``` ```python eval_keenable.py theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import json import statistics import sys import time from keenable import Keenable, KeenableRateLimitError K = 10 # the same max_results for every provider SNIPPET_CHARS = 2000 # the same text budget per result for every provider client = Keenable() # reads KEENABLE_API_KEY; without it, keyless limits apply def normalize(url): url = url.split("#")[0].rstrip("/").lower() for prefix in ("https://", "http://", "www."): url = url.removeprefix(prefix) return url def run(item): start = time.perf_counter() response = client.search( item["query"], max_results=K, snippet_max_length=SNIPPET_CHARS, published_after=item.get("published_after"), ) latency_ms = round((time.perf_counter() - start) * 1000) results = [ {"rank": i + 1, "url": r.url, "title": r.title, "snippet": r.snippet, "published_at": r.published_at} for i, r in enumerate(response.results) ] return latency_ms, results def first_hit(results, gold_urls): gold = {normalize(u) for u in gold_urls} return next((r["rank"] for r in results if normalize(r["url"]) in gold), None) with open(sys.argv[1]) as f: gold_set = [json.loads(line) for line in f if line.strip()] client.search(gold_set[0]["query"], max_results=1) # warm-up, not timed latencies, ranks, dropped = [], [], 0 with open("keenable.results.jsonl", "w") as out: for item in gold_set: try: latency_ms, results = run(item) except KeenableRateLimitError: dropped += 1 # a 429 is not a miss: leave the query out of the scores continue latencies.append(latency_ms) row = {"id": item["id"], "query": item["query"], "latency_ms": latency_ms, "results": results} if item.get("gold_urls"): row["first_hit"] = first_hit(results, item["gold_urls"]) ranks.append(row["first_hit"]) out.write(json.dumps(row) + "\n") # saved as it goes out.flush() if dropped: print(f"dropped {dropped} rate-limited queries") if ranks: print(f"recall@5 {sum(1 for r in ranks if r and r <= 5) / len(ranks):.2f}") print(f"MRR@{K} {sum(1 / r for r in ranks if r) / len(ranks):.2f}") print(f"latency p50 {statistics.median(latencies)} ms over {len(latencies)} searches") ``` You see recall\@5 and MRR\@10 over the queries that have `gold_urls`, then the median latency: ```text Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} recall@5 0.50 MRR@10 0.50 latency p50 247 ms over 3 searches ``` Both harnesses work with the published SDKs and run without an API key. Write the same `run` function for each provider you compare. Keep `K`, the text budget and the query text the same, and write each provider's results to its own file. These settings keep the comparison fair: | Setting | Keenable parameter | Keep it equal because | | - | - | - | | Results per query | `max_results`, 1 to 50, default 10 | A provider that returns more results gets more chances at a hit | | Text per result | `snippet_max_length`, 180 to 10,000 characters | A judge rates a long snippet higher than a short one with the same page behind it | | Recency | `published_after` | A news query without a bound returns older pages from every provider | | Mode | `mode`: `pro` (default) or `realtime` | The modes trade depth for speed. Score each mode as its own entry. | | Cards | `disable_cards: true` | Cards are results Keenable writes for prices, exchange rates or company facts. Turn them off to compare web pages only. | In Python, pass `mode="realtime"` or `disable_cards=True`. In TypeScript, pass `mode: "realtime"` or `disableCards: true`; both need TypeScript SDK 0.1.5 or later, so check `npm view keenable version` first. See [Search](/products/search#key-parameters) for every parameter. ## Judge the results Open queries need a judge. Give an LLM one result at a time with this prompt, and fill the placeholders from the results file. When `published_at` is null, write `unknown`: ```text Judge prompt theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} You rate one web search result for one query. Today is {today}. Query: {query} Result title: {title} Result URL: {url} Published: {published_at} Result text: {snippet} Rate how well this result meets the need behind the query, using only the title, URL and text above. Do not guess what the full page says. 4: fully meets the need; a user would stop here 3: highly useful; answers most of the need 2: somewhat useful; related but incomplete or partly outdated 1: barely related 0: unrelated, spam, broken or outdated for a time-sensitive query Reply with JSON only: {"rating": <0-4>, "reason": ""} ``` Map each rating to a gain and score nDCG\@5 for each provider: | Rating | Gain | | - | - | | 4 | 1.0 | | 3 | 0.667 | | 2 | 0.117 | | 1 or 0 | 0 | These are the same gains as NEEDLE, the open benchmark we run. NEEDLE also penalizes redundant results, so its nDCG can come out lower; see `src/needle/shared/metrics.py`. For the ideal ranking, pool every provider's results for the query, keep each URL once with its best rating and sort by rating. A provider that returns the best results the whole field found then scores 1. * Remove provider names from what the judge sees, and shuffle the order of providers. * Judge each distinct URL, title and snippet once per query, and reuse that rating when another provider returns the same result. * Use the same judge model and prompt for every provider. * Read a sample of judgements yourself before you trust the totals. ## Common pitfalls | Pitfall | What goes wrong | Fix | | - | - | - | | Unequal `max_results` | Default result counts differ between providers, and the one returning more wins on recall | Set the same count on every provider. Keenable's default is 10. | | No recency bound on news | Without a bound, news queries return older coverage and the judge marks it outdated | Send `published_after`, such as `7d`, on time-sensitive queries. It also leaves out pages with no known publish date. | | `query_time` used for recency | `query_time` searches the web as it stood at that moment. It sets no lower bound, so newer pages are excluded and older ones stay. | Use `published_after` for recency | | Reworded queries | Tuning the wording for one provider measures your rewrite, not the provider | Send the same query text to every provider. Keenable takes operators such as `site:` in `query`, so translate them only where a provider needs a parameter instead. | | Keyless rate limits | Keenable allows 1,000 keyless requests per hour per IP address, and a large gold set reaches that cap. Further calls return `429` with `public_rate_limit_hourly`. | Send an [API key](/api-keys): your organization gets 10 requests per second and no hourly cap. See [Rate limits](/rate-limits). | | Rate-limit errors scored as misses | A `429` from your own account counts as a zero for the provider, though the search never ran | Retry after `Retry-After`, or drop the query from that provider's mean and report how many you dropped, as the harness does. Score timeouts and server errors as zero. | | Unequal text budget | A provider that returns more text per result gives the judge more evidence | Cap every provider's snippet at the same length before judging | | Timing the first call | The first request pays for connection setup | Send a warm-up call first, as the harness does, and keep one request in flight per provider | | One gold URL per query | The same page lives at several URLs, such as a versioned docs path, and a correct result counts as a miss | List every URL that answers the query in `gold_urls` | | Reading `description` | On Keenable, `description` is deprecated and always empty | Read page text from `snippet`. See [Versioning](/versioning). | ## Next steps * [Benchmarks](/benchmarks): Keenable's speed on Artificial Analysis and the open NEEDLE data. * [Search API reference](/api-reference/search): every request parameter and response field. * [Migrate to Keenable](/migrate): map another provider's parameters to Keenable's. * [Errors](/errors): what each status code means and how to fix it. # Extract part of a web page with a fetch prompt Source: https://docs.keenable.ai/guides/fetch-with-prompt How to pass a prompt to fetch so content holds only the facts you asked for, write prompts that return parseable output, and handle the 2,000-character limit. Get only the facts you need from a page, in the shape your code expects. Add `prompt` to a fetch: a model reads the page, and `content` holds its answer instead of the page's markdown. ## Parameters | Parameter | In | Type | Default | Limits | What it does | | - | - | - | - | - | - | | `url` | Query, `/v1/fetch` | string | Required | None | The page to read, as an absolute `http` or `https` URL. URL-encode it when it has its own query string. | | `prompt` | Query, `/v1/fetch` | string | None | At most 2,000 characters | An instruction for extracting part of the page, at most 2000 characters. When set, a model reads the page and `content` holds only its answer instead of the whole page. | | `max_chars` | Query, `/v1/fetch` | integer | `50000` | At least 1 | Maximum number of characters of `content`, counted in Unicode code points. Longer content is cut so that `content`, including a trailing `...`, is never longer than this, and `truncated` is `true`. | ## Extract a table from a page This sample fetches the PostgreSQL versioning policy page and asks for each supported version with its release dates, one line each. The curl tab runs with no API key. The SDK tabs need one, because the SDKs' `fetch` calls [`POST /v1/fetch`](/api-reference/fetch-post): ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { Keenable } from "keenable"; async function main() { const client = new Keenable(); // reads KEENABLE_API_KEY from the environment const { results } = await client.fetch(["https://www.postgresql.org/support/versioning/"], { prompt: "List every supported major version with its first release date and " + "final release date, one line each as: version | first release | final release", maxChars: 1000, }); console.log(results[0].content); } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from keenable import Keenable client = Keenable() # reads KEENABLE_API_KEY from the environment page = client.fetch( ["https://www.postgresql.org/support/versioning/"], prompt=( "List every supported major version with its first release date and " "final release date, one line each as: version | first release | final release" ), max_chars=1000, ).results[0] print(page.content) ``` ```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} package main import ( "context" "fmt" "log" "github.com/keenableai/keenable-sdk/go" ) func main() { client, err := keenable.New(nil) // reads KEENABLE_API_KEY from the environment if err != nil { log.Fatal(err) } defer client.Close() resp, err := client.FetchWithOptions(context.Background(), []string{"https://www.postgresql.org/support/versioning/"}, &keenable.FetchOptions{ Prompt: "List every supported major version with its first release date and " + "final release date, one line each as: version | first release | final release", MaxChars: 1000, }) if err != nil { log.Fatal(err) } fmt.Println(resp.Results[0].Content) } ``` ```rust Rust theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} use keenable::{Client, FetchOptions}; #[tokio::main] async fn main() -> Result<(), keenable::Error> { let client = Client::new()?; // reads KEENABLE_API_KEY from the environment let response = client .fetch_with( ["https://www.postgresql.org/support/versioning/"], &FetchOptions { prompt: Some( "List every supported major version with its first release date and \ final release date, one line each as: version | first release | final release" .into(), ), max_chars: Some(1000), ..Default::default() }, ) .await?; println!("{}", response.results[0].content); Ok(()) } ``` ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -G https://api.keenable.ai/v1/fetch/public \ -H "X-Keenable-Title: My App" \ --data-urlencode "url=https://www.postgresql.org/support/versioning/" \ --data-urlencode "prompt=List every supported major version with its first release date and final release date, one line each as: version | first release | final release" \ --data-urlencode "max_chars=1000" ``` You see one line per supported version, in the format the prompt asked for. This run was made on 19 November 2026: ```text Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} 18 | September 25, 2025 | November 14, 2030 17 | September 26, 2024 | November 8, 2029 16 | September 14, 2023 | November 9, 2028 15 | October 13, 2022 | November 11, 2027 14 | September 30, 2021 | November 12, 2026 ``` The response keeps the page's `url` and `title`, so you can cite the source. `total_chars` is the length of the answer, not of the page: ```json Response · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "url": "https://www.postgresql.org/support/versioning/", "title": "PostgreSQL: Versioning Policy", "content": "18 | September 25, 2025 | November 14, 2030\n17 | September 26, 2024 | November 8, 2029\n16 | September 14, 2023 | November 9, 2028\n15 | October 13, 2022 | November 11, 2027\n14 | September 30, 2021 | November 12, 2026", "description": "", "truncated": false, "total_chars": 215 } ``` ## Write the prompt Write the prompt as an instruction about this one page. Name the facts you want and the format to return them in, so your code can parse the answer without another model call. | Goal | Prompt | | - | - | | One fact | `Which version is the current LTS? Answer with the version number only.` | | A list | `List the modules this page says were removed from the standard library, as a comma-separated list.` | | A table | `List every supported major version with its first release date and final release date, one line each as: version \| first release \| final release` | | A short answer | `What happens to the other tasks when one task in a TaskGroup raises? Answer in two sentences.` | | A check with a fallback | `Which components are not operational right now? Reply with the component names and their status, or All systems operational.` | `content` is the model's answer, so check it before you act on it. If the page doesn't hold the answer, the model says so in `content`, and the response is still `200`. Give it a fixed reply for that case, as the last row does, so your code can test for it. ## Prompt or whole page | Use `prompt` when | Fetch without `prompt` when | | - | - | | You need a few facts from a long page | You need exact wording, such as a quotation or a config block | | You want the answer in a fixed format | You want to keep the page's headings, links and code blocks | | Your agent's context is short | You will ask several different questions about the same page | A prompt doesn't change what the call costs. A fetch is billed as `fetch`, or as `fetch.live` when it was read from the source, with or without a prompt. See [Pricing](/pricing#what-each-call-costs). ## Common mistakes | Wrong | Right | Why | | - | - | - | | A prompt over 2,000 characters | Keep the instruction short and about this page | The API returns `400` with `"prompt": must be 2000 characters or less`. | | `Summarize this page` when you need two numbers | Name the two numbers and the format | A summary can leave out the facts your code needs. | | Trust `content` without a check | Ask for a fixed reply when the page lacks the answer, then test for it | The model answers from the page. If the page doesn't hold the fact, `content` says so instead. | | A prompt on a very long page that fails | Fetch without `prompt`, or use a more specific URL | If the page is too long to run a prompt over, the API returns `400` with `The page is too long to run a prompt over`. See [Read long pages](/guides/long-pages). | | An unencoded prompt in a query string | URL-encode it, for example with `curl --data-urlencode` | Spaces, `&` and `?` in a raw prompt break the query string. | ## In the SDKs, CLI and MCP The SDKs' `fetch` calls [`POST /v1/fetch`](/api-reference/fetch-post), where the prompt is `content.prompt`: `prompt=` in Python, `fetch(urls, { prompt })` in TypeScript, `FetchOptions.Prompt` in Go and `FetchOptions.prompt` in Rust. See [SDK methods](/sdks#methods). The CLI takes `--prompt` (see [CLI](/cli)). Over MCP, `fetch_page_content` takes `prompt` and applies it to every page in the call (see [MCP server](/mcp-server#available-tools)). ## API reference * [Fetch request](/api-reference/fetch#request): `prompt`, `max_chars` and `live` in full. * [Search, then fetch](/guides/search-then-fetch): decide when a fetch is worth it. * [Fetch the current version of a page](/guides/live-fetch): combine `prompt` with `live=true`. # Filter web search results by date Source: https://docs.keenable.ai/guides/filter-by-date How to keep search results inside a date window with published_after and published_before, relative offsets such as 7d, and the acquired filters. Keep your agent's search results inside a date window, so it cites pages from the period the question is about. Set `published_after` for recent pages, add `published_before` to close the window, and use `acquired_after` when you want pages that are new to the index whatever their publish date. ## Parameters | Parameter | In | Type | Default | Limits | What it does | | - | - | - | - | - | - | | `published_after` | Body, `/v1/search` | string | None | None | Keep pages published at or after this point. Pages with no known publish date are left out. Takes a date (`YYYY-MM-DD`, which includes that whole day), an ISO 8601 timestamp (UTC if it has no offset), or a relative delta counted back from the request time: `` with units `min`, `h`, `d`, `w` (weeks), `mo` (30 days) or `y` (365 days), such as `7d`. | | `published_before` | Body, `/v1/search` | string | None | None | Keep pages published at or before this point. A bare `YYYY-MM-DD` includes that whole day; pass a timestamp to cut at an exact instant. | | `acquired_after` | Body, `/v1/search` | string | None | None | Keep pages Keenable indexed at or after this point. Same formats as `published_after`. | | `acquired_before` | Body, `/v1/search` | string | None | None | Keep pages Keenable indexed at or before this point. A bare `YYYY-MM-DD` includes that whole day; pass a timestamp to cut at an exact instant. | | `query_time` | Body, `/v1/search` | string | None | None | Search the index as it stood at this moment: pages acquired after it are left out. It sets no lower bound, so it isn't a recency filter. | Every date filter takes a date, an ISO 8601 timestamp or a relative offset. See [Choose a value](#choose-a-value). ## Search a date window This sample keeps pages published between 365 and 90 days before the request, and prints the publish date, title and URL of each of the top 5 results. It runs with no API key: ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { Keenable } from "keenable"; async function main() { const client = new Keenable(); // keyless: no API key needed to try it const results = await client.search("Kubernetes release announcement", { publishedAfter: "1y", // published in the last 365 days... publishedBefore: "3mo", // ...but not in the last 90 days maxResults: 5, }); for (const result of results) { console.log(result.publishedAt?.slice(0, 10), result.title, result.url); } } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from keenable import Keenable client = Keenable() # keyless: no API key needed to try it results = client.search( "Kubernetes release announcement", published_after="1y", # published in the last 365 days... published_before="3mo", # ...but not in the last 90 days max_results=5, ) for result in results: print(result.published_at[:10], result.title, result.url) ``` ```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} package main import ( "context" "fmt" "log" "github.com/keenableai/keenable-sdk/go" ) func main() { client, err := keenable.New(nil) // keyless: no API key needed to try it if err != nil { log.Fatal(err) } defer client.Close() results, err := client.Search(context.Background(), "Kubernetes release announcement", &keenable.SearchOptions{ PublishedAfter: "1y", // published in the last 365 days... PublishedBefore: "3mo", // ...but not in the last 90 days MaxResults: 5, }) if err != nil { log.Fatal(err) } for _, result := range results.Results { date := "" if result.PublishedAt != nil { date = (*result.PublishedAt)[:10] } fmt.Println(date, result.Title, result.URL) } } ``` ```rust Rust theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} use keenable::{Client, SearchOptions}; #[tokio::main] async fn main() -> Result<(), keenable::Error> { let client = Client::new()?; // keyless: no API key needed to try it let results = client .search_with( "Kubernetes release announcement", &SearchOptions { published_after: Some("1y".into()), // published in the last 365 days... published_before: Some("3mo".into()), // ...but not in the last 90 days max_results: Some(5), ..Default::default() }, ) .await?; for result in &results { let date = result.published_at.as_deref().unwrap_or("").get(..10).unwrap_or(""); println!("{} {} {}", date, result.title, result.url); } Ok(()) } ``` ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST https://api.keenable.ai/v1/search/public \ -H "Content-Type: application/json" \ -H "X-Keenable-Title: My App" \ -d '{ "query": "Kubernetes release announcement", "published_after": "1y", "published_before": "3mo", "max_results": 5 }' ``` You see 5 results, each published inside the window. This run was made on 19 November 2026: ```text Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} 2025-12-31 Kubernetes 1.35 Released with In-Place Pod Resize and AI-Optimized Scheduling https://infoq.com/news/2025/12/kubernetes-1-35 2025-12-17 Kubernetes v1.35: Timbernetes (The World Tree Release) https://kubernetes.io/blog/2025/12/17/kubernetes-v1-35-release 2026-05-14 Kubernetes v1.36 Released: Security Defaults Tighten as AI Workload Support Matures https://infoq.com/news/2026/05/kubernetes-1-36-released 2026-05-28 Kubernetes v1.36 is now available on OCI Kubernetes Engine (OKE) https://blogs.oracle.com/cloud-infrastructure/kubernetes-v1-36-is-now-available-on-oke 2026-07-31 Kubernetes v1.37 Sneak Peek https://kubernetes.io/blog/2026/07/31/kubernetes-v1-37-sneak-peek ``` Results come in rank order, not date order. Sort them by `published_at` if your agent needs a timeline. ## Read the dates in the response Each result carries `published_at` and `acquired_at` as ISO 8601 timestamps in UTC, so your code can check the window or show the date next to a citation. This excerpt is from the curl request above, with `max_results` set to 2 and `snippet_max_length` to 180: ```json Response excerpt · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "query": "Kubernetes release announcement", "mode": "pro", "results": [ { "title": "Kubernetes 1.35 Released with In-Place Pod Resize and AI-Optimized Scheduling", "url": "https://infoq.com/news/2025/12/kubernetes-1-35", "description": "", "snippet": "on mutability and the optimization of high-performance AI/ML workloads.\nA key feature in version 1.35 is the general availability of [In-Place Pod", "published_at": "2025-12-31T10:00:00Z", "acquired_at": "2026-11-14T12:42:35Z" } ] } ``` `published_at` is when the page was published. `acquired_at` is when Keenable indexed it. ## Choose a value Each date filter takes one value in one of three formats. You can mix formats across the two ends of a window. | Value | On an `_after` filter | On a `_before` filter | | - | - | - | | `2026-01-15` | From `2026-01-15T00:00:00Z` | Through `2026-01-15T23:59:59.999Z`, the whole day | | `2026-01-15T10:30:00Z` | From that instant | Up to that instant | | `2026-01-15T10:30:00` | Read as UTC, because it has no offset | Read as UTC, because it has no offset | | `7d` | From 7 days before the request time | Up to 7 days before the request time | A relative offset is ``, counted back from the request time and truncated to the minute. The units are `min` (minutes), `h` (hours), `d` (days), `w` (weeks), `mo` (30 days) and `y` (365 days). ## Publish date or index date Use the `published_` filters when the question is about when something was written: news, release notes, papers. If you set `published_after`, the results leave out pages with no known publish date. Use the `acquired_` filters when the question is about what is new to the index, or when the pages you want often have no publish date, such as documentation and product pages. This body returns pages Keenable indexed in the last 24 hours: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "query": "security advisory for the OpenSSL library", "acquired_after": "24h" } ``` ## Common mistakes | Wrong | Right | Why | | - | - | - | | `"query_time": "7d"` to get recent pages | `"published_after": "7d"` | `query_time` sets only an upper bound. It searches the index as it stood 7 days ago and leaves out everything newer. | | `"published_after": "last week"` | `"published_after": "7d"` | The API returns `400` with `Invalid published_after value "last week": value must not contain whitespace`. | | `"published_after": "30m"` for 30 minutes | `"published_after": "30min"` | `m` isn't a unit, so the API returns `400`. Minutes are `min` and months are `mo`. | | `"published_before": "2026-05-01T00:00:00Z"` to include 1 May | `"published_before": "2026-05-01"` | The date form covers the whole day. The timestamp cuts at midnight and drops pages from that day. | | `published_after` for docs pages that rarely state a date | `acquired_after` | `published_after` leaves out every page with no known publish date. | ## In the SDKs, CLI and MCP The filters keep their names in every client: `published_after` in Python and Rust, `publishedAfter` in TypeScript, `PublishedAfter` in Go. The CLI takes `--published-after`, `--published-before`, `--acquired-after` and `--acquired-before` (see [CLI](/cli)). Over MCP, `search_web_pages` takes the same four arguments (see [MCP server](/mcp-server#available-tools)). ## API reference * [Date and time filters](/api-reference/search#date-and-time-filters): every format, with resolved examples. * [Search request](/api-reference/search#request): `published_after`, `acquired_after` and `query_time` in full. * [Filter by domain](/guides/filter-by-domain): combine a date window with a site. # Filter web search results by domain Source: https://docs.keenable.ai/guides/filter-by-domain How to search one site with site, leave hosts out with exclude_domains, and combine both, with the entry rules and the 400 invalid_filter fix. Point your agent at the sources you trust and keep the rest out. Use `site` to search one site, `exclude_domains` to leave hosts out of an open search, and both together to search a site without some of its subdomains. ## Parameters | Parameter | In | Type | Default | Limits | What it does | | - | - | - | - | - | - | | `site` | Body, `/v1/search` | string | None | None | Return results from one site only. Subdomains are included, and a path narrows further (`github.com/microsoft`). | | `exclude_domains` | Body, `/v1/search` | array of strings | None | At most 2,000 entries | Never return results from these hosts. Each entry is a host name and also excludes every subdomain: `yahoo.com` also excludes `finance.yahoo.com`. An empty array or `null` is the same as leaving it out. Results from excluded hosts are dropped, so fewer than `max_results` can come back. | ## Search one site without one of its subdomains This sample searches `python.org` and every subdomain except the forum at `discuss.python.org`, and prints the top 5 results. It runs with no API key: ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} // Needs keenable 0.2.0 or later on npm. import { Keenable } from "keenable"; async function main() { const client = new Keenable(); // keyless: no API key needed to try it const results = await client.search("asyncio TaskGroup exception handling", { site: "python.org", // python.org and its subdomains... excludeDomains: ["discuss.python.org"], // ...except the forum maxResults: 5, }); for (const result of results) { console.log(result.title); console.log(result.url); } } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from keenable import Keenable client = Keenable() # keyless: no API key needed to try it results = client.search( "asyncio TaskGroup exception handling", site="python.org", # python.org and its subdomains... exclude_domains=["discuss.python.org"], # ...except the forum max_results=5, ) for result in results: print(result.title) print(result.url) ``` ```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} package main import ( "context" "fmt" "log" "github.com/keenableai/keenable-sdk/go" ) func main() { client, err := keenable.New(nil) // keyless: no API key needed to try it if err != nil { log.Fatal(err) } defer client.Close() results, err := client.Search(context.Background(), "asyncio TaskGroup exception handling", &keenable.SearchOptions{ Site: "python.org", // python.org and its subdomains... ExcludeDomains: []string{"discuss.python.org"}, // ...except the forum MaxResults: 5, }) if err != nil { log.Fatal(err) } for _, result := range results.Results { fmt.Println(result.Title) fmt.Println(result.URL) } } ``` ```rust Rust theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} use keenable::{Client, SearchOptions}; #[tokio::main] async fn main() -> Result<(), keenable::Error> { let client = Client::new()?; // keyless: no API key needed to try it let results = client .search_with( "asyncio TaskGroup exception handling", &SearchOptions { site: Some("python.org".into()), // python.org and its subdomains... exclude_domains: Some(vec!["discuss.python.org".into()]), // ...except the forum max_results: Some(5), ..Default::default() }, ) .await?; for result in &results { println!("{}", result.title); println!("{}", result.url); } Ok(()) } ``` ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST https://api.keenable.ai/v1/search/public \ -H "Content-Type: application/json" \ -H "X-Keenable-Title: My App" \ -d '{ "query": "asyncio TaskGroup exception handling", "site": "python.org", "exclude_domains": ["discuss.python.org"], "max_results": 5 }' ``` You see results from `docs.python.org`, `peps.python.org` and `bugs.python.org`, none from `discuss.python.org`: ```text Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} Issue 46752: Introduce task groups to asyncio and change task cancellation semantics https://bugs.python.org/issue46752 Coroutines and tasks https://docs.python.org/3.13/library/asyncio-task.html PEP 654 – Exception Groups and except* | peps.python.org https://peps.python.org/pep-0654 Futures https://docs.python.org/3/library/asyncio-future.html Exceptions https://docs.python.org/3/library/asyncio-exceptions.html ``` The response is an ordinary search response. This excerpt is from the curl request above, with `max_results` set to 2 and `snippet_max_length` to 180: ```json Response excerpt · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "query": "asyncio TaskGroup exception handling", "mode": "pro", "results": [ { "title": "Issue 46752: Introduce task groups to asyncio and change task cancellation semantics", "url": "https://bugs.python.org/issue46752", "description": "", "snippet": "subtasks can keep spawning more subtasks while __aexit__ is running; __aexit__ exits once the last subtask is done. I made this change after consulting some Trio folks, who knew", "acquired_at": "2026-11-07T05:01:49Z" } ] } ``` Excluded results are dropped, not replaced, so fewer than `max_results` can come back. If `exclude_domains` covers the whole `site`, the response has no results. ## Write an entry Each `exclude_domains` entry is a host. A host covers itself and every subdomain: `yahoo.com` also excludes `finance.yahoo.com`, while `blogs.un.org` excludes only `blogs.un.org` and its subdomains. Hosting domains such as `github.io` and `blogspot.com` count as hosts. Keenable cleans up these slips and uses the host that is left: spaces around the entry, upper case, an `http://` or `https://` scheme, a leading `www.`, a port, a trailing `/` or dot, and a query string or fragment. So `https://WWW.UN.org/` becomes `un.org`. | Limit | Value | | - | - | | Distinct hosts, after clean-up | 1,000 | | Entries as sent | 2,000 | | Length of one entry | 2,048 bytes | ## Search several sites The `site` parameter takes one site. To search several, put `site:` operators in `query` and join them with `OR`: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "query": "mechanical keyboard reviews site:wired.com OR site:theverge.com" } ``` Keep every site filter in one place. Use the `site` parameter, or `site:` operators in the query, not both. See [Search operators](/api-reference/search#search-operators), and the [Search operators guide](/guides/search-operators) for grouping several sites with other terms. ## Common mistakes | Wrong | Right | Why | | - | - | - | | `"exclude_domains": ["un.org/press"]` | `"exclude_domains": ["un.org"]` | An entry is a host. A path returns `400` with `invalid_filter`. | | `"exclude_domains": ["*.python.org"]` | `"exclude_domains": ["python.org"]` | A host already covers its subdomains. A wildcard on a host returns `400` with `invalid_filter`. | | `"exclude_domains": "pinterest.com"` | `"exclude_domains": ["pinterest.com"]` | Over HTTP the value is an array. A string returns `400` with `"exclude_domains": must be an array of strings`. | | `"site": "python.org"` with `-site:discuss.python.org` in `query` | `"site": "python.org"` with `"exclude_domains": ["discuss.python.org"]` | Don't mix the `site` parameter with `site:` operators. Use `exclude_domains` to remove hosts inside a site. | | A long `exclude_domains` list on `GET /v1/search` | The same list in a `POST` body | The URL length caps a GET at a few hundred hosts. A longer URL fails before it reaches the API. | A rejected entry returns `400` with `error` set to `invalid_filter`. The `value` field holds the entry as you sent it and `reason` says what to change. See [Rejected entries](/api-reference/search#rejected-entries). ## In the SDKs, CLI and MCP The SDKs take `exclude_domains` in Python and Rust, `excludeDomains` in TypeScript (from `keenable` 0.2.0) and `ExcludeDomains` in Go. The CLI takes `--site` and `--exclude-domain`, which you repeat or give a comma list (see [CLI](/cli)). Over MCP, `search_web_pages` takes `site` and `exclude_domains` (see [MCP server](/mcp-server#available-tools)). ## API reference * [Exclude domains](/api-reference/search#exclude-domains): what an entry matches, clean-up, limits and GET requests. * [Search request](/api-reference/search#request): `site` and `exclude_domains` in full. * [Filter by date](/guides/filter-by-date): add a date window to a site search. # Ground model answers with cited web sources Source: https://docs.keenable.ai/guides/ground-answers-with-citations How to turn search results into a numbered source block with to_context(), ask the model to cite [n], and map citations back to URLs with cited(). Give your model numbered sources and get back an answer whose every claim points to a URL. The SDKs render search results as a numbered block with `to_context()`, and `cited()` returns the same results in the same order, so `[2]` in the answer always maps to the second source the model saw. ## Parameters The search request sets how much text each result carries: | Parameter | In | Type | Default | Limits | What it does | | - | - | - | - | - | - | | `query` | Body, `/v1/search` | string | Required | None | What to search for, in plain language. | | `max_results` | Body, `/v1/search` | integer | `10` | 1 to 50 | Maximum number of results to return. Fewer come back if fewer pages match. | | `snippet_max_length` | Body, `/v1/search` | integer | None | 180 to 10,000 | Maximum characters of page text in each result's `snippet`. Without it, snippets can run to several thousand characters. | `to_context()` and `cited()` take the same options, which shape the rendered block: | Option | Python | TypeScript | Go (`keenable.ContextOptions`) | Rust (`keenable::ContextOptions`) | Default | | - | - | - | - | - | - | | Characters for the whole block | `max_chars` | `maxChars` | `MaxChars` | `max_chars` | 12,000 | | Characters for each result | `max_snippet_chars` | `maxSnippetChars` | `MaxSnippetChars` | `max_snippet_chars` | 2,000 | | Results to consider, from the top | `max_results` | `maxResults` | `MaxResults` | `max_results` | All | | Publish date in each header | `include_dates` | `includeDates` | `IncludeDates` | `include_dates` | Shown | In Rust, pass the options to `to_context_with` and `cited_with`. In TypeScript, `maxSnippetChars` needs `keenable` 0.2.0 or later. ## Build a cited prompt This sample searches, renders the results as a block of at most 3,000 characters, wraps it in a prompt that asks for numbered citations, and prints the matching source list. Send the prompt to any model. It runs with no API key: ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { Keenable } from "keenable"; async function main() { const client = new Keenable(); // keyless: no API key needed to try it const question = "What changed in the HTTP QUERY method draft?"; const results = await client.search(question, { maxResults: 5, snippetMaxLength: 500 }); // A numbered block of sources, at most 3,000 characters const context = results.toContext({ maxChars: 3000 }); const prompt = "Answer the question using only the sources below. " + "Cite each claim with its source number, such as [1].\n\n" + `Sources:\n${context}\n\nQuestion: ${question}`; console.log(prompt); // The same sources, in citation order, to show under the answer console.log("\nSources:"); results.cited({ maxChars: 3000 }).forEach((result, i) => { console.log(`[${i + 1}] ${result.url}`); }); } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from keenable import Keenable client = Keenable() # keyless: no API key needed to try it question = "What changed in the HTTP QUERY method draft?" results = client.search(question, max_results=5, snippet_max_length=500) # A numbered block of sources, at most 3,000 characters context = results.to_context(max_chars=3000) prompt = ( "Answer the question using only the sources below. " "Cite each claim with its source number, such as [1].\n\n" f"Sources:\n{context}\n\nQuestion: {question}" ) print(prompt) # The same sources, in citation order, to show under the answer print("\nSources:") for number, result in enumerate(results.cited(max_chars=3000), start=1): print(f"[{number}] {result.url}") ``` ```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} package main import ( "context" "fmt" "log" "github.com/keenableai/keenable-sdk/go" ) func main() { client, err := keenable.New(nil) // keyless: no API key needed to try it if err != nil { log.Fatal(err) } defer client.Close() question := "What changed in the HTTP QUERY method draft?" snippetCap := 500 results, err := client.Search(context.Background(), question, &keenable.SearchOptions{MaxResults: 5, SnippetMaxLength: &snippetCap}) if err != nil { log.Fatal(err) } // A numbered block of sources, at most 3,000 characters opts := &keenable.ContextOptions{MaxChars: 3000} prompt := "Answer the question using only the sources below. " + "Cite each claim with its source number, such as [1].\n\n" + "Sources:\n" + results.ToContext(opts) + "\n\nQuestion: " + question fmt.Println(prompt) // The same sources, in citation order, to show under the answer fmt.Println("\nSources:") for i, result := range results.Cited(opts) { fmt.Printf("[%d] %s\n", i+1, result.URL) } } ``` ```rust Rust theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} use keenable::{Client, ContextOptions, SearchOptions}; #[tokio::main] async fn main() -> Result<(), keenable::Error> { let client = Client::new()?; // keyless: no API key needed to try it let question = "What changed in the HTTP QUERY method draft?"; let results = client .search_with( question, &SearchOptions { max_results: Some(5), snippet_max_length: Some(500), ..Default::default() }, ) .await?; // A numbered block of sources, at most 3,000 characters let opts = ContextOptions { max_chars: 3000, ..Default::default() }; let prompt = format!( "Answer the question using only the sources below. \ Cite each claim with its source number, such as [1].\n\n\ Sources:\n{}\n\nQuestion: {}", results.to_context_with(&opts), question ); println!("{}", prompt); // The same sources, in citation order, to show under the answer println!("\nSources:"); for (i, result) in results.cited_with(&opts).iter().enumerate() { println!("[{}] {}", i + 1, result.url); } Ok(()) } ``` ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} # Number the results yourself: the SDKs' to_context() does this for you curl -s -X POST https://api.keenable.ai/v1/search/public \ -H "Content-Type: application/json" \ -H "X-Keenable-Title: My App" \ -d '{ "query": "What changed in the HTTP QUERY method draft?", "max_results": 5, "snippet_max_length": 500 }' | jq -r '.results | to_entries[] | "[\(.key + 1)] \(.value.title) (\(.value.url))\n\(.value.snippet)\n"' ``` You see the prompt with one `[n] Title (url)` header per source, then the source list in the same order: ```text Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} Answer the question using only the sources below. Cite each claim with its source number, such as [1]. Sources: [1] The HTTP QUERY Method (https://ietf.org/archive/id/draft-ietf-httpbis-safe-method-w-body-11.html) The changes in this draft are summarized in Appendix B.11.¶ QUERY requests are both safe and idempotent with regard to the resource identified by the request URI. … [2] draft-ietf-httpbis-safe-method-w-body-13 (https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-safe-method-w-body-13) - published 2025-11-14T00:00:00Z This specification defines the QUERY method for HTTP. … … Question: What changed in the HTTP QUERY method draft? Sources: [1] https://ietf.org/archive/id/draft-ietf-httpbis-safe-method-w-body-11.html [2] https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-safe-method-w-body-13 [3] https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-safe-method-w-body-12 [4] https://ietf.org/archive/id/draft-ietf-httpbis-safe-method-w-body-02.txt [5] https://ietf.org/archive/id/draft-ietf-httpbis-safe-method-w-body-10.txt ``` The curl tab numbers the raw results with `jq`, because HTTP returns the results as JSON with no block. ## How the block is built `to_context()` cleans each result's text first: it drops images, resolves relative links and flattens tables. It cuts each result's text at a word boundary near the per-result limit and ends it with "…". Then it adds whole results in rank order and stops before the first result that would take the block past the character limit, so the block never ends in the middle of a source. The first result is always kept, even if it is longer than the limit on its own. A header shows `- published ` when the page has a known publish date. The limits apply to the rendered block only: each result's `snippet` keeps its full text. ## Cite a fetched page A fetched page has its own `to_context()`, which renders it in the same `[1] Title (url)` shape and cuts the content at the character limit. Use it when you [fetch a page after a search](/guides/search-then-fetch) and want the model to cite it the same way. ## Common mistakes | Wrong | Right | Why | | - | - | - | | Number the sources from the full `results` list | Number them from `cited()` with the same options as `to_context()` | `to_context()` can leave results out to fit the limit. The full list then numbers sources the model never saw. | | Call `cited()` with no options after `to_context(max_chars=3000)` | Pass the same options to both | Different limits keep different results, and the numbers stop matching. | | Put a fetched page's block after a search block | Renumber the fetched page, or render it on its own | A fetched page's block always starts at `[1]`, which collides with the first search result. | | Paste raw snippets with no limit into the prompt | Set `snippet_max_length` on the search, or `max_chars` on `to_context()` | Without them, each snippet can run to several thousand characters. | | Ask the model to cite URLs it copies from the text | Ask it to cite `[n]` and map the numbers back yourself | A model can mistype a URL. A number maps to the exact URL you sent. | ## API reference * [SDK context size](/sdks#context-size): `to_context()` options in every language. * [Search response](/api-reference/search#response): `title`, `url`, `snippet` and `published_at` on each result. * [Best practices](/best-practices#control-context-size): set result and block size together. # Run high-volume web research within rate limits Source: https://docs.keenable.ai/guides/high-volume-research How to run many searches and fetches in parallel: cap calls in flight, retry a 429 after Retry-After, group a run with a session ID, and raise your limit. Run hundreds of searches and fetches for one research task without losing calls to `429`. Cap how many calls are in flight, let the SDK wait out `Retry-After`, and tag every call of the run with one session ID. ## Know your limit Searches and fetches count against the same limit: | How you call | Rate limit | | - | - | | With an API key | 10 requests per second per organization by default, no hourly cap. All keys in the organization share it. | | With an API key, after \$1,000 of top-ups in 90 days | 25 requests per second per organization | | Without a key | 1,000 requests per hour and 10 per second per IP address, for each endpoint | A keyless research run of more than 1,000 calls an hour hits the hourly cap. Use an [API key](/api-keys) for volume. [Rate limits](/rate-limits) lists every tier, including pay per request. ## Parameters | Parameter | In | Type | Default | Limits | What it does | | - | - | - | - | - | - | | `X-Keenable-Session-Id` | Header, `/v1/search` | string | None | At most 128 characters | Your own ID for grouping related requests. You can send it as the `session_id` parameter instead; the header wins if you send both. Values over 128 characters are truncated. | | `session_id` | Body, `/v1/search` | string | None | At most 128 characters | Your own ID for grouping related requests. | | `session_id` | Query, `/v1/fetch` | string | None | At most 128 characters | Your own ID for grouping related requests. | ## Run many searches with a cap This sample runs 8 searches with at most 5 in flight, sends one session ID on every call, and reports any query that still hit a limit after the SDK's retries. It runs with no API key: ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} // Needs keenable 0.2.0 or later on npm. import { randomUUID } from "node:crypto"; import { Keenable, KeenableRateLimitError } from "keenable"; const QUERIES = [ "official Postgres documentation on logical replication slots", "postmortem of an outage caused by a full Postgres replication slot", "guide to monitoring Postgres replication lag with pg_stat_replication", "release notes for the latest PostgreSQL major version", "comparison of Postgres logical replication and physical streaming replication", "blog post on upgrading Postgres with logical replication and near-zero downtime", "Postgres documentation on the max_slot_wal_keep_size setting", "troubleshooting guide for Postgres replication slot WAL growth", ]; const IN_FLIGHT = 5; // at most 5 calls in flight at once async function main() { const sessionId = `research-run-${randomUUID()}`; // a new ID for each run const client = new Keenable({ // One ID for every call in this run. The SDK retries a 429 after Retry-After. defaultHeaders: { "X-Keenable-Session-Id": sessionId }, maxRetries: 3, }); const lines: string[] = new Array(QUERIES.length); let next = 0; async function worker() { while (next < QUERIES.length) { const i = next++; try { const results = await client.search(QUERIES[i], { maxResults: 3, snippetMaxLength: 300 }); lines[i] = `${results.length} results, top: ${results.results[0]?.url ?? "-"}`; } catch (err) { if (!(err instanceof KeenableRateLimitError)) throw err; // Still limited after the retries, or Retry-After was over 60 s lines[i] = `skipped: ${err.code}, retry after ${err.retryAfterSeconds} s`; } } } await Promise.all(Array.from({ length: IN_FLIGHT }, worker)); QUERIES.forEach((query, i) => console.log(`${query.slice(0, 48).padEnd(48)} ${lines[i]}`)); } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import asyncio import uuid from keenable import AsyncKeenable, KeenableRateLimitError QUERIES = [ "official Postgres documentation on logical replication slots", "postmortem of an outage caused by a full Postgres replication slot", "guide to monitoring Postgres replication lag with pg_stat_replication", "release notes for the latest PostgreSQL major version", "comparison of Postgres logical replication and physical streaming replication", "blog post on upgrading Postgres with logical replication and near-zero downtime", "Postgres documentation on the max_slot_wal_keep_size setting", "troubleshooting guide for Postgres replication slot WAL growth", ] IN_FLIGHT = 5 # at most 5 calls in flight at once async def main(): limit = asyncio.Semaphore(IN_FLIGHT) session_id = f"research-run-{uuid.uuid4()}" # a new ID for each run async with AsyncKeenable( # One ID for every call in this run. The SDK retries a 429 after Retry-After. default_headers={"X-Keenable-Session-Id": session_id}, max_retries=3, ) as client: async def search(query): async with limit: try: results = await client.search(query, max_results=3, snippet_max_length=300) except KeenableRateLimitError as err: # Still limited after the retries, or Retry-After was over 60 s return f"skipped: {err.code}, retry after {err.retry_after_seconds} s" return f"{len(results)} results, top: {results[0].url if results else '-'}" lines = await asyncio.gather(*(search(q) for q in QUERIES)) for query, line in zip(QUERIES, lines): print(f"{query[:48]:<48} {line}") asyncio.run(main()) ``` ```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} package main import ( "context" "errors" "fmt" "log" "sync" "time" "github.com/keenableai/keenable-sdk/go" ) var queries = []string{ "official Postgres documentation on logical replication slots", "postmortem of an outage caused by a full Postgres replication slot", "guide to monitoring Postgres replication lag with pg_stat_replication", "release notes for the latest PostgreSQL major version", "comparison of Postgres logical replication and physical streaming replication", "blog post on upgrading Postgres with logical replication and near-zero downtime", "Postgres documentation on the max_slot_wal_keep_size setting", "troubleshooting guide for Postgres replication slot WAL growth", } const inFlight = 5 // at most 5 calls in flight at once func main() { retries := 3 sessionID := fmt.Sprintf("research-run-%d", time.Now().UnixNano()) // a new ID for each run client, err := keenable.New(&keenable.Options{ // One ID for every call in this run. The SDK retries a 429 after Retry-After. Headers: map[string]string{"X-Keenable-Session-Id": sessionID}, MaxRetries: &retries, }) if err != nil { log.Fatal(err) } defer client.Close() lines := make([]string, len(queries)) slots := make(chan struct{}, inFlight) var wg sync.WaitGroup snippetCap := 300 for i, query := range queries { wg.Add(1) go func(i int, query string) { defer wg.Done() slots <- struct{}{} defer func() { <-slots }() results, err := client.Search(context.Background(), query, &keenable.SearchOptions{MaxResults: 3, SnippetMaxLength: &snippetCap}) var limited *keenable.RateLimitError switch { case errors.As(err, &limited): // Still limited after the retries, or Retry-After was over 60 s lines[i] = fmt.Sprintf("skipped: %s, retry after %s", limited.APICode, limited.RetryAfter) case err != nil: lines[i] = "error: " + err.Error() case len(results.Results) == 0: lines[i] = "0 results" default: lines[i] = fmt.Sprintf("%d results, top: %s", len(results.Results), results.Results[0].URL) } }(i, query) } wg.Wait() for i, query := range queries { if len(query) > 48 { query = query[:48] } fmt.Printf("%-48s %s\n", query, lines[i]) } } ``` ```rust Rust theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} use std::collections::HashMap; use std::time::{SystemTime, UNIX_EPOCH}; use keenable::{Client, Error, Options, SearchOptions}; use tokio::task::JoinSet; static QUERIES: [&str; 8] = [ "official Postgres documentation on logical replication slots", "postmortem of an outage caused by a full Postgres replication slot", "guide to monitoring Postgres replication lag with pg_stat_replication", "release notes for the latest PostgreSQL major version", "comparison of Postgres logical replication and physical streaming replication", "blog post on upgrading Postgres with logical replication and near-zero downtime", "Postgres documentation on the max_slot_wal_keep_size setting", "troubleshooting guide for Postgres replication slot WAL growth", ]; const IN_FLIGHT: usize = 5; // at most 5 calls in flight at once #[tokio::main] async fn main() -> Result<(), Error> { // A new ID for each run let nanos = SystemTime::now().duration_since(UNIX_EPOCH).expect("clock before 1970").as_nanos(); let session_id = format!("research-run-{nanos}"); // One ID for every call in this run. The SDK retries a 429 after Retry-After. let client = Client::with_options(Options { headers: HashMap::from([("X-Keenable-Session-Id".into(), session_id)]), max_retries: Some(3), ..Default::default() })?; let mut lines = vec![String::new(); QUERIES.len()]; for (batch, chunk) in QUERIES.chunks(IN_FLIGHT).enumerate() { let mut set = JoinSet::new(); for (j, query) in chunk.iter().enumerate() { let client = client.clone(); let opts = SearchOptions { max_results: Some(3), snippet_max_length: Some(300), ..Default::default() }; set.spawn(async move { (batch * IN_FLIGHT + j, client.search_with(query, &opts).await) }); } while let Some(joined) = set.join_next().await { let (i, outcome) = joined.expect("search task panicked"); lines[i] = match outcome { Ok(results) => match results.results.first() { Some(top) => format!("{} results, top: {}", results.results.len(), top.url), None => "0 results".into(), }, // Still limited after the retries, or Retry-After was over 60 s Err(Error::RateLimit(e)) => format!("skipped: {:?}, retry after {:?}", e.code, e.retry_after), Err(e) => return Err(e), }; } } for (query, line) in QUERIES.iter().zip(&lines) { let short: String = query.chars().take(48).collect(); println!("{short:<48} {line}"); } Ok(()) } ``` ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} # 8 searches, at most 5 at once (-P 5), all under one session ID. # --retry retries a 429 and waits for its Retry-After header (curl 7.66.0 or later). SESSION_ID="research-run-$(date +%s)" # a new ID for each run printf '%s\n' \ "official Postgres documentation on logical replication slots" \ "postmortem of an outage caused by a full Postgres replication slot" \ "guide to monitoring Postgres replication lag with pg_stat_replication" \ "release notes for the latest PostgreSQL major version" \ "comparison of Postgres logical replication and physical streaming replication" \ "blog post on upgrading Postgres with logical replication and near-zero downtime" \ "Postgres documentation on the max_slot_wal_keep_size setting" \ "troubleshooting guide for Postgres replication slot WAL growth" | xargs -P 5 -I {} curl -s --retry 3 -X POST https://api.keenable.ai/v1/search/public \ -H "Content-Type: application/json" \ -H "X-Keenable-Title: My App" \ -H "X-Keenable-Session-Id: $SESSION_ID" \ -d '{"query": "{}", "max_results": 3, "snippet_max_length": 300}' ``` You see one line per query with its result count and top URL. This run was made on 19 November 2026, and the Python output is shown with 3 of 8 lines: ```text Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} official Postgres documentation on logical repli 3 results, top: https://postgresql.org/docs/current/logicaldecoding-explanation.html postmortem of an outage caused by a full Postgre 3 results, top: https://medium.com/beyond-localhost/6be8c52a3fb1?sk=637721028350a012c7b0cc34dd707f21 guide to monitoring Postgres replication lag wit 3 results, top: https://dba.stackexchange.com/questions/157482/metrics-for-monitoring-master-slave-replication ``` A cap on calls in flight isn't a cap per second. If each call returns in under half a second, 5 calls in flight can pass 10 per second. The SDK then retries the `429` after `Retry-After`, so the run slows down instead of failing. ## Handle a 429 Every SDK retries a `429` for you (TypeScript from `keenable` 0.2.0): 2 times by default, waiting for `Retry-After` when the API sends one, and with backoff from 0.5 s up to 8 s when it doesn't. Set `max_retries` (`maxRetries` in TypeScript, `MaxRetries` in Go) on the client to change that. | What happens | What the SDK does | What your code does | | - | - | - | | `429` with `Retry-After` of 60 s or less | Waits, then retries, up to `max_retries` times | Nothing | | `429` still returned after the last retry | Raises the rate-limit error | Wait `retry_after_seconds`, then retry, or skip the call | | `429` with `Retry-After` over 60 s, such as `public_rate_limit_hourly` | Raises the rate-limit error at once | Send an API key, or wait until `limit.resets_at` | | `429` with `target_rate_limited`, `search_rate_limited` or `fetch_rate_limited` | Waits for `Retry-After: 1`, then retries | Nothing. Your own limit isn't the cause. | The error is `KeenableRateLimitError` in Python and TypeScript, `*keenable.RateLimitError` in Go and `keenable::Error::RateLimit` in Rust. Its `code` says which limit you hit. Over raw HTTP, read the `Retry-After` header or `retry_after_seconds` in the body. Keyed responses don't carry `X-RateLimit-*` headers, so pace keyed calls with the cap above and the retry wait. Keyless responses carry `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` for the hourly window only. See [429 Rate limit exceeded](/errors#429). ## Group a run with a session ID Send the same session ID on every search and fetch in one research run, so Keenable can group the run's requests. The SDKs have no `session_id` argument. Send the `X-Keenable-Session-Id` header with the client's default headers instead, as the sample does: `default_headers` in Python, `defaultHeaders` in TypeScript (from `keenable` 0.2.0), `Options.Headers` in Go and `Options.headers` in Rust. The CLI takes `--session-id`, and the MCP tools take `session_id`. ## Common mistakes | Wrong | Right | Why | | - | - | - | | Start every call at once with `asyncio.gather` or `Promise.all` | Cap calls in flight with a semaphore or a worker pool | Hundreds of calls at once go far past 10 per second, and every extra call comes back as `429`. | | Retry a `429` at once, in a loop | Wait for `Retry-After`, or let the SDK do it | Retrying sooner returns `429` again and uses up the limit for the other calls in the run. | | Run several keys in parallel to get more throughput | Raise your organization's limit | All keys in an organization share its per-second limit. | | A keyless run of thousands of calls | Send an API key | Without a key, the limit is 1,000 requests per hour per IP, shared with everything else on that address. | | Fetch every search result | Answer from snippets, then fetch only what they miss | Each fetch counts against the same limit as a search. See [Search, then fetch](/guides/search-then-fetch). | ## More than 25 requests per second Your organization's limit rises from 10 to 25 requests per second once its completed top-ups reach \$1,000 within 90 days. See [Raise your limit](/rate-limits#raise-your-limit). For more than 25 per second, [contact Keenable](https://keenable.ai/contact). [Plans and volume pricing](/pricing#plans-and-volume-pricing) covers dedicated capacity. ## API reference * [Rate limits](/rate-limits): every tier and the `429` codes. * [429 Rate limit exceeded](/errors#429): the error body, headers and SDK errors. * [Group an agent run with a session ID](/best-practices#group-an-agent-run-with-a-session-id): the session ID over raw HTTP. # Keenable guides for web search and fetch Source: https://docs.keenable.ai/guides/index How-to guides for Keenable search and fetch: filters, operators, result size, fetch prompts, live and long pages, citations, keyless, volume and cost. Each guide solves one task with Keenable search or fetch, with runnable code in Python, TypeScript, Go, Rust and curl, a real response, and the mistakes that return the wrong results. Every sample runs with no API key. ## Pick a guide | Guide | What you get | Parameters it covers | | - | - | - | | [Filter by date](/guides/filter-by-date) | Results from a date window, such as the last 7 days | `published_after`, `published_before`, `acquired_after`, `acquired_before` | | [Filter by domain](/guides/filter-by-domain) | Results from the sites you trust, without the ones you don't | `site`, `exclude_domains` | | [Search, then fetch](/guides/search-then-fetch) | The facts you need with the least text in your context | `snippet_max_length`, `prompt`, `max_chars`, `live` | | [Choose a search mode](/guides/choose-a-search-mode) | The right trade between depth and response time | `mode` | | [Ground answers with citations](/guides/ground-answers-with-citations) | Answers whose claims map to source URLs | `to_context()`, `cited()` | | [Keyless access](/guides/keyless-access) | Search and fetch before anyone creates an account | `/v1/search/public`, `X-Keenable-Title`, `/mcp-public` | | [Search operators](/guides/search-operators) | Exact phrases, several sites in one request, and exclusions | `"..."`, `site:`, `OR`, `-`, `( )` | | [Result size](/guides/result-size) | Search results sized to your context, without cards | `max_results`, `snippet_max_length`, `disable_cards` | | [Fetch with a prompt](/guides/fetch-with-prompt) | Only the facts you asked for from a page, in a format you can parse | `prompt` | | [Live fetch](/guides/live-fetch) | The current version of a page that changes often | `live` | | [Long pages](/guides/long-pages) | Long pages that don't fill your context | `max_chars`, `truncated`, `total_chars` | | [High-volume research](/guides/high-volume-research) | Many parallel calls without losing any to `429` | `Retry-After`, `max_retries`, `X-Keenable-Session-Id` | | [Cost at volume](/guides/cost-at-volume) | A monthly cost estimate from your search and fetch volume | `usage.credits`, free allowance, \$4 per 1,000 | | [Docs lookup for coding agents](/guides/docs-lookup-for-coding-agents) | A coding agent that checks current library docs before it writes code | `site`, `prompt`, `AGENTS.md` | ## Combine the filters The filters from several guides work together in one request. This keyless request searches one GitHub organization for pages published in the last year, in `realtime` mode, and returns 3 short results: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST https://api.keenable.ai/v1/search/public \ -H "Content-Type: application/json" \ -H "X-Keenable-Title: My App" \ -d '{ "query": "release notes for a new Tokio version", "site": "github.com/tokio-rs", "published_after": "1y", "mode": "realtime", "max_results": 3, "snippet_max_length": 180 }' ``` You see a search response whose `mode` is `realtime`, with 3 results on `github.com/tokio-rs`, each published in the last year: ```text Example output · results vary, mode and URLs shown theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} realtime 2026-09-08 https://github.com/tokio-rs/tokio/issues/8434 2026-05-04 https://github.com/tokio-rs/tokio/commit/f82bcf3f45eb9d0dad9d7e45251adf67223f03b6 2026-07-16 https://github.com/tokio-rs/tokio/commit/b0ba02e75507518baed6718b0c37105e430f3a93 ``` ## Related pages * [Cookbook](/cookbook): search and filter every guide and recipe. * [Best practices](/best-practices): query writing, parallel searches and context size. * [Search](/products/search) and [Fetch](/products/fetch): cost and every key parameter. * [Search API reference](/api-reference/search): every request parameter and response field. # Use Keenable search and fetch without an API key Source: https://docs.keenable.ai/guides/keyless-access How to call search and fetch with no API key: the /public paths, the X-Keenable-Title header, /mcp-public, and the 1,000 per hour keyless limit per IP. Let your agent search and fetch the web before anyone creates an account. Call the `/public` paths and name your app in the `X-Keenable-Title` header. Keyless calls are free, and Keenable limits them per IP address: 1,000 requests per hour and 10 per second, for each endpoint. ## Parameters The public paths take the same body and query parameters as the keyed ones, plus your app's name: | Parameter | In | Type | Default | Limits | What it does | | - | - | - | - | - | - | | `X-Keenable-Title` | Header, `/v1/search/public` | string | Required | At most 256 characters | Name of the application making the call. The public endpoints need it, here or in the `keenable_title` query parameter; without either, the API returns `400` with `Missing app identifier`. Values over 256 characters are truncated. | | `keenable_title` | Query, `/v1/search/public` | string | None | At most 256 characters | Same as the `X-Keenable-Title` header, for clients that can't set headers. The header wins if you send both. | | `X-Keenable-Session-Id` | Header, `/v1/search/public` | string | None | At most 128 characters | Your own ID for grouping related requests. You can send it as the `session_id` parameter instead; the header wins if you send both. | `GET /v1/fetch/public` takes the same headers and the `keenable_title` query parameter. ## Keyless paths | Keyed path | Keyless path | | - | - | | `POST` or `GET https://api.keenable.ai/v1/search` | `POST` or `GET https://api.keenable.ai/v1/search/public` | | `GET https://api.keenable.ai/v1/fetch` | `GET https://api.keenable.ai/v1/fetch/public` | | `POST https://api.keenable.ai/v1/fetch` | `POST https://api.keenable.ai/v1/fetch/public`, one URL per call | | `https://api.keenable.ai/mcp` with an `X-API-Key` header | `https://api.keenable.ai/mcp`, or `https://api.keenable.ai/mcp-public` for presets and listings | ## Search without a key This sample creates a client with no API key and your app's name, confirms it runs keyless, and prints the top 3 results. With no key, each SDK calls the `/public` paths and sends its client source as `X-Keenable-Title`: ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { Keenable } from "keenable"; async function main() { // No API key: the client calls /v1/search/public. // clientSource is sent as the X-Keenable-Title header. const client = new Keenable({ clientSource: "Acme research agent" }); console.log("keyless:", client.keyless); const results = await client.search("OWASP guidance on storing API keys in a backend service", { maxResults: 3, }); for (const result of results) console.log(result.title, result.url); } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from keenable import Keenable # No API key: the client calls /v1/search/public. # client_source is sent as the X-Keenable-Title header. client = Keenable(client_source="Acme research agent") print("keyless:", client.keyless) results = client.search("OWASP guidance on storing API keys in a backend service", max_results=3) for result in results: print(result.title, result.url) ``` ```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} package main import ( "context" "fmt" "log" "github.com/keenableai/keenable-sdk/go" ) func main() { // No API key: the client calls /v1/search/public. // ClientSource is sent as the X-Keenable-Title header. client, err := keenable.New(&keenable.Options{ClientSource: "Acme research agent"}) if err != nil { log.Fatal(err) } defer client.Close() fmt.Println("keyless:", client.Keyless()) results, err := client.Search(context.Background(), "OWASP guidance on storing API keys in a backend service", &keenable.SearchOptions{MaxResults: 3}) if err != nil { log.Fatal(err) } for _, result := range results.Results { fmt.Println(result.Title, result.URL) } } ``` ```rust Rust theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} use keenable::{Client, Options, SearchOptions}; #[tokio::main] async fn main() -> Result<(), keenable::Error> { // No API key: the client calls /v1/search/public. // client_source is sent as the X-Keenable-Title header. let client = Client::with_options(Options { client_source: Some("Acme research agent".into()), ..Default::default() })?; println!("keyless: {}", client.is_keyless()); let results = client .search_with( "OWASP guidance on storing API keys in a backend service", &SearchOptions { max_results: Some(3), ..Default::default() }, ) .await?; for result in &results { println!("{} {}", result.title, result.url); } Ok(()) } ``` ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} # No X-API-Key header: call the /public path and name your app instead curl -X POST https://api.keenable.ai/v1/search/public \ -H "Content-Type: application/json" \ -H "X-Keenable-Title: Acme research agent" \ -d '{ "query": "OWASP guidance on storing API keys in a backend service", "max_results": 3 }' ``` You see `keyless: True` (`true` in TypeScript, Go and Rust), then one line per result: ```text Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} keyless: True DevSecOpsGuideline/current-version/2-Process/2-2-Develop/2-2-1-Pre-commit/2-2-1-2-Secrets-Management.md at master · OWASP/DevSecOpsGuideline https://github.com/OWASP/DevSecOpsGuideline/blob/master/current-version/2-Process/2-2-Develop/2-2-1-Pre-commit/2-2-1-2-Secrets-Management.md How to safely store API Keys in a database for a REST API? https://stackoverflow.com/questions/78580774/how-to-safely-store-api-keys-in-a-database-for-a-rest-api MASWE-0005: API Keys Hardcoded in the App Package https://mas.owasp.org/MASWE/MASVS-AUTH/MASWE-0005 ``` If `KEENABLE_API_KEY` is set in the environment, the SDKs use it and call the keyed paths instead. If you leave the client source out, the SDKs send `Keenable SDK`. ## Read the response and the limit headers A keyless response has the same shape as a keyed one, without the `usage` object. Each response also carries the hourly limit for your IP address. This is the curl request with `max_results` set to 1 and `snippet_max_length` to 180: ```text Response · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} x-ratelimit-limit: 1000 x-ratelimit-remaining: 947 x-ratelimit-reset: 2026-11-19T12:36:32.384Z {"query":"OWASP guidance on storing API keys in a backend service","mode":"pro","results":[{"title":"DevSecOpsGuideline/current-version/2-Process/2-2-Develop/2-2-1-Pre-commit/2-2-1-2-Secrets-Management.md at master · OWASP/DevSecOpsGuideline","url":"https://github.com/OWASP/DevSecOpsGuideline/blob/master/current-version/2-Process/2-2-Develop/2-2-1-Pre-commit/2-2-1-2-Secrets-Management.md","description":"","snippet":"with access controls and audit logs.\n- Applications retrieve secrets at runtime via API, not at build time.\n- Access is controlled by identity (IAM role, service account,","acquired_at":"2026-11-15T21:27:35Z"}]} ``` If you leave out `X-Keenable-Title`, the API returns `400`: ```json Response theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "error": "Missing app identifier", "message": "X-Keenable-Title header is required for token-less requests", "type": "invalid_request_error", "code": "missing_app_title", "fix": "Name your app in the X-Keenable-Title header (or the keenable_title query parameter) and retry. With an API key, call /v1/search or /v1/fetch instead, which do not need it.", "docs_url": "https://docs.keenable.ai/errors#missing-app-title", "retryable": false, "param": "X-Keenable-Title" } ``` ## Keyless limits | Limit | Value | | - | - | | Requests per hour, per IP address, for each endpoint | 1,000 | | Requests per second, per IP address, for each endpoint | 10 | | Cost | Free | You share the per-IP pool with all other traffic from your IP address, such as other people behind the same office network. Over a limit, the API returns `429` with `Retry-After`, and the body's `code` is `public_rate_limit_per_second` or `public_rate_limit_hourly`. An hourly `429` keeps coming back until the time in `limit.resets_at`. See [Rate limits](/rate-limits#when-you-hit-a-limit). An [API key](/api-keys) replaces the per-IP limit with your organization's own limit, 10 requests per second with no hourly cap, and adds the `usage` object to each response. [Monitors](/products/monitors) needs a key. ## Keyless MCP Point an MCP client at `https://api.keenable.ai/mcp` with no key and it runs on the keyless tier. If you ship Keenable in a preset, a catalog entry or a docs example, use `https://api.keenable.ai/mcp-public` instead. It is the same server with the same tools, but it publishes no OAuth discovery metadata, so clients connect without offering a sign-in. On `/mcp-public`, `search_web_pages` doesn't offer `mode`. See [Keyless endpoint for listings and presets](/mcp-server#keyless-endpoint-for-listings-and-presets). ## Common mistakes | Wrong | Right | Why | | - | - | - | | `POST /v1/search` with no key | `POST /v1/search/public` with `X-Keenable-Title` | The keyed path returns `401` with `missing_api_key`. | | `POST /v1/search/public` with no `X-Keenable-Title` | Add `X-Keenable-Title: `, or `?keenable_title=` if you can't set headers | The API returns `400` with `Missing app identifier`. | | Retry a keyless hourly `429` in a loop | Wait for `limit.resets_at`, or send an API key | The hourly limit doesn't reset until that time. | | Run a batch job on the keyless tier from a shared server | Use an API key | Every process on that IP address draws on the same 1,000 requests per hour. | | Read `usage` from a keyless response | Read `usage` only on keyed calls | Keyless responses leave `usage` out. | ## API reference * [Search without a key](/api-reference/search#without-a-key) and [Fetch without a key](/api-reference/fetch#without-a-key). * [400 Missing app identifier](/errors#400-missing-app-identifier) and [429 Rate limit exceeded](/errors#429). * [Authentication](/authentication): add an API key when you outgrow the keyless tier. # Fetch the current version of a web page Source: https://docs.keenable.ai/guides/live-fetch How to set live=true so fetch reads a page from its source instead of the indexed copy, when that's worth it, and how a live read is billed as fetch.live. Read a page as it is right now, not as Keenable last indexed it. Set `live=true` and fetch reads the page from its source on this call. Use it for pages that change between visits: status pages, price lists, dashboards, schedules. ## Parameters | Parameter | In | Type | Default | Limits | What it does | | - | - | - | - | - | - | | `url` | Query, `/v1/fetch` | string | Required | None | The page to read, as an absolute `http` or `https` URL. URL-encode it when it has its own query string. | | `live` | Query, `/v1/fetch` | boolean | `false` | None | Set to `true` to fetch the page from the source now instead of returning Keenable's indexed copy. Without it, Keenable returns its indexed copy if it has a usable one and fetches the page live otherwise. A call that fetched live is billed as `fetch.live`. Any value other than `true` or `false` returns `400`. | ## Fetch a status page live This sample reads the GitHub status page from its source and uses a `prompt` to return only the components that aren't operational. The curl tab runs with no API key. The SDK tabs need one, because the SDKs' `fetch` calls [`POST /v1/fetch`](/api-reference/fetch-post): ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { Keenable } from "keenable"; async function main() { const client = new Keenable(); // reads KEENABLE_API_KEY from the environment const { results } = await client.fetch(["https://www.githubstatus.com/"], { maxAgeHours: 0, // read the page from the source now, not the indexed copy prompt: "Which components are not operational right now? Reply with the " + "component names and their status, or All systems operational.", }); const page = results[0]; console.log(`${page.title}: ${page.content}`); } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from keenable import Keenable client = Keenable() # reads KEENABLE_API_KEY from the environment page = client.fetch( ["https://www.githubstatus.com/"], max_age_hours=0, # read the page from the source now, not the indexed copy prompt=( "Which components are not operational right now? Reply with the " "component names and their status, or All systems operational." ), ).results[0] print(f"{page.title}: {page.content}") ``` ```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} package main import ( "context" "fmt" "log" "github.com/keenableai/keenable-sdk/go" ) func main() { client, err := keenable.New(nil) // reads KEENABLE_API_KEY from the environment if err != nil { log.Fatal(err) } defer client.Close() live := 0.0 // read the page from the source now, not the indexed copy resp, err := client.FetchWithOptions(context.Background(), []string{"https://www.githubstatus.com/"}, &keenable.FetchOptions{ MaxAgeHours: &live, Prompt: "Which components are not operational right now? Reply with the " + "component names and their status, or All systems operational.", }) if err != nil { log.Fatal(err) } page := resp.Results[0] fmt.Printf("%s: %s\n", page.Title, page.Content) } ``` ```rust Rust theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} use keenable::{Client, FetchOptions}; #[tokio::main] async fn main() -> Result<(), keenable::Error> { let client = Client::new()?; // reads KEENABLE_API_KEY from the environment let response = client .fetch_with( ["https://www.githubstatus.com/"], &FetchOptions { max_age_hours: Some(0.0), // read the page from the source now, not the indexed copy prompt: Some( "Which components are not operational right now? Reply with the \ component names and their status, or All systems operational." .into(), ), ..Default::default() }, ) .await?; let page = &response.results[0]; println!("{}: {}", page.title, page.content); Ok(()) } ``` ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -G https://api.keenable.ai/v1/fetch/public \ -H "X-Keenable-Title: My App" \ --data-urlencode "url=https://www.githubstatus.com/" \ --data-urlencode "live=true" \ --data-urlencode "prompt=Which components are not operational right now? Reply with the component names and their status, or All systems operational." ``` You see the page title and the answer. This run was made on 19 November 2026: ```text Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} GitHub Status: All systems operational ``` The keyless response has the same shape as any fetch. Nothing in it says whether the page was read live: ```json Response · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "url": "https://www.githubstatus.com/", "title": "GitHub Status", "content": "All systems operational", "description": "", "truncated": false, "total_chars": 23 } ``` ## Indexed copy or live read | Request | What fetch reads | Billed as | | - | - | - | | No `live`, Keenable has a usable indexed copy | The indexed copy | `fetch` | | No `live`, no usable indexed copy | The page from its source | `fetch.live` | | `live=true` | The page from its source | `fetch.live` | Leave `live` out for most pages. Documentation, articles and papers rarely change between the time Keenable indexed them and your call. A search result's `acquired_at` says when Keenable indexed that page, so you can compare it with how often the page changes. ## See which one you paid for With an API key, a successful response carries `usage`. Its `sku` is `fetch` for the indexed copy and `fetch.live` for a live read, whether you set `live=true` or Keenable had no indexed copy. The keyless endpoint leaves `usage` out. See [Balance and usage](/credits) and [Pricing](/pricing#what-each-call-costs). ## Common mistakes | Wrong | Right | Why | | - | - | - | | `live=true` on every fetch | `live=true` only for pages that change often | Every live read is billed as `fetch.live`, and the indexed copy answers most questions. | | `live=yes` or `live=1` | `live=true` | The API returns `400` with `"live": must be true or false`. | | Fetch the whole live page to check one value | Add a `prompt` that asks for that value | A status page's markdown runs to thousands of characters. The answer above is 23. | | Retry a `403` from the target site with `live=true` | Try a different URL | `403` with `Upstream forbidden` means the site blocked the fetch. A live read reaches the same site. See [Errors](/errors#403). | ## In the SDKs, CLI and MCP The SDKs' `fetch` calls [`POST /v1/fetch`](/api-reference/fetch-post), where a live read is `max_age_hours` set to `0`: `max_age_hours=0` in Python, `fetch(urls, { maxAgeHours: 0 })` in TypeScript, `FetchOptions.MaxAgeHours` in Go and `FetchOptions.max_age_hours` in Rust. See [SDK methods](/sdks#methods). The CLI takes `--max-age-hours 0` (see [CLI](/cli#fetch)). Over MCP, `fetch_page_content` takes `max_age_hours: 0` (see [MCP server](/mcp-server#available-tools)). ## API reference * [Fetch request](/api-reference/fetch#request): `live` and the other fetch parameters. * [Fetch](/products/fetch#cost): what each fetch costs. * [Extract part of a page with a prompt](/guides/fetch-with-prompt): write the prompt for a live read. # Read long web pages without filling your context Source: https://docs.keenable.ai/guides/long-pages How to cap fetch output with max_chars, read truncated and total_chars to see what was cut, and switch to a prompt when a page runs past 50,000 characters. Keep a long page from taking over your agent's context. Cap `content` with `max_chars`, read `truncated` and `total_chars` to see how much was left out, and ask a `prompt` for the part you need when the page is longer than your budget. ## Parameters | Parameter | In | Type | Default | Limits | What it does | | - | - | - | - | - | - | | `max_chars` | Query, `/v1/fetch` | integer | `50000` | At least 1 | Maximum number of characters of `content`, counted in Unicode code points. Longer content is cut so that `content`, including a trailing `...`, is never longer than this, and `truncated` is `true`. The `...` is left out when this is 3 or less. | | `prompt` | Query, `/v1/fetch` | string | None | At most 2,000 characters | An instruction for extracting part of the page, at most 2000 characters. When set, a model reads the page and `content` holds only its answer instead of the whole page. | Without `max_chars`, a fetch returns up to 50,000 characters of `content`. Over MCP, `fetch_page_content` returns up to 20,000 unless you set `max_chars`. ## Cap a page, then extract This sample reads the first 2,000 characters of the Python 3.13 release notes, prints whether the page was cut and how long it is, and then asks a prompt for one list from the whole page. The curl tab runs with no API key. The SDK tabs need one, because the SDKs' `fetch` calls [`POST /v1/fetch`](/api-reference/fetch-post): ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { Keenable } from "keenable"; const URL = "https://docs.python.org/3/whatsnew/3.13.html"; async function main() { const client = new Keenable(); // reads KEENABLE_API_KEY from the environment // 1. Read the start of the page, capped at 2,000 characters const [page] = (await client.fetch([URL], { maxChars: 2000 })).results; console.log(`truncated: ${page.truncated}, total_chars: ${page.totalChars}`); // 2. The page is longer than the cap: ask for only the part you need if (page.truncated) { const [part] = ( await client.fetch([URL], { prompt: "List the PEP 594 modules this page says were removed from the standard library, as a comma-separated list.", }) ).results; console.log(part.content); } } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from keenable import Keenable URL = "https://docs.python.org/3/whatsnew/3.13.html" client = Keenable() # reads KEENABLE_API_KEY from the environment # 1. Read the start of the page, capped at 2,000 characters page = client.fetch([URL], max_chars=2000).results[0] print(f"truncated: {page.truncated}, total_chars: {page.total_chars}") # 2. The page is longer than the cap: ask for only the part you need if page.truncated: part = client.fetch( [URL], prompt="List the PEP 594 modules this page says were removed from the standard library, as a comma-separated list.", ).results[0] print(part.content) ``` ```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} package main import ( "context" "fmt" "log" "github.com/keenableai/keenable-sdk/go" ) const url = "https://docs.python.org/3/whatsnew/3.13.html" func main() { ctx := context.Background() client, err := keenable.New(nil) // reads KEENABLE_API_KEY from the environment if err != nil { log.Fatal(err) } defer client.Close() // 1. Read the start of the page, capped at 2,000 characters resp, err := client.FetchWithOptions(ctx, []string{url}, &keenable.FetchOptions{MaxChars: 2000}) if err != nil { log.Fatal(err) } page := resp.Results[0] truncated := page.Truncated != nil && *page.Truncated if page.TotalChars != nil { fmt.Printf("truncated: %t, total_chars: %d\n", truncated, *page.TotalChars) } // 2. The page is longer than the cap: ask for only the part you need if truncated { part, err := client.FetchWithOptions(ctx, []string{url}, &keenable.FetchOptions{ Prompt: "List the PEP 594 modules this page says were removed from the standard library, as a comma-separated list.", }) if err != nil { log.Fatal(err) } fmt.Println(part.Results[0].Content) } } ``` ```rust Rust theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} use keenable::{Client, FetchOptions}; const URL: &str = "https://docs.python.org/3/whatsnew/3.13.html"; #[tokio::main] async fn main() -> Result<(), keenable::Error> { let client = Client::new()?; // reads KEENABLE_API_KEY from the environment // 1. Read the start of the page, capped at 2,000 characters let response = client .fetch_with([URL], &FetchOptions { max_chars: Some(2000), ..Default::default() }) .await?; let page = &response.results[0]; let truncated = page.truncated.unwrap_or(false); println!("truncated: {}, total_chars: {}", truncated, page.total_chars.unwrap_or(0)); // 2. The page is longer than the cap: ask for only the part you need if truncated { let part = client .fetch_with( [URL], &FetchOptions { prompt: Some( "List the PEP 594 modules this page says were removed from the standard library, as a comma-separated list." .into(), ), ..Default::default() }, ) .await?; println!("{}", part.results[0].content); } Ok(()) } ``` ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} # 1. Read the start of the page, capped at 2,000 characters curl -G https://api.keenable.ai/v1/fetch/public \ -H "X-Keenable-Title: My App" \ --data-urlencode "url=https://docs.python.org/3/whatsnew/3.13.html" \ --data-urlencode "max_chars=2000" # 2. If the response has "truncated": true, ask for only the part you need curl -G https://api.keenable.ai/v1/fetch/public \ -H "X-Keenable-Title: My App" \ --data-urlencode "url=https://docs.python.org/3/whatsnew/3.13.html" \ --data-urlencode "prompt=List the PEP 594 modules this page says were removed from the standard library, as a comma-separated list." ``` You see that the page is 191,381 characters long, so the first call kept about 1% of it. The second call returns only the list of PEP 594 removals. This run was made on 19 November 2026, and the Python output is shown: ```text Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} truncated: True, total_chars: 191381 aifc, audioop, cgi, cgitb, chunk, crypt, imghdr, mailcap, msilib, nis, nntplib, ossaudiodev, pipes, sndhdr, spwd, sunau, telnetlib, uu, xdrlib ``` ## Read what was cut These fields of the fetch response tell your code whether it has the whole page: | Field | Value when the page fits | Value when the page was cut | | - | - | - | | `truncated` | `false` | `true` | | `total_chars` | The length of `content` | The length of the full page, before the cut | | `content` | The whole page | The start of the page, ending with `...`, never longer than `max_chars` | Lengths count Unicode code points, not bytes or tokens. With a `prompt`, all three describe the model's answer instead of the page. ## Choose a strategy | Situation | What to send | | - | - | | You need the opening of the page, such as a summary or an abstract | `max_chars` set to your budget | | You need a few facts from anywhere in the page | `prompt` that names them | | You need exact text from the middle or the end | A more specific URL, such as the page's own subpage, or a larger `max_chars` | | You don't know yet | A small `max_chars` first, then decide from `total_chars` | Fetch always cuts from the end: `max_chars` keeps the start of the page, and there is no parameter to start reading later in the page. To reach text near the end of a long page, use a `prompt` or a URL closer to that text. ## Common mistakes | Wrong | Right | Why | | - | - | - | | Treat `content` as the whole page | Check `truncated` first | A page longer than `max_chars` is cut, and the default cap is 50,000 characters. | | `max_chars=0` or `max_chars=-1` | A positive integer | The API returns `400` with `"max_chars": must be a positive integer`. | | Raise `max_chars` until the whole page fits | Ask a `prompt` for the part you need | A 191,381-character page fills most of an agent's context. The list of PEP 594 removals it needed was 142 characters. | | A `prompt` on a page that fails as too long | Fetch without `prompt`, or use a more specific URL | If the page is too long to run a prompt over, the API returns `400` with `The page is too long to run a prompt over`. | | Count `max_chars` in tokens | Count characters | `max_chars` caps Unicode code points. A token is often several characters. | ## In the SDKs, CLI and MCP Every SDK returns `truncated` and `total_chars` on the page it fetches: `page.truncated` and `page.total_chars` in Python and Rust, `page.truncated` and `page.totalChars` in TypeScript, `Truncated` and `TotalChars` in Go. The CLI takes `--max-chars` and prints both fields (see [CLI](/cli)). Over MCP, `fetch_page_content` adds a line such as `Truncated: showing the first 2000 of 191381 characters` when it cuts a page (see [MCP server](/mcp-server#available-tools)). ## API reference * [Fetch response](/api-reference/fetch#response): `content`, `truncated` and `total_chars`. * [Extract part of a page with a prompt](/guides/fetch-with-prompt): write a prompt that returns parseable output. * [Search, then fetch](/guides/search-then-fetch): answer from snippets before you fetch at all. # Receive and verify monitor webhooks Source: https://docs.keenable.ai/guides/monitor-webhooks Get each new monitor result at your endpoint: subscribe to monitor.result.found, verify the Standard Webhooks signature, test locally, debug failed deliveries. Get each page a monitor accepts at your own endpoint, minutes after Keenable crawls it, with no polling loop. Subscribe the monitor to `monitor.result.found`, check the signature on every delivery, and answer with a `2xx` status. For the body and headers of each event type, see [Webhook payload](/api-reference/monitors-webhook-payload). You need an [API key](/api-keys), a monitor, and an HTTPS endpoint that the public internet can reach. To create a monitor, see [Create a monitor](/guides/create-a-monitor). ## Subscribe to new results A monitor with a webhook sends `monitor.result.found` for each new result unless `webhook.events` leaves it out. Set the webhook in the create request. The create response carries the signing secret, `webhook.secret`. This request creates a monitor that sends only new results, changed results and the disabled notice to your endpoint: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST https://api.keenable.ai/v1/monitors \ -H "X-API-Key: $KEENABLE_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: open-weights-llm-releases" \ -d '{ "name": "Open-weights LLM releases", "search": {"query": "new open-weights LLM releases"}, "webhook": { "url": "https://hooks.example.com/keenable", "events": ["monitor.result.found", "monitor.result.changed", "monitor.disabled"] } }' ``` The response is the new monitor with `webhook.url`, `webhook.events` and `webhook.secret`. Store the secret now, for example as `KEENABLE_WEBHOOK_SECRET` in your secret manager. Once `webhook.events` is set, the monitor sends only the types it lists. If you leave `webhook.events` out, the monitor sends every event type, results included. To change `webhook.url` or `webhook.events` later, send them to [Update a monitor](/api-reference/monitors/update). The secret stays the same. If you add a webhook to a monitor that had none, the update response carries `webhook.secret` once. Store it then: no later response returns it. ## Verify the signature Every delivery is an HTTP `POST` signed under the [Standard Webhooks](https://www.standardwebhooks.com) scheme. The signature is HMAC-SHA256 over `..`, keyed with the base64-decoded part of `webhook.secret` after `whsec_`. Check it on the raw request body, before you parse the JSON. These handlers listen on port 8080, refuse a body over 1 MB, reject a delivery whose signature doesn't match or whose timestamp is more than 5 minutes from now, and print the event's `id` and `type`. The size cap and read timeouts stop an unsigned sender from tying up memory or connections before the signature check. The TypeScript and Python handlers use only the standard library. The Go handler uses `VerifyWebhook` from the SDK: ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { createHmac, timingSafeEqual } from "node:crypto"; import { createServer } from "node:http"; const secret = process.env.KEENABLE_WEBHOOK_SECRET ?? ""; if (!secret.startsWith("whsec_")) throw new Error("Set KEENABLE_WEBHOOK_SECRET to the monitor's webhook.secret"); const key = Buffer.from(secret.slice("whsec_".length), "base64"); function verify(body: Buffer, id: string, timestamp: string, signatures: string): boolean { if (!/^\d+$/.test(timestamp) || Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false; const expected = createHmac("sha256", key).update(`${id}.${timestamp}.`).update(body).digest(); return signatures.split(" ").some((entry) => { const [version, signature = ""] = entry.split(","); const given = Buffer.from(signature, "base64"); return version === "v1" && given.length === expected.length && timingSafeEqual(given, expected); }); } const MAX_BODY = 1_000_000; const server = createServer((req, res) => { const chunks: Buffer[] = []; let size = 0; req.on("data", (chunk: Buffer) => { size += chunk.length; if (size > MAX_BODY) { res.writeHead(413).end(); req.destroy(); return; } chunks.push(chunk); }); req.on("end", () => { if (size > MAX_BODY) return; const body = Buffer.concat(chunks); const header = (name: string) => String(req.headers[name] ?? ""); if (!verify(body, header("webhook-id"), header("webhook-timestamp"), header("webhook-signature"))) { res.writeHead(400).end(); return; } const event = JSON.parse(body.toString("utf8")); console.log(event.id, event.type); res.writeHead(204).end(); }); }); server.requestTimeout = 10_000; server.headersTimeout = 5_000; server.listen(8080); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import base64 import hashlib import hmac import json import os import time from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer MAX_BODY = 1_000_000 SECRET = os.environ.get("KEENABLE_WEBHOOK_SECRET", "") if not SECRET.startswith("whsec_"): raise SystemExit("Set KEENABLE_WEBHOOK_SECRET to the monitor's webhook.secret") KEY = base64.b64decode(SECRET.removeprefix("whsec_")) def verify(body: bytes, msg_id: str, timestamp: str, signatures: str) -> bool: if not timestamp.isdigit() or abs(time.time() - int(timestamp)) > 300: return False mac = hmac.new(KEY, f"{msg_id}.{timestamp}.".encode() + body, hashlib.sha256) expected = base64.b64encode(mac.digest()).decode() for entry in signatures.split(): version, _, signature = entry.partition(",") if version == "v1" and hmac.compare_digest(signature, expected): return True return False class Handler(BaseHTTPRequestHandler): timeout = 10 def do_POST(self): raw = self.headers.get("Content-Length", "") if not (raw.isascii() and raw.isdigit()) or int(raw) > MAX_BODY: self.send_response(413 if raw.isascii() and raw.isdigit() else 411) self.end_headers() return body = self.rfile.read(int(raw)) if not verify( body, self.headers.get("webhook-id", ""), self.headers.get("webhook-timestamp", ""), self.headers.get("webhook-signature", ""), ): self.send_response(400) self.end_headers() return event = json.loads(body) print(event["id"], event["type"], flush=True) self.send_response(204) self.end_headers() ThreadingHTTPServer(("", 8080), Handler).serve_forever() ``` ```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} package main import ( "errors" "fmt" "io" "log" "net/http" "os" "time" "github.com/keenableai/keenable-sdk/go" ) func main() { secret := os.Getenv("KEENABLE_WEBHOOK_SECRET") if secret == "" { log.Fatal("set KEENABLE_WEBHOOK_SECRET to the monitor's webhook.secret") } http.HandleFunc("/keenable", func(w http.ResponseWriter, r *http.Request) { body, err := io.ReadAll(http.MaxBytesReader(w, r.Body, 1_000_000)) if err != nil { http.Error(w, "", http.StatusBadRequest) return } event, err := keenable.VerifyWebhook(body, r.Header, secret, nil) var refused *keenable.WebhookVerificationError if errors.As(err, &refused) { http.Error(w, "", http.StatusBadRequest) return } else if err != nil { http.Error(w, "", http.StatusInternalServerError) return } fmt.Println(event.ID, event.Type) w.WriteHeader(http.StatusNoContent) }) server := &http.Server{Addr: ":8080", ReadHeaderTimeout: 5 * time.Second, ReadTimeout: 10 * time.Second} log.Fatal(server.ListenAndServe()) } ``` When a page arrives, your handler prints a line such as `evt_9f2c4e1a7b3d4c5e8f6a0b1c2d3e4f5a monitor.result.found` and answers `204`. A forged delivery, or one whose timestamp is more than 5 minutes off, gets `400`. ## Drop repeated events These handlers only verify and print. A retry of an event you already handled passes the signature check too, because an event keeps its `id` across retries. Record the `id` and do the event's work in one transaction: if the work fails, the record rolls back too, so the retry runs it again. Skip an event whose `id` is already recorded, and still answer `2xx` so Keenable stops retrying. In Python with SQLite, when the work writes to the same database: ```python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import sqlite3 def handle_once(event: dict, work) -> None: """Runs work(db, event) at most once per event id. Raises if work fails, so nothing is recorded.""" db = sqlite3.connect("events.db", timeout=30) try: with db: db.execute("CREATE TABLE IF NOT EXISTS seen (id TEXT PRIMARY KEY)") if db.execute("INSERT OR IGNORE INTO seen (id) VALUES (?)", (event["id"],)).rowcount == 0: return work(db, event) finally: db.close() ``` Call `handle_once(event, work)` after the signature check and answer `204`. Each call opens its own connection, so concurrent deliveries on the threaded handler never share a transaction. If it raises, answer `500`: the transaction rolls back and Keenable delivers the event again. For work outside the database, such as a call to another API, store the event as pending in the same insert, answer `204`, and have a worker mark it done after the call succeeds. The Go handler needs Go SDK 0.2.0 or later. SDK 0.2.0 adds `verify_webhook` to the Python and Rust SDKs and `verifyWebhook` to the TypeScript SDK. They do the same checks and return a typed event. See [Verify a webhook](/products/monitors#verify-a-webhook) for a handler in each language. Any Standard Webhooks library also verifies these deliveries with the monitor's `webhook.secret`. ## Test your handler locally You don't need a real event to test your handler. This script signs a sample `monitor.result.found` delivery with your secret, the same way Keenable does, and sends it to `localhost:8080`: ```python send_test_event.py theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import base64 import hashlib import hmac import json import os import time import urllib.request key = base64.b64decode(os.environ["KEENABLE_WEBHOOK_SECRET"].removeprefix("whsec_")) event = { "id": "evt_test_0001", "type": "monitor.result.found", "created_at": "2026-11-19T09:00:00.000Z", "data": { "monitor_id": "mon_3kq9z2c8f1a04b7d9e6f5a21", "result": {"url": "https://example.com/news/example", "title": "Example headline", "importance": 4}, }, "metadata": {"team": "policy"}, } body = json.dumps(event, separators=(",", ":")).encode() msg_id, timestamp = event["id"], str(int(time.time())) mac = hmac.new(key, f"{msg_id}.{timestamp}.".encode() + body, hashlib.sha256) request = urllib.request.Request( "http://localhost:8080/keenable", data=body, method="POST", headers={ "Content-Type": "application/json", "webhook-id": msg_id, "webhook-timestamp": timestamp, "webhook-signature": "v1," + base64.b64encode(mac.digest()).decode(), }, ) with urllib.request.urlopen(request) as response: print(response.status) ``` Start your handler, then run the script with the same `KEENABLE_WEBHOOK_SECRET`. The script prints `204` and your handler prints `evt_test_0001 monitor.result.found`. To test without a real secret, set both to a generated one: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} export KEENABLE_WEBHOOK_SECRET="whsec_$(python3 -c 'import base64, os; print(base64.b64encode(os.urandom(24)).decode())')" ``` ## Answer fast and drop repeats Keenable delivers events under these rules. Build your handler around them: | Rule | Value | What your handler does | | - | - | - | | Success | Any `2xx` status within 15 seconds | Verify, store the event, answer, then do slow work, such as calling a model, in the background. | | Redirects | Not followed. A `3xx` counts as a failure | Point `webhook.url` at the final address. | | Retries | Backoff from 30 seconds, doubling up to 6 hours, up to 12 attempts | Expect the same event more than once. | | Not retried | A `4xx` other than `408` or `429` | Return `4xx` only for a delivery you never want again, such as a bad signature. Return a `5xx` for a temporary fault. | | Event `id` | The same on every retry, and equal to the `webhook-id` header | Drop an event whose `id` you've already stored. | | Order | Events of one monitor arrive in order. A failed event holds back that monitor's later events until it succeeds or runs out of attempts | Don't reorder events of one monitor. | | Disabling | If no delivery succeeds for 3 days, Keenable disables the monitor and sends `monitor.disabled` | Fix the endpoint, then send `{"status": "active"}` with [Update a monitor](/api-reference/monitors/update). | ## Debug failed deliveries [List deliveries](/api-reference/monitors/deliveries) shows each event of the last 7 days with its attempts, its last error and when the next attempt is due. This request lists the latest 10: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -G https://api.keenable.ai/v1/monitors/mon_3kq9z2c8f1a04b7d9e6f5a21/deliveries \ -H "X-API-Key: $KEENABLE_API_KEY" \ --data-urlencode "limit=10" ``` Each entry carries `type`, `attempts`, `delivered_at`, `last_error` and `next_attempt_at`. With the [CLI](/cli), `keenable monitors deliveries mon_3kq9z2c8f1a04b7d9e6f5a21 -p` prints the same list. Read `last_error` against this table: | `last_error` | Why | What to do | | - | - | - | | `HTTP 400` or another `4xx` | Your handler refused the delivery. If the code isn't `408` or `429`, Keenable doesn't retry it | Check that your handler verifies the raw body with the `webhook.secret` from the create response, or from the update that added the webhook. | | `HTTP 301`, `HTTP 302`, `HTTP 307` or `HTTP 308` | Your URL redirects, and Keenable doesn't follow redirects | Set `webhook.url` to the final address. | | `HTTP 500` or another `5xx` | Your handler failed | Fix the handler. Keenable retries the event with backoff. | | A timeout or connection error | Your endpoint didn't answer within 15 seconds, or isn't reachable | Answer before you do slow work. Check that the host is public. | | `bad url: ...` | Keenable can't send to the stored address | Set a valid public HTTPS URL with [Update a monitor](/api-reference/monitors/update). | If `data` is empty, the monitor hasn't sent anything. Check that `webhook.events` is empty or lists `monitor.result.found`, and that new results exist with [Read monitor results](/guides/read-monitor-results). ## Related pages * [Webhook payload](/api-reference/monitors-webhook-payload): the headers, the envelope and the `data` of every event type. * [Create a monitor](/guides/create-a-monitor): set the webhook in the create request. * [Monitors](/products/monitors#webhook-events): which events a monitor sends by default. # Read monitor results by polling, runs or MCP Source: https://docs.keenable.ai/guides/read-monitor-results How to read the pages a Keenable monitor found: poll new results since your last read, read each run's digest, or let your agent read them over MCP. Get the pages a monitor found since you last looked, without a webhook. Poll the monitor's results and stop at the last one you've seen, read the digest each scheduled run returns, or let your agent read new results over MCP. To get each page pushed to your endpoint instead, see [Receive monitor webhooks](/guides/monitor-webhooks). You need an [API key](/api-keys) and a monitor's `id`. To make one, see [Create a monitor](/guides/create-a-monitor). ## Choose how to read | Way | Endpoint or tool | What it returns | Use it if | | - | - | - | - | | Poll results | [List results](/api-reference/monitors/results), `GET /v1/monitors/{id}/results` | Every result the monitor accepted, newest first, from its last 500 | Your code runs on its own timer, such as a cron job | | Read runs | [List runs](/api-reference/monitors/runs), `GET /v1/monitors/{id}/runs` | Each run with the results found since the previous run, most important first | The monitor has a `schedule` and you want a digest | | Ask your agent | [`get_monitor_results`](/mcp-server#monitors-tools) on the MCP server | Results this reader hasn't been given yet, across all monitors, each once | An agent reads the news for you | ## Poll for new results Polling needs one piece of state: the `id` of the newest result you've already read. Results come newest first, so each poll reads until it reaches that `id`. This sample keeps the `id` in `last_seen.txt`, reads only results with importance 4 or higher, and prints the new ones oldest first: ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { existsSync, readFileSync, writeFileSync } from "node:fs"; import { Keenable, type MonitorResult } from "keenable"; const MONITOR_ID = "mon_3kq9z2c8f1a04b7d9e6f5a21"; const STATE = "last_seen.txt"; async function main() { // reads KEENABLE_API_KEY from the environment const client = new Keenable(); const lastSeen = existsSync(STATE) ? readFileSync(STATE, "utf8").trim() : null; const fresh: MonitorResult[] = []; let cursor: string | undefined; while (true) { const page = await client.monitors.results(MONITOR_ID, { minImportance: 4, limit: 50, cursor }); const at = page.data.findIndex((result) => result.id === lastSeen); fresh.push(...(at === -1 ? page.data : page.data.slice(0, at))); // the first poll reads one page; later polls page back to the last seen result if (at !== -1 || lastSeen === null || !page.nextCursor) break; cursor = page.nextCursor; } for (const result of [...fresh].reverse()) { console.log(result.importance, result.title, result.url); } if (fresh.length > 0) writeFileSync(STATE, fresh[0].id ?? ""); } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from pathlib import Path from keenable import Keenable MONITOR_ID = "mon_3kq9z2c8f1a04b7d9e6f5a21" STATE = Path("last_seen.txt") # reads KEENABLE_API_KEY from the environment client = Keenable() last_seen = STATE.read_text().strip() if STATE.exists() else None new, cursor = [], None while True: page = client.monitors.results(MONITOR_ID, min_importance=4, limit=50, cursor=cursor) seen = False for result in page.data: if result.id == last_seen: seen = True break new.append(result) # the first poll reads one page; later polls page back to the last seen result if seen or last_seen is None or not page.next_cursor: break cursor = page.next_cursor for result in reversed(new): print(result.importance, result.title, result.url) if new: STATE.write_text(new[0].id or "") ``` ```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} package main import ( "context" "errors" "fmt" "io/fs" "log" "os" "strings" "github.com/keenableai/keenable-sdk/go" ) const ( monitorID = "mon_3kq9z2c8f1a04b7d9e6f5a21" state = "last_seen.txt" ) func main() { // reads KEENABLE_API_KEY from the environment client, err := keenable.New(nil) if err != nil { log.Fatal(err) } defer client.Close() lastSeen := "" if saved, err := os.ReadFile(state); err == nil { lastSeen = strings.TrimSpace(string(saved)) } else if !errors.Is(err, fs.ErrNotExist) { log.Fatal(err) } var fresh []keenable.MonitorResult cursor := "" for { page, err := client.Monitors.Results(context.Background(), monitorID, &keenable.MonitorResultsParams{MinImportance: 4, Limit: 50, Cursor: cursor}) if err != nil { log.Fatal(err) } seen := false for _, result := range page.Data { if result.ID != nil && *result.ID == lastSeen { seen = true break } fresh = append(fresh, result) } // the first poll reads one page; later polls page back to the last seen result if seen || lastSeen == "" || page.NextCursor == "" { break } cursor = page.NextCursor } for i := len(fresh) - 1; i >= 0; i-- { result := fresh[i] importance, title := 0, "" if result.Importance != nil { importance = *result.Importance } if result.Title != nil { title = *result.Title } fmt.Println(importance, title, result.URL) } if len(fresh) > 0 && fresh[0].ID != nil { if err := os.WriteFile(state, []byte(*fresh[0].ID), 0o644); err != nil { log.Fatal(err) } } } ``` ```rust Rust theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} use keenable::{Client, MonitorResultsParams}; const MONITOR_ID: &str = "mon_3kq9z2c8f1a04b7d9e6f5a21"; const STATE: &str = "last_seen.txt"; #[tokio::main] async fn main() -> Result<(), Box> { // reads KEENABLE_API_KEY from the environment let client = Client::new()?; let last_seen = std::fs::read_to_string(STATE).ok().map(|s| s.trim().to_string()); let mut fresh = Vec::new(); let mut cursor = None; loop { let params = MonitorResultsParams { min_importance: Some(4), limit: Some(50), cursor }; let page = client.monitors().results(MONITOR_ID, ¶ms).await?; let mut seen = false; for result in page.data { if result.id.is_some() && result.id == last_seen { seen = true; break; } fresh.push(result); } // the first poll reads one page; later polls page back to the last seen result if seen || last_seen.is_none() || page.next_cursor.is_none() { break; } cursor = page.next_cursor; } for result in fresh.iter().rev() { let importance = result.importance.unwrap_or_default(); let title = result.title.as_deref().unwrap_or_default(); println!("{importance} {title} {}", result.url); } if let Some(id) = fresh.first().and_then(|result| result.id.as_deref()) { std::fs::write(STATE, id)?; } Ok(()) } ``` ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -G https://api.keenable.ai/v1/monitors/mon_3kq9z2c8f1a04b7d9e6f5a21/results \ -H "X-API-Key: $KEENABLE_API_KEY" \ --data-urlencode "min_importance=4" \ --data-urlencode "limit=50" ``` The SDK tabs need SDK 0.2.0 or later, the first version with Monitors. If your package manager doesn't offer 0.2.0 yet, use the curl tab, which reads one page of 50. The first poll prints up to 50 results and saves the newest `id`. Each later poll prints only what arrived since, one line per result: ```text Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} 4 Commission opens first AI Act investigation into a model provider https://example.com/news/ai-act-investigation 5 Regulator fines company under the AI Act https://example.org/2026/11/ai-act-fine ``` If nothing new arrived, the poll prints nothing and leaves `last_seen.txt` as it was. ## Page through results Every list in the Monitors API returns `data`, `has_more` and `next_cursor`. To get the next page, pass `next_cursor` as `cursor`. The last `id` on a page is its `next_cursor`. These parameters apply to [List results](/api-reference/monitors/results): | Parameter | Effect | Values | | - | - | - | | `limit` | Results per page | 1 to 100, default 50 | | `cursor` | Start after this result | The previous page's `next_cursor` | | `min_importance` | Keep results rated at least this important | 1 to 5. A monitor accepts no page under 3, so `4` and `5` are the useful values | Use the same `min_importance` on every poll. A saved `id` from an unfiltered poll may not appear in a filtered one, and the poll then reads back through all 500 results. ## Read the results of a run If the monitor has a schedule, each run holds the results found since the previous run. This request returns the latest run: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -G https://api.keenable.ai/v1/monitors/mon_3kq9z2c8f1a04b7d9e6f5a21/runs \ -H "X-API-Key: $KEENABLE_API_KEY" \ --data-urlencode "limit=1" ``` You get one run in `data`. Its `status` is `queued`, `running`, `completed`, `failed` or `cancelled`. Its `results` is a list when the run completed, `[]` if it found nothing new, and `null` before it completes. A run returns at most the monitor's `search.max_results`, and the results past that limit stay in [List results](/api-reference/monitors/results). To get a digest now instead of at the next scheduled time, call [Run a monitor now](/api-reference/monitors/trigger). It returns a run with `status` `queued`. Read it a few seconds later with [Get a run](/api-reference/monitors/run). ## Read results from the CLI With the [CLI](/cli) installed and `keenable login` done, this command prints a monitor's important results in a readable view: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} keenable monitors results mon_3kq9z2c8f1a04b7d9e6f5a21 --min-importance 4 -p ``` If there are more results, the CLI ends with a hint such as `More: add --cursor `. ## Common mistakes | Wrong | Right | Why | | - | - | - | | Sorting or deduplicating on `published_at` | Use `matched_at`, or the result's `id` | `published_at` is when the page was published, and it can be `null`. `matched_at` is when the monitor accepted the page. | | Reading every page of results on each poll | Stop at the `id` you saved last time | Results come newest first, so everything after that `id` is already read. | | Expecting results from before the monitor existed | Use [Search](/products/search) with `published_after` | A monitor matches only pages crawled after it was created, and it doesn't backfill. | | Polling runs on a monitor with no schedule | Poll [List results](/api-reference/monitors/results), or add a `schedule` | Without a schedule, a monitor runs only when you trigger it. | | Expecting more than the last 500 results | Poll often enough to stay inside the window | [List results](/api-reference/monitors/results) covers a monitor's last 500 results. | ## API reference * [List results](/api-reference/monitors/results): every parameter and result field. * [List runs](/api-reference/monitors/runs) and [Get a run](/api-reference/monitors/run): a run's `results`, `output` and `error`. * [Result fields](/products/monitors#read-the-results): `summary`, `importance`, `same_story` and the rest. * [Webhook payload](/api-reference/monitors-webhook-payload): the same result fields, pushed to your endpoint. # Control the size of web search results Source: https://docs.keenable.ai/guides/result-size How to set max_results (1 to 50) and snippet_max_length (180 to 10,000) so search results fit your context, and when to send disable_cards for web pages only. Decide how much text a search puts in your agent's context before you send it. `max_results` sets how many results come back, `snippet_max_length` caps the page text in each one, and `disable_cards` keeps every result an ordinary web page. ## Parameters | Parameter | In | Type | Default | Limits | What it does | | - | - | - | - | - | - | | `max_results` | Body, `/v1/search` | integer | `10` | 1 to 50 | Maximum number of results to return. Fewer come back if fewer pages match. | | `snippet_max_length` | Body, `/v1/search` | integer | None | 180 to 10,000 | Maximum characters of page text in each result's `snippet`. Without it, snippets can run to several thousand characters. | | `disable_cards` | Body, `/v1/search` | boolean | `false` | None | Set to `true` to leave cards (results at `https://cards.keenable.ai/w/` that Keenable writes for queries such as prices or company facts) out of the results; ordinary web pages take their place. | A search costs the same whether it returns 1 result or 50. See [Pricing](/pricing#what-each-call-costs). ## Search with a fixed size and no cards This sample asks for 3 results with snippets of at most 180 characters and no cards, then prints each URL with the length of its snippet. It runs with no API key: ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} // Needs keenable 0.2.0 or later on npm for disableCards. import { Keenable } from "keenable"; async function main() { const client = new Keenable(); // keyless: no API key needed to try it const results = await client.search("bitcoin price in USD", { maxResults: 3, // at most 3 results snippetMaxLength: 180, // at most 180 characters of page text each disableCards: true, // web pages only, no cards.keenable.ai results }); for (const result of results) { console.log([...result.snippet].length, result.url); } } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from keenable import Keenable client = Keenable() # keyless: no API key needed to try it results = client.search( "bitcoin price in USD", max_results=3, # at most 3 results snippet_max_length=180, # at most 180 characters of page text each disable_cards=True, # web pages only, no cards.keenable.ai results ) for result in results: print(len(result.snippet), result.url) ``` ```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} package main import ( "context" "fmt" "log" "unicode/utf8" "github.com/keenableai/keenable-sdk/go" ) func main() { client, err := keenable.New(nil) // keyless: no API key needed to try it if err != nil { log.Fatal(err) } defer client.Close() snippetCap := 180 // at most 180 characters of page text each results, err := client.Search(context.Background(), "bitcoin price in USD", &keenable.SearchOptions{ MaxResults: 3, // at most 3 results SnippetMaxLength: &snippetCap, DisableCards: true, // web pages only, no cards.keenable.ai results }) if err != nil { log.Fatal(err) } for _, result := range results.Results { fmt.Println(utf8.RuneCountInString(result.Snippet), result.URL) } } ``` ```rust Rust theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} use keenable::{Client, SearchOptions}; #[tokio::main] async fn main() -> Result<(), keenable::Error> { let client = Client::new()?; // keyless: no API key needed to try it let results = client .search_with( "bitcoin price in USD", &SearchOptions { max_results: Some(3), // at most 3 results snippet_max_length: Some(180), // at most 180 characters of page text each disable_cards: true, // web pages only, no cards.keenable.ai results ..Default::default() }, ) .await?; for result in &results { println!("{} {}", result.snippet.chars().count(), result.url); } Ok(()) } ``` ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST https://api.keenable.ai/v1/search/public \ -H "Content-Type: application/json" \ -H "X-Keenable-Title: My App" \ -d '{ "query": "bitcoin price in USD", "max_results": 3, "snippet_max_length": 180, "disable_cards": true }' ``` You see 3 web pages, each snippet at most 180 characters long. This run was made on 19 November 2026: ```text Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} 174 https://coingecko.com/en/coins/bitcoin 93 https://finance.yahoo.com/quote/BTC-USD/history 153 https://coinbase.com/converter/wld ``` ## Cards and disable_cards For queries such as prices, exchange rates or facts about a company, Keenable can write a result itself: a card. A card's `url` starts with `https://cards.keenable.ai/w/` and works for one day. This result is from the same request without `disable_cards`: ```json Response excerpt · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "title": "Bitcoin (BTC) to USD conversion rate: Exchange rate from Bitcoin (BTC) to United States Dollar (USD).", "url": "https://cards.keenable.ai/w/01a1f3cb-38ae-7292-83cb-e632038c78ce", "description": "", "snippet": "\nExchange rate from Bitcoin (BTC) to United States Dollar (USD). The current rate is $63,716 per BTC. The rate fell 0.8865% (569.894 USD) over the past day, from Nov 18, 2026", "published_at": "2026-11-19T12:32:24Z", "acquired_at": "2026-11-19T12:32:24Z" } ``` With `disable_cards: true`, an ordinary web page takes the card's place, so you still get the same number of results. Send it when your code stores URLs, cites them after a day, or must cite the original publisher. ## Pick the sizes Start from the job, then tune with what your agent's context can hold: | Job | `max_results` | `snippet_max_length` | | - | - | - | | Pick one page to fetch | 3 to 5 | 180 to 300 | | Answer from snippets with citations | 5 to 10 | 500 to 1,000 | | Survey a topic broadly | 20 to 50 | 180 to 300 | | Read one source in depth without a fetch | 1 to 3 | 2,000 to 10,000 | If you leave `snippet_max_length` out, snippets can run to several thousand characters each, and 10 results come back. Set both on every search an agent makes. ## Common mistakes | Wrong | Right | Why | | - | - | - | | `"snippet_max_length": 100` | A value from 180 to 10000 | The API returns `400` with `"snippet_max_length": must be an integer between 180 and 10000`. | | `"max_results": 100` | A value from 1 to 50, or several narrower searches | The API returns `400` with `"max_results": must be an integer between 1 and 50`. | | Expect exactly `max_results` results | Handle fewer | Fewer come back when fewer pages match, or when `exclude_domains` drops some. | | Cite a card URL in a stored report | Send `disable_cards: true`, or cite within a day | A card URL stops working after one day. | ## In the SDKs, CLI and MCP | Parameter | Python | TypeScript | Go | Rust | CLI | | - | - | - | - | - | - | | `max_results` | `max_results` | `maxResults` | `MaxResults` | `max_results` | `--max-results` | | `snippet_max_length` | `snippet_max_length` | `snippetMaxLength` | `SnippetMaxLength` | `snippet_max_length` | `--snippet-max-length` | | `disable_cards` | `disable_cards` | `disableCards`, from `keenable` 0.2.0 | `DisableCards` | `disable_cards` | Not available | Over MCP, `search_web_pages` takes all three (see [MCP server](/mcp-server#available-tools)). To size the prompt block you build from the results, see [Control context size](/best-practices#control-context-size). ## API reference * [Search request](/api-reference/search#request): `max_results`, `snippet_max_length` and `disable_cards` in full. * [Search, then fetch](/guides/search-then-fetch): read snippets first and fetch only what they miss. * [Ground answers with citations](/guides/ground-answers-with-citations): turn the results into a cited prompt. # Search with operators: exact phrases, several sites, exclusions Source: https://docs.keenable.ai/guides/search-operators How to put quoted phrases, site:, OR, - and parentheses in a query, when to use them instead of the site and exclude_domains parameters, and the 400 fix. Turn part of a query into a hard filter. Quote an exact error string, search several sites in one request, or leave a site or a phrase out, while the rest of the query stays a plain-language description that Keenable ranks by meaning. ## Parameters | Parameter | In | Type | Default | Limits | What it does | | - | - | - | - | - | - | | `query` | Body, `/v1/search` | string | Required | None | What to search for, in plain language. It must contain search terms; operators such as `site:` alone return `400`, except that a query with only `site:` operators searches for the site name and adds a `warning`. | | `site` | Body, `/v1/search` | string | None | None | Return results from one site only. Subdomains are included, and a path narrows further (`github.com/microsoft`). | | `exclude_domains` | Body, `/v1/search` | array of strings | None | At most 2,000 entries | Never return results from these hosts. Each entry is a host name and also excludes every subdomain: `yahoo.com` also excludes `finance.yahoo.com`. | The operators go inside `query`. [Search operators](/api-reference/search#search-operators) in the API reference lists each one with its exact rules. ## Search two sites for an exact error string This sample searches GitHub and Stack Overflow in one request for pages that contain the exact phrase `other side closed`, and prints the host and URL of each result. It runs with no API key: ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { Keenable } from "keenable"; async function main() { const client = new Keenable(); // keyless: no API key needed to try it const results = await client.search( 'connection pool timeout "other side closed" site:github.com OR site:stackoverflow.com', { maxResults: 5, snippetMaxLength: 180 }, ); for (const result of results) { console.log(new URL(result.url).hostname, result.url); } } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from urllib.parse import urlsplit from keenable import Keenable client = Keenable() # keyless: no API key needed to try it results = client.search( 'connection pool timeout "other side closed" site:github.com OR site:stackoverflow.com', max_results=5, snippet_max_length=180, ) for result in results: print(urlsplit(result.url).hostname, result.url) ``` ```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} package main import ( "context" "fmt" "log" "net/url" "github.com/keenableai/keenable-sdk/go" ) func main() { client, err := keenable.New(nil) // keyless: no API key needed to try it if err != nil { log.Fatal(err) } defer client.Close() snippetCap := 180 results, err := client.Search(context.Background(), `connection pool timeout "other side closed" site:github.com OR site:stackoverflow.com`, &keenable.SearchOptions{MaxResults: 5, SnippetMaxLength: &snippetCap}) if err != nil { log.Fatal(err) } for _, result := range results.Results { host := "" if u, err := url.Parse(result.URL); err == nil { host = u.Hostname() } fmt.Println(host, result.URL) } } ``` ```rust Rust theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} use keenable::{Client, SearchOptions}; #[tokio::main] async fn main() -> Result<(), keenable::Error> { let client = Client::new()?; // keyless: no API key needed to try it let results = client .search_with( r#"connection pool timeout "other side closed" site:github.com OR site:stackoverflow.com"#, &SearchOptions { max_results: Some(5), snippet_max_length: Some(180), ..Default::default() }, ) .await?; for result in &results { let host = result.url.split('/').nth(2).unwrap_or_default(); println!("{} {}", host, result.url); } Ok(()) } ``` ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST https://api.keenable.ai/v1/search/public \ -H "Content-Type: application/json" \ -H "X-Keenable-Title: My App" \ -d '{ "query": "connection pool timeout \"other side closed\" site:github.com OR site:stackoverflow.com", "max_results": 5, "snippet_max_length": 180 }' ``` You see 5 results, each on `github.com` or `stackoverflow.com`. This run was made on 19 November 2026: ```text Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} github.com https://github.com/github/copilot-cli/issues/3257 github.com https://github.com/nodejs/undici/issues/1415 stackoverflow.com https://stackoverflow.com/questions/76931498/typeerror-terminated-cause-socketerror-other-side-closed-in-fetch-nodejs?answertab=scoredesc stackoverflow.com https://stackoverflow.com/questions/61076334/errors-shown-by-k6-when-reaching-a-bigger-number-of-virtual-users?rq=3 github.com https://github.com/openclaw/openclaw/issues/71784 ``` `OR` binds only the two `site:` terms next to it, so `connection pool timeout` and the quoted phrase apply to both sites. ## Build a query Start from a plain-language description, then add one operator per hard rule: | You want | Add to the query | Example `query` | | - | - | - | | Pages with the exact wording | The words in quotes | `undici "other side closed"` | | Pages on any of several sites | `site:` terms joined by `OR` | `keyboard reviews site:wired.com OR site:theverge.com` | | Pages under one path of a site | `site:` with the path | `async runtime site:github.com/tokio-rs` | | No pages from one site | `-site:` | `python 3.14 release notes -site:python.org` | | No pages with a phrase | `-` before the quoted phrase | `postgres hosting comparison -"sponsored post"` | | Either of two phrases inside a longer query | The alternatives in parentheses | `keyboard ("hall effect" OR "magnetic switch") review` | A word with no operator is never a hard filter. To require a word, quote it. ## Operator or parameter Some filters exist both as an operator and as a request parameter. Keep each kind of filter in one place: | Filter | Use | Instead of | | - | - | - | | One site | The `site` parameter | `site:` in the query | | Several sites | `site:a.com OR site:b.com` in the query | Several requests | | Leave out one site | `-site:` in the query, or `exclude_domains` | Dropping results in your own code | | Leave out a list of sites | The `exclude_domains` parameter, up to 1,000 distinct hosts | A long chain of `-site:` terms | | Leave hosts out of one site | `site` with `exclude_domains` | `site` with `-site:` in the query | | A date window | `published_after` and the other [date filters](/guides/filter-by-date) | Dates in the query text | See [Filter by domain](/guides/filter-by-domain) for the `site` and `exclude_domains` parameters in depth. ## Common mistakes | Wrong | Right | Why | | - | - | - | | `"query": "-site:reddit.com"` | Add search terms: `keyboard reviews -site:reddit.com` | A query of only operators returns `400` with `query must contain search terms, not only operators`. | | `"query": "site:python.org"` | `release notes site:python.org` | A query of only `site:` terms searches for the site name and adds a `warning` to the response. | | `site:wired.com or site:theverge.com` | `site:wired.com OR site:theverge.com` | `OR` and `NOT` work only in capitals. In lower case they're ordinary words. | | `- site:reddit.com` | `-site:reddit.com` | A `-` with a space after it is read as a word, not an operator. | | `"site": "python.org"` with `-site:docs.python.org` in the query | `"site": "python.org"` with `"exclude_domains": ["docs.python.org"]` | Put every site filter in one place. To leave hosts out of one site, send `exclude_domains` with `site`. | | `react OR vue performance` to require one of two words | `("react" OR "vue") performance` | `OR` between plain words doesn't make them hard filters. Both stay descriptions that Keenable ranks by. | A query that doesn't parse never fails. An unbalanced quote or parenthesis, or a dangling `OR`, is read as plain words, and the search still runs. ## In the SDKs, CLI and MCP Operators are part of the query string, so every client takes them unchanged: the first argument of `search` in each SDK, the query argument of `keenable search` in the [CLI](/cli), and `query` in the MCP tool `search_web_pages` (see [MCP server](/mcp-server#available-tools)). ## API reference * [Search operators](/api-reference/search#search-operators): every operator and its rules. * [Search request](/api-reference/search#request): `query`, `site` and `exclude_domains` in full. * [Write the query](/best-practices#describe-the-page-you-want): describe the page you want before you add operators. # Search the web, then fetch the pages you need Source: https://docs.keenable.ai/guides/search-then-fetch How to answer from search snippets first, fetch a page only when a snippet falls short, ask fetch for only the part you need, and when to set live=true. Give your agent the facts it needs with the fewest characters in its context. Search with short snippets first. Answer from the snippets when they hold the answer, and fetch a page only when they don't, asking fetch for only the part you need. ## Parameters | Parameter | In | Type | Default | Limits | What it does | | - | - | - | - | - | - | | `query` | Body, `/v1/search` | string | Required | None | What to search for, in plain language. | | `max_results` | Body, `/v1/search` | integer | `10` | 1 to 50 | Maximum number of results to return. Fewer come back if fewer pages match. | | `snippet_max_length` | Body, `/v1/search` | integer | None | 180 to 10,000 | Maximum characters of page text in each result's `snippet`. Without it, snippets can run to several thousand characters. | | `url` | Query, `/v1/fetch` | string | Required | None | The page to read, as an absolute `http` or `https` URL. URL-encode it when it has its own query string. | | `max_chars` | Query, `/v1/fetch` | integer | `50000` | At least 1 | Maximum number of characters of `content`, counted in Unicode code points. | | `live` | Query, `/v1/fetch` | boolean | `false` | None | Set to `true` to fetch the page from the source now instead of returning Keenable's indexed copy. Without it, Keenable returns its indexed copy if it has a usable one and fetches the page live otherwise. A call that fetched live is billed as `fetch.live`. | | `prompt` | Query, `/v1/fetch` | string | None | At most 2,000 characters | An instruction for extracting part of the page, at most 2000 characters. When set, a model reads the page and `content` holds only its answer instead of the whole page. | ## Search, then fetch the top result This sample searches with 300-character snippets, takes the top result, and fetches only the answer to a question about that page. The curl tab runs with no API key. The SDK tabs need one, because the SDKs' `fetch` calls [`POST /v1/fetch`](/api-reference/fetch-post): ```typescript TypeScript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { Keenable } from "keenable"; async function main() { const client = new Keenable(); // reads KEENABLE_API_KEY from the environment // 1. Search with short snippets, enough to pick a page const results = await client.search("official Python documentation for asyncio TaskGroup", { maxResults: 3, snippetMaxLength: 300, }); const top = results.results[0]; console.log(`Top result: ${top.title} (${top.url})`); // 2. Fetch only that page, and only the part you need const { results: pages } = await client.fetch([top.url], { prompt: "What happens to the other tasks when one task in a TaskGroup raises? Answer in two sentences.", maxChars: 600, }); console.log(pages[0].content); } main(); ``` ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from keenable import Keenable client = Keenable() # reads KEENABLE_API_KEY from the environment # 1. Search with short snippets, enough to pick a page results = client.search( "official Python documentation for asyncio TaskGroup", max_results=3, snippet_max_length=300, ) top = results[0] print(f"Top result: {top.title} ({top.url})") # 2. Fetch only that page, and only the part you need page = client.fetch( [top.url], prompt="What happens to the other tasks when one task in a TaskGroup raises? Answer in two sentences.", max_chars=600, ).results[0] print(page.content) ``` ```go Go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} package main import ( "context" "fmt" "log" "github.com/keenableai/keenable-sdk/go" ) func main() { ctx := context.Background() client, err := keenable.New(nil) // reads KEENABLE_API_KEY from the environment if err != nil { log.Fatal(err) } defer client.Close() // 1. Search with short snippets, enough to pick a page snippetCap := 300 results, err := client.Search(ctx, "official Python documentation for asyncio TaskGroup", &keenable.SearchOptions{MaxResults: 3, SnippetMaxLength: &snippetCap}) if err != nil { log.Fatal(err) } if len(results.Results) == 0 { log.Fatal("no results") } top := results.Results[0] fmt.Printf("Top result: %s (%s)\n", top.Title, top.URL) // 2. Fetch only that page, and only the part you need resp, err := client.FetchWithOptions(ctx, []string{top.URL}, &keenable.FetchOptions{ Prompt: "What happens to the other tasks when one task in a TaskGroup raises? Answer in two sentences.", MaxChars: 600, }) if err != nil { log.Fatal(err) } fmt.Println(resp.Results[0].Content) } ``` ```rust Rust theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} use keenable::{Client, FetchOptions, SearchOptions}; #[tokio::main] async fn main() -> Result<(), keenable::Error> { let client = Client::new()?; // reads KEENABLE_API_KEY from the environment // 1. Search with short snippets, enough to pick a page let results = client .search_with( "official Python documentation for asyncio TaskGroup", &SearchOptions { max_results: Some(3), snippet_max_length: Some(300), ..Default::default() }, ) .await?; let top = &results.results[0]; println!("Top result: {} ({})", top.title, top.url); // 2. Fetch only that page, and only the part you need let response = client .fetch_with( [&top.url], &FetchOptions { prompt: Some( "What happens to the other tasks when one task in a TaskGroup raises? Answer in two sentences." .into(), ), max_chars: Some(600), ..Default::default() }, ) .await?; println!("{}", response.results[0].content); Ok(()) } ``` ```bash curl theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} # 1. Search with short snippets, enough to pick a page, and take the top result url=$(curl -s -X POST https://api.keenable.ai/v1/search/public \ -H "Content-Type: application/json" \ -H "X-Keenable-Title: My App" \ -d '{ "query": "official Python documentation for asyncio TaskGroup", "max_results": 3, "snippet_max_length": 300 }' | jq -r '.results[0].url // empty') if [ -z "$url" ]; then echo "No results" else echo "Top result: $url" # 2. Fetch only that page, and only the part you need curl -s -G https://api.keenable.ai/v1/fetch/public \ -H "X-Keenable-Title: My App" \ --data-urlencode "url=$url" \ --data-urlencode "prompt=What happens to the other tasks when one task in a TaskGroup raises? Answer in two sentences." \ --data-urlencode "max_chars=600" fi ``` You see the page the search picked, then a two-sentence answer from that page instead of the whole page: ```text Example output · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} Top result: Coroutines and Tasks (https://docs.python.org/3.11/library/asyncio-task.html?highlight=asyncio%20sleep) The remaining tasks in the group are cancelled. No further tasks can then be added to the group. ``` The curl tab takes the top result URL with `jq`. The fetch response holds the extraction in `content`. This is an example fetch response: ```json Response · results vary theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "url": "https://docs.python.org/3/library/asyncio-task.html", "title": "Coroutines and tasks", "content": "When one task in a TaskGroup raises an exception (other than `asyncio.CancelledError`), the remaining tasks in the group are cancelled. No further tasks can then be added to the group.", "description": "", "truncated": false, "total_chars": 184 } ``` ## Decide when to fetch Each search result's `snippet` is page text chosen for the query, so it often holds the answer. Fetch when one of these is true: | Situation | What to send | | - | - | | The snippets hold the answer | Nothing more. Answer and cite the result URLs. | | A snippet is close but cut off | Fetch that URL with a `prompt` that asks for the missing part. | | You need exact wording, such as a quotation or a config block | Fetch that URL without a `prompt`, and set `max_chars` to what your context can hold. | | The user names a URL | Fetch it directly. You don't need a search first. | | The page changes often, such as a status page or a price list | Fetch with `live=true`. | ## Fetch the current version of a page By default, fetch returns Keenable's indexed copy of the page if it has a usable one, and fetches the page from the source otherwise. Set `live=true` when the indexed copy may be out of date for your task. Compare the search result's `acquired_at`, when Keenable indexed the page, with how often the page changes. A call that fetched from the source is billed as `fetch.live`, whether you set `live=true` or Keenable had no indexed copy. Read `usage.sku` in a keyed response to see which one you paid for. See [Fetch](/products/fetch#cost) and [Live fetch](/guides/live-fetch). ## Common mistakes | Wrong | Right | Why | | - | - | - | | Fetch every search result | Read the snippets, then fetch only the pages they don't answer | Each fetch adds a full page to the context and is billed on its own. | | Fetch a long page with no limit | Add a `prompt`, or set `max_chars` | Without them, `content` can hold up to 50,000 characters. | | `live=true` on every fetch | `live=true` only for pages that change often | Every live call is billed as `fetch.live`. The indexed copy answers most questions. | | Read the result's `description` | Read `snippet` on a search result and `content` on a fetch | `description` is deprecated and always empty. See [Versioning](/versioning). | | `url=https://example.com/a?b=1&c=2` pasted into a query string | URL-encode it, for example with `curl --data-urlencode` | An unencoded `&` splits the URL into separate parameters. | When `content` is cut at `max_chars`, `truncated` is `true` and `total_chars` holds the full length. Fetch again with a larger `max_chars`, or with a `prompt`, if you need the rest. See [Read long pages](/guides/long-pages) and [Fetch with a prompt](/guides/fetch-with-prompt). ## In the SDKs, CLI and MCP The SDKs' `fetch` calls [`POST /v1/fetch`](/api-reference/fetch-post) and takes `max_chars`, `prompt` and `max_age_hours` (`0` for a live read): keyword arguments in Python, `fetch(urls, { maxChars, prompt, maxAgeHours })` in TypeScript, `FetchWithOptions` with `FetchOptions` in Go, and `fetch_with` with `FetchOptions` in Rust. See [SDK methods](/sdks#methods). Over MCP, `fetch_page_content` takes `max_chars`, `prompt` and `max_age_hours` and returns at most 20,000 characters in total, split across the pages, unless you set `max_chars` (see [MCP server](/mcp-server#available-tools)). ## API reference * [Fetch API reference](/api-reference/fetch): every fetch parameter and response field. * [Search API reference](/api-reference/search): `max_results`, `snippet_max_length` and the result fields. * [Ground answers with citations](/guides/ground-answers-with-citations): turn the snippets you keep into a cited prompt. # Get help Source: https://docs.keenable.ai/help Where to report a problem with Keenable, and what to include so we can find your request. Email [support@keenable.ai](mailto:support@keenable.ai) for anything about your account, billing or the API. Ask other questions and talk to the Keenable team in the [Keenable Discord](https://discord.gg/be3QybVZ2P). You can also use the [contact form](https://keenable.ai/contact). ## Ask in Discord The [Keenable Discord](https://discord.gg/be3QybVZ2P) is the place to ask how to use search, fetch, Monitors, the SDKs, the CLI or an integration, and to talk to the Keenable team. Never post an API key there. For a problem with your account or billing, email [support@keenable.ai](mailto:support@keenable.ai) instead. | Your question | Where to go | | - | - | | How to use Keenable, or feedback for the team | [Keenable Discord](https://discord.gg/be3QybVZ2P) | | Your account, billing or a failing request | [support@keenable.ai](mailto:support@keenable.ai) | | Whether the API is down | [status.keenable.ai](https://status.keenable.ai) | | A bug in an SDK or the CLI | [A GitHub issue](#report-a-bug-in-the-sdks-or-the-cli) | ## Check service status The status page at [status.keenable.ai](https://status.keenable.ai) shows whether the Keenable Search API and Content API are up, with 90 days of uptime history. Check it first when requests fail with `5xx` errors or time out. Fetch runs on the Content API. ## Report a bug in the SDKs or the CLI Open a GitHub issue in the matching repository: * SDKs (Python, TypeScript, Go, Rust): [keenableai/keenable-sdk](https://github.com/keenableai/keenable-sdk/issues) * CLI: [keenableai/keenable-cli](https://github.com/keenableai/keenable-cli/issues) ## What to include * The `X-Request-Id` header value from the response. Search and fetch responses carry it, and Keenable uses it to find your request in the logs. Error responses carry it too, and repeat it as `request_id` in the body. If you have no response at all, for example after a timeout, include the time of the request instead. * Your SDK or CLI and its version, for example `keenable 0.1.3` for Python. * The request, without your API key: the endpoint, the parameters, and the status and body you got back. Before you write, check [Errors](/errors) and the [FAQ](/faq). Most statuses have a fix you can apply right away. To look up a field or term, see the [Glossary](/glossary). ## Report a problem from an agent If your agent is connected to the Keenable docs MCP server, it can report a problem with the `submit_feedback` tool. Ask it to include the page, what it expected, what happened, and the `X-Request-Id` value if it has one. # Quickstart: give your agent web search Source: https://docs.keenable.ai/index Give your agent web search in under two minutes, with no account or API key. Paste one prompt into your coding agent, or install the SDK and search. Paste this prompt into your coding agent. Your agent reads the SDK guide, adds the official SDK to your project and runs one test search with no API key: ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} Add Keenable web search to this project using the official SDK. Follow https://docs.keenable.ai/sdks.md. Keyless works for trying it; read KEENABLE_API_KEY from the environment for production. Then run a test search with max_results=3 and show me the 3 cited results. If the test call fails (429 or no network), stop, show me the error, and point me to https://docs.keenable.ai/api-keys. ``` To try it yourself, this request runs one search with no account or API key. Keyless requests need an `X-Keenable-Title` header that names your app: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST https://api.keenable.ai/v1/search/public -H "Content-Type: application/json" -H "X-Keenable-Title: My App" -d '{"query": "fastest inference providers 2026", "max_results": 3}' ``` To call Keenable from code, install the SDK for your language. Every SDK searches without a key: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} npm install keenable ``` ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} pip install keenable ``` ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} go get github.com/keenableai/keenable-sdk/go@latest ``` ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} cargo add keenable ``` This program runs one search and prints 3 results as a numbered block your model can cite. TypeScript needs Node 18 or newer: ```typescript index.ts theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import { Keenable } from "keenable"; async function main() { const client = new Keenable(); // keyless: no API key needed to try it const results = await client.search("fastest inference providers 2026", { maxResults: 3 }); console.log(results.toContext()); } main(); ``` Python needs 3.9 or newer: ```python main.py theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from keenable import Keenable client = Keenable() # keyless: no API key needed to try it results = client.search("fastest inference providers 2026", max_results=3) print(results.to_context()) ``` Go needs 1.22 or newer: ```go main.go theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} package main import ( "context" "fmt" "log" "github.com/keenableai/keenable-sdk/go" ) func main() { client, err := keenable.New(nil) // keyless: no API key needed to try it if err != nil { log.Fatal(err) } defer client.Close() results, err := client.Search(context.Background(), "fastest inference providers 2026", &keenable.SearchOptions{MaxResults: 3}) if err != nil { log.Fatal(err) } fmt.Println(results.ToContext(nil)) } ``` The Rust client and every method are in [SDKs](/sdks). To have your agent search the web as it works, connect the MCP server instead. This command adds it to Claude Code: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} claude mcp add keenable --transport http https://api.keenable.ai/mcp --scope user ``` [MCP server](/mcp-server) covers every other client, and [CLI](/cli) searches from your terminal. ## Set up with your coding agent Paste one prompt into Claude Code, Cursor, Codex or any agent that can read a URL and run commands. Your agent follows the linked page, sets Keenable up with no API key and runs a test search. Pick the route that fits: | Route | Pick it if | Your agent needs | API key | | - | - | - | - | | [SDK](/sdks) | Your code calls search and fetch | Python, TypeScript, Go or Rust | Optional | | [MCP server](/mcp-server) | Your agent searches as it works | An MCP client | Optional | | [CLI](/cli) | You want the MCP server in every client on your machine, and search in the terminal | A shell | Optional | | [Agent skill](/agent-skill) | Your agent can run Python but has no MCP client | A shell and Python 3 | Not supported | The SDK prompt adds the official SDK to the project in front of your agent: ```text SDK theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} Add Keenable web search to this project using the official SDK. Follow https://docs.keenable.ai/sdks.md. Keyless works for trying it; read KEENABLE_API_KEY from the environment for production. Then run a test search with max_results=3 and show me the 3 cited results. If the test call fails (429 or no network), stop, show me the error, and point me to https://docs.keenable.ai/api-keys. ``` The MCP server prompt adds the server to the agent you paste it into: ```text MCP server theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} Add the Keenable MCP server to this coding agent with no API key. Follow https://docs.keenable.ai/mcp-server.md and use the keyless URL it gives for this client: https://api.keenable.ai/mcp-public for Codex or a client that fails on OAuth discovery, otherwise https://api.keenable.ai/mcp. Then tell me how to restart or reload this client so it loads the server, and the test to run after that: search the web for "Keenable MCP server tools" with the `search_web_pages` tool and show the 3 cited results. If the tool is already available in this session, run that test now. If the call fails, stop and show me the error. ``` Most clients load MCP servers only when they start. If your agent can't call `search_web_pages` yet, restart or reload the client, or run `/mcp` in Claude Code, then ask for the test search in the new session. The CLI prompt installs the Keenable CLI and sets up MCP for the clients you pick: ```text CLI theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} Install the Keenable CLI. Follow https://docs.keenable.ai/cli.md. Run `keenable configure-mcp` to list the AI clients on this machine, ask me which ones to configure, then run it with those client flags and --yes. Then run `keenable search "Keenable MCP server tools" --max-results 3 -p` and show me the output. ``` The agent skill prompt installs the skill for the agent in this project: ```text Agent skill theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} Install the keenable-web-search agent skill. Follow https://docs.keenable.ai/agent-skill.md and install it for this agent in this project. Then run its search script for "Keenable MCP server tools" and show me the top 3 results with their URLs. ``` Each prompt ends with a test search, and your agent stops and shows you the error if it fails. ### Get an API key with device login Keyless calls share 1,000 requests per hour per IP address. For higher limits and Monitors, your agent can get an API key through [device login](/authentication#device-login), with no key pasted into chat. Only a person can create a Keenable account and approve the login. This prompt sends your agent through it: ```text Device login theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} Get a Keenable API key with device login. Run `keenable login` if the Keenable CLI is installed; otherwise follow https://docs.keenable.ai/authentication.md#device-login. Show me the link and the code, wait while I approve, and never ask me to paste the key into chat. ``` The key belongs to the organization you are signed in to. With it, you get 100,000 free requests a month. To keep your agent from switching to its own web search, see [Make Keenable the default web tool](/default-web-tool). | How you call | What you get free | After that | | - | - | - | | No API key | 1,000 requests per hour and 10 per second, shared by every caller on your IP address | Use an API key | | Free [API key](/api-keys) | 100,000 requests a month for your organization, with no hourly cap | \$4 per 1,000 requests from a prepaid balance | See [Pricing](/pricing), [Balance and usage](/credits) and [Rate limits](/rate-limits) for the details. ## Products * [Search](/products/search): ranked web pages about a topic, each with an excerpt of its text. Works with no API key. * [Fetch](/products/fetch): any URL as clean markdown, or only the part a prompt asks for. Works with no API key. * [Monitors](/products/monitors): new pages about a topic in your agent, at your webhook or on a schedule. Needs an API key. * [SELECT](/select): ask a question and get back a table from live web pages in one SQL query. Needs a Keenable account. * [Time Machine](/api-reference/time-machine): search and read the web as it was at a past moment. Early Access. To compare them, see [Choose a product](/choose). Coming from another search API? See [Migrate to Keenable](/migrate). ## Next steps > [card] [Connect your agent](/mcp-server) > > The MCP server for Claude Code, Codex, Cursor and other clients. > [card] [Install an SDK](/sdks) > > TypeScript, Python, Go and Rust, keyless by default. > [card] [Rate limits and errors](/rate-limits) > > Limits per key and per IP, and what to do on a `429`. > [card] [Evaluate search APIs](/guides/evaluate-search-apis) > > Compare Keenable with your current provider on your own queries. # Integrations Source: https://docs.keenable.ai/integrations Connect Keenable web search to your agent stack: LangChain, LlamaIndex, Haystack, MCP and more. Add Keenable web search and page fetch to the agents and AI tools you already use. Many integrations work without a key. The ones that take a key all use the same Keenable API key, so one key covers your whole stack. See [Authentication](/authentication). > [!NOTE] > > To have your agent install Keenable itself, send it this prompt: `Read https://app.keenable.ai/SKILL.md and install this skill.` ## MCP server Point any MCP-compatible client at `https://api.keenable.ai/mcp` for web search and page-fetch tools. See the [MCP server reference](/mcp-server) for one-click install links (Cursor, VS Code) and per-client setup (Claude Code, Codex, Claude Desktop, Claude connectors). The server is also listed in the [Antigravity Plugin Marketplace](/integrations/antigravity), [OpenAI Plugins Directory](/integrations/chatgpt), [Claude Connectors Directory](/integrations/claude), the [official MCP Registry](https://registry.modelcontextprotocol.io/v0/servers?search=ai.keenable), the GitHub MCP Registry, Glama, PulseMCP and others. See [MCP registries and directories](/integrations/directories) for every listing and its install command. ## Featured > [card] [Vercel AI SDK](/integrations/vercel) > > `@keenable/ai-sdk`: keyless search and fetch for `generateText` and `streamText`. > [card] [LangChain](/integrations/langchain) > > `langchain-keenable` tools, listed next to Exa and Tavily in LangChain's docs. > [card] [CrewAI](/integrations/crewai) > > Official SDK as a CrewAI tool. Keyless by default. > [card] [LlamaIndex](/integrations/llamaindex) > > `KeenableToolSpec` for search and read in LlamaIndex agents. > [card] [OpenRouter](/integrations/openrouter) > > Search and fetch for any OpenRouter model, from Python, the AI SDK or MCP. > [card] [Cursor](/integrations/cursor) > > One-click MCP install, plus the setting that turns off Cursor's own search. > [card] [Google Antigravity](/integrations/antigravity) > > Day-one plugin in Antigravity's Plugin Marketplace. Keyless search, fetch and skill. > [card] [ChatGPT](/integrations/chatgpt) > > Published in OpenAI's Plugins Directory for ChatGPT and Codex. ## Available now ### Inference providers | Integration | Description | | - | - | | [Baseten](/integrations/baseten) | Server-side tools on Baseten Model APIs, with no client and no key. | | [OpenRouter](/integrations/openrouter) | Search and fetch tools for any OpenRouter model, from Python, the AI SDK or the Agent SDK over MCP. | | [Cerebras](/integrations/cerebras) | Keenable SDK with Cerebras Inference: cited answers from one search, or tool calling with `TOOLS`. | | [OmniRoute](/integrations/omniroute) | Self-hosted AI gateway: `provider: "keenable-search"` on its `/v1/search` and `/v1/web/fetch`. No key needed. | ### Frameworks & SDKs | Integration | Description | | - | - | | [Vercel AI SDK](/integrations/vercel) | `@keenable/ai-sdk`: keyless search and fetch for `generateText` and `streamText`, plus Vercel Connect. | | [Agno](/integrations/agno) | `KeenableTools` built into Agno: search and read, no key required. | | [AG2](/integrations/ag2) | `KeenableSearchToolkit` built into AG2: `keenable_search` and `keenable_fetch`, no key required. | | [Composio](/integrations/composio) | Keenable toolkit in Composio: search and fetch next to your agent's other apps, with the user's key or keyless. | | [CrewAI](/integrations/crewai) | Official SDK as a CrewAI tool. Keyless by default. | | [Google ADK](/integrations/google-adk) | Remote MCP toolset for Google's Agent Development Kit. | | [Haystack](/integrations/haystack) | Listed in the Haystack integrations catalog. | | [LangChain](/integrations/langchain) | `langchain-keenable`, listed in the LangChain docs. | | [LazyLLM](/integrations/lazyllm) | `KeenableSearch` search tool in LazyLLM, no key required. | | [LlamaIndex](/integrations/llamaindex) | `KeenableToolSpec` for search and read. | | [Mastra](/integrations/mastra) | `@keenable/mastra` search and fetch tools. | | [mcporter](/integrations/mcporter) | MCP CLI and runtime: a `keenable` server entry in `mcporter.json`, no key required. | | [NVIDIA NeMo Agent Toolkit](/integrations/nemo-agent-toolkit) | `keenable__search` / `keenable__fetch`. | | [OctoTools](/integrations/octotools) | `Keenable_Search_Tool` in the OctoTools toolbox, with site and date filters and no key. | | [PraisonAI](/integrations/praisonai) | `keenable_search` in `praisonai-tools`, no key required. | | [Scalekit](/integrations/scalekit) | Keenable MCP connector in AgentKit: users sign in to Keenable once, Scalekit keeps the tokens. | | [Spider](/integrations/spider) | `KeenableProvider` in the Spider Rust crawler, behind the `search_keenable` feature. No key required. | | [ToolUniverse](/integrations/tooluniverse) | `backend="keenable"` on the `web_search` tool, no key required. | | [RL and eval environments](/integrations/rl-eval-environments) | SkillOpt OfficeQA (`env.search_mode=keenable`) and Halo GRPO search environments (`search_backend: keenable`). | | [AgentField](/integrations/agentfield) | Deep research agent example: `SEARCH_PROVIDER=keenable`. No account or key needed. | | [npcpy](/integrations/npcpy) | Python agent library: `search_web(provider="keenable")` and `search_keenable`. No key needed. | ### Coding agents | Integration | Description | | - | - | | [Codex](/integrations/codex) | Setup through `config.toml` or the plugin listing, plus the one line that stops the built-in search from taking over. | | [Cursor](/integrations/cursor) | One-click link, `mcp.json` or `keenable configure-mcp --cursor`, plus the setting that turns off Cursor's own web search. | | [DeepSeek Harness](/integrations/deepseek-harness) | Plugin for the built-in `web_search` and `web_fetch`, with any model and no key. | | [Google Antigravity](/integrations/antigravity) | Day-one listing in the [Plugin Marketplace](https://antigravity.google/docs/marketplace): search, page fetch and a web lookup skill, no key. | | [OpenCode](/integrations/opencode) | Native tools, no CLI or login step. | | [Pi](/integrations/pi) | Web search and page fetch for the Pi coding agent. | | [Devin Desktop](/integrations/devin-desktop) | Formerly Windsurf. MCP via `mcp_config.json` or `keenable configure-mcp --devin`. | | [oh-my-pi](/integrations/oh-my-pi) | Terminal coding agent: `web/keenable` as the `web` model role for its `web_search` tool. | | [OpenClaude](/integrations/openclaude) | Open-source coding agent CLI: `/search keenable` or `WEB_SEARCH_PROVIDER=keenable`. No key needed. | | [FrontierAgent](/integrations/frontier-agent) | Terminal agent: `WEB_SEARCH_PROVIDER=keenable` for its `web_search` tool, up to 50 results. No key needed. | | [Claude Octopus](/integrations/claude-octopus) | Claude Code plugin: `OCTOPUS_RESEARCH_WEB_SEARCH=keenable` gives every research perspective the top results. | | [Gajae-Code](/integrations/gajae-code) | Coding-agent harness (`gjc`): `providers.webSearch` set to `keenable`. No key needed. | ### Chat apps | Integration | Description | | - | - | | [AnythingLLM](/integrations/anythingllm) | Built-in web search provider for agents, no key required. | | [ChatGPT](/integrations/chatgpt) | Published in OpenAI's Plugins Directory, and how to keep ChatGPT's own web search out of the way. | | [Claude](/integrations/claude) | Listed in Claude's connector directory, plus Claude Code, and how to keep Claude's own web search out of the way. | | [Gemini](/integrations/gemini) | Add Keenable to the Gemini app and Gemini CLI, and keep Gemini CLI's own web search from competing with it. | | [CowAgent](/integrations/cowagent) | Built-in `web_search` provider, keyless once you add it in the console. | | [LibreChat](/integrations/librechat) | Built-in search provider and scraper, so the whole web-search stack runs without a key. | | [tgpt](/integrations/tgpt) | Terminal chat: `--search-provider keenable` for find mode, or the `web_search_keenable` tool. No key needed. | ### Low-code builders | Integration | Description | | - | - | | [Convex](/integrations/convex) | `@keenable/convex`: `search` and `fetch` component actions. | | [Dify](/integrations/dify) | Search and page fetch in the Dify marketplace. | | [Langflow](/integrations/langflow) | Drag-and-drop search component. | | [n8n](/integrations/n8n) | Community node with Search and Fetch Page operations. | | [RAGFlow](/integrations/ragflow) | Built into the visual agent builder. | | [Replit](/integrations/replit) | One-click MCP server for Replit Agent, signed in to your Keenable account. | | [Tines](/integrations/tines) | HTTP Request actions for search and page fetch in Tines stories, no key to start. | ### Search & RAG | Integration | Description | | - | - | | [de-anthropocentric research engine](/integrations/de-anthropocentric-research-engine) | Listed among the engine's recommended MCP servers; you add the entry yourself. | | [GPT Researcher](/integrations/gpt-researcher) | `gpt-researcher-keenable` retriever plugin, `RETRIEVER=keenable`. | | [Hermes Agent](/integrations/hermes-agent) | Built-in web backend for `web_search` and `web_extract`, keyless. | | [ketch](/integrations/ketch) | Built into the Go CLI, zero-config. | | [Lightpanda](/integrations/lightpanda) | The keyless engine behind the headless browser's `search` tool. | | [Nanobot](/integrations/nanobot) | Built-in search provider, no key required. | | [Omnigent](/integrations/omnigent) | Built-in backend for the `web_search` tool. | | [OpenClaw](/integrations/openclaw) | Installable from ClawHub or npm. | | [PipesHub](/integrations/pipeshub) | Web search provider for PipesHub assistants, set in workspace settings or the admin API. No key required. | | [Rakazo](/integrations/rakazo) | Built-in provider for the `web_search` and `web_fetch` bot tools, no key needed. | | [SearXNG](/integrations/searxng) | Core engine, shortcut `!keen`. | | [Vellum Assistant](/integrations/vellum-assistant) | Built-in provider, selected in `config.json`. | | [web-search-plus (Hermes)](/integrations/web-search-plus) | Community plugin for the Hermes agent. | | [WeKnora (Tencent)](/integrations/weknora) | Built into Tencent WeKnora. | | [ZeroClaw](/integrations/zeroclaw) | Built-in provider for `web_search_tool`, selected in `config.toml`. | | [career-ops](/integrations/career-ops) | Job search pipeline: plugin that finds postings on employers' ATS pages, as a command or a `portals.yml` provider. | | [Obscura](/integrations/obscura) | Headless browser MCP server: `OBSCURA_WEB_SEARCH=keenable` adds a `web_search` tool. No key needed. | | [hyperresearch](/integrations/hyperresearch) | Deep-research pipeline for Claude Code and Codex: `[web] provider = "keenable"` for search and fetch. | | [Qwen-MM-Plugins](/integrations/qwen-mm-plugins) | Qwen's multimodal plugins: `QWEN_MM_SEARCH_BACKEND=keenable` for `web_search` and `web_extractor`. | ### Memory | Integration | Description | | - | - | | [cognee](/integrations/cognee) | Web-fetch backend for URL ingestion into graph memory, built into cognee 1.5+. | ### Voice agents | Integration | Description | | - | - | | [Pipecat](/integrations/pipecat) | `KeenableWebSearch`, tuned for voice latency. | | [Tavus](/integrations/tavus) | One API tool gives a video PAL live web search, no key to start. | | [Qwen Audio Agent](/integrations/qwen-audio-agent) | Realtime voice assistant: `QWEN_AUDIO_WEB_SEARCH_PROVIDER=keenable`, the Keenable MCP preset. No key needed. | ## Also works with Keenable is built into these projects too. Each one sets up Keenable in its own settings, so there is no separate page here. | Integration | Description | | - | - | | [Codexia](https://github.com/milisp/codexia/pull/153) | Desktop app for Codex and Claude Code. Add Keenable under **Plugins → Connectors**, no key needed. Since v0.58.0. | | [Fly.io Sprites](https://fly.io/sprites/ecosystem/) | Search from Sprites through Fly's connector gateway, so the key never sits on the VM. Uses your API key. | | [pi-web-access](https://github.com/nicobailon/pi-web-access#configuration) | Web search extension for Pi. Set `provider: "keenable"` in `web-search.json`, no key needed. Since 0.36.0. | | [DeepChat](https://github.com/ThinkInAIXYZ/deepchat/pull/2437) | Desktop chat app. `keenable-search` is in the built-in MCP server list, off until you turn it on, no key needed. Since v1.1.4. | | [DB-GPT](https://github.com/eosphoros-ai/DB-GPT/blob/main/docs/docs/application/mcp_connectors.md) | **Keenable Search** connector template on the **Connectors** page: activate it with `https://api.keenable.ai/mcp`, no key needed. Since v0.8.3. | | [LocalAI](https://github.com/mudler/LocalAI/blob/master/docs/content/features/chats-and-agents/web.md) | Search provider in LocalAI's Web add-on. An administrator adds Keenable to the provider order; a key is optional. Since v5.0.0. | | [genoffice](https://github.com/genspark-ai/genoffice) | Office suite with AI. Keenable is a web search provider under AI Media & Search in its settings, no key needed. | | [OpenFilm](https://github.com/openfilm/openfilm/pull/312) | AI film studio. Keenable is a web search and fetch provider under More in Settings > Providers, no key needed. | | [trueforge](https://github.com/truefoundry/trueforge/pull/1133) | Keenable is a keyless remote server in trueforge's MCP catalog. Add an `X-API-Key` header for higher limits. | | [Raven](https://github.com/EverMind-AI/Raven/pull/1088) | Multi-agent harness. Set `tools.web.search.provider` and `tools.web.fetch.provider` to `keenable` in its settings. No key needed. | | [Coral](https://github.com/withcoral/coral/tree/main/apps/reef/recipes/keenable) | Keenable recipe in Coral's catalog: the hosted MCP server with public access by default, or an API key. Since v1.4.0. | | [weft](https://github.com/WeaveMindAI/weft/pull/85) | Workflow nodes `KeenableSearch` and `KeenableFetchPage`, keyless unless a `KeenableAccess` node is wired. | ## Request an integration Zed, Warp, Kiro, fx and v0 connect over MCP. Their config keys are in the [MCP server](/mcp-server#other-mcp-clients) client table. To request an integration, [get in touch](https://keenable.ai/contact). # AG2 web search toolkit Source: https://docs.keenable.ai/integrations/ag2 Give AG2 agents web search and page fetch with KeenableSearchToolkit, built into AG2 1.2.2 and later, with no API key required. *Toolkit in AG2* `KeenableSearchToolkit` gives AG2 agents two tools: `keenable_search` for web search and `keenable_fetch` for reading a page as markdown. It ships in [AG2](https://github.com/ag2ai/ag2) itself and talks to the Keenable REST API over `httpx`, which AG2 already depends on, so there is no extra package. It runs without an API key. → [KeenableSearchToolkit in the AG2 repository](https://github.com/ag2ai/ag2/blob/main/ag2/extensions/tools/search/keenable.py) · [AG2's Keenable Search page](https://docs.ag2.ai/docs/user-guide/extensions/tools/search/keenable/) ## Install `KeenableSearchToolkit` ships in AG2 1.2.2 and later. Install AG2 with the extra for your model provider. The example uses OpenAI: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} pip install -U "ag2[openai]>=1.2.2" ``` Current AG2 releases need Python 3.11 or later. Set `OPENAI_API_KEY` for the model, or pass another provider's config to `Agent(config=...)`. ## Give it to an agent Add `KeenableSearchToolkit()` to the agent's tools. It registers both `keenable_search` and `keenable_fetch`: ```python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import asyncio from ag2 import Agent from ag2.config import OpenAICompletionsConfig from ag2.extensions.tools.search import KeenableSearchToolkit agent = Agent( "researcher", prompt="Answer with the URLs of the pages you used.", config=OpenAICompletionsConfig(model="gpt-4o-mini"), tools=[KeenableSearchToolkit()], ) async def main() -> None: reply = await agent.ask("What changed in the latest Python release?") print(reply.body) asyncio.run(main()) ``` The reply cites the pages the agent found. Each `keenable_search` result has `title`, `url`, `snippet` and `acquired_at`, the time Keenable last indexed the page. `keenable_fetch` returns the page's `url`, `title`, `content` as markdown, `author` and `published_at`. The last two are empty when unknown. ## Give it search only Each tool is a factory method on the toolkit. Pass only `toolkit.search()` to keep the agent to one site and a set number of results: ```python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} toolkit = KeenableSearchToolkit() agent = Agent( "researcher", config=OpenAICompletionsConfig(model="gpt-4o-mini"), tools=[toolkit.search(site="docs.python.org", max_results=10)], ) ``` `toolkit.fetch()` returns the fetch tool on its own. Both methods also take `name` and `description` to rename the registered tool. ## Options | Parameter | Default | What it does | | - | - | - | | `api_key` | `None` | Keenable API key, sent as `X-API-Key`. If unset, the toolkit reads `KEENABLE_API_KEY` at call time. If neither is set, it calls the keyless `/v1/search/public` and `/v1/fetch/public` endpoints. | | `max_results` | API default, `10` | Number of search results, from 1 to 50. | | `site` | `None` | Domain to restrict search results to, such as `"docs.python.org"`. | | `published_after` | `None` | Only pages published on or after this date, as `YYYY-MM-DD`. | | `snippet_max_length` | `1000` | Approximate characters of page text per result. Use `keenable_fetch` to read a whole page. | | `base_url` | `"https://api.keenable.ai"` | API root, for routing through your own gateway. | | `timeout` | `60.0` | Request timeout in seconds. | | `proxy` | `None` | Proxy URL for the outgoing connection. | | `verify` | `True` | Verify the server's TLS certificate. | If Keenable returns an error, the tool raises `httpx.HTTPStatusError` with Keenable's error message. On `429`, the message includes the `Retry-After` value. See [Errors](/errors). > [!NOTE] > > Without a key, calls run on the shared public tier at [lower rate limits](/rate-limits). Set `KEENABLE_API_KEY`, or pass `KeenableSearchToolkit(api_key=...)`, to use your organization's limits and remove the hourly cap. See [API keys](/api-keys). ## Related pages > [card] [Composio](/integrations/composio) > > Keenable as a Composio toolkit: your agent searches the web and reads pages through Composio, next to the other apps it uses there. > [card] [Agno](/integrations/agno) > > Give Agno agents web search and page reading with KeenableTools, a toolkit built into Agno, with no API key required. > [card] [CrewAI](/integrations/crewai) > > Give CrewAI agents Keenable web search with the official SDK. Keyless by default. > [card] [Overview](/sdks) > > 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. # AgentField deep research agent with Keenable Source: https://docs.keenable.ai/integrations/agentfield Run AgentField's deep research example on Keenable web search with SEARCH_PROVIDER=keenable. No account or API key needed. *Search backend in an AgentField example* AgentField's [deep research agent](https://github.com/Agent-Field/agentfield/tree/main/examples/python_agent_nodes/deep_research) breaks a research question into subtasks, searches the web for each leaf task and writes a report. Set `SEARCH_PROVIDER=keenable` and its searches go to Keenable. Tavily stays the default. Keenable needs no account or API key. → [Deep research agent README](https://github.com/Agent-Field/agentfield/blob/main/examples/python_agent_nodes/deep_research/README.md) ## Install The example lives in the AgentField repository. From a clone, install its requirements: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} git clone https://github.com/Agent-Field/agentfield.git cd agentfield pip install -r examples/python_agent_nodes/deep_research/requirements.txt ``` ## Run the agent on Keenable Select Keenable and start the agent: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} export SEARCH_PROVIDER=keenable python examples/python_agent_nodes/deep_research/main.py ``` In a second terminal, send a research question: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -X POST http://localhost:8080/reasoners/planning_execute_deep_research \ -H "Content-Type: application/json" \ -d '{ "research_question": "What changed in the EU AI Act this year?", "max_depth": 3, "max_tasks_per_level": 5 }' ``` The agent plans its subtasks, runs one Keenable search per leaf task and returns the synthesized report. ## Settings | Variable | Values | Default | | - | - | - | | `SEARCH_PROVIDER` | `tavily`, `parallel`, `serply`, `keenable`, `outcrawl` | `tavily` | | `KEENABLE_API_KEY` | Your Keenable API key. Optional: it lifts the keyless rate limit. | unset | > [!NOTE] > > Without a key, searches run on the shared public tier at [lower rate limits](/rate-limits). A deep research run makes many searches, so export `KEENABLE_API_KEY` for larger questions. See [API keys](/api-keys). ## Related pages > [card] [npcpy](/integrations/npcpy) > > Search the web from npcpy with the keenable provider for search_web, or call search_keenable directly. No API key needed, in npcpy 2.1.28 and later. > [card] [RL and eval environments](/integrations/rl-eval-environments) > > Use Keenable as the search backend in SkillOpt OfficeQA rollouts and Halo GRPO search environments: one config value, opt-in, never a default. > [card] [Vercel AI SDK](/integrations/vercel) > > Keyless web search and page fetch for the Vercel AI SDK (`@keenable/ai-sdk`), plus Vercel Connect to keep the API key out of environment variables. > [card] [Tool calling](/tool-calling) > > Give an LLM web search and page fetch as tools. Pass the SDK's TOOLS to any OpenAI-compatible chat completions client and run each call with run_tool_call. # Agno web search toolkit Source: https://docs.keenable.ai/integrations/agno Give Agno agents web search and page reading with KeenableTools, a toolkit built into Agno, with no API key required. *Toolkit in Agno* `KeenableTools` gives Agno agents Keenable web search and page reading. It ships in [Agno](https://github.com/agno-agi/agno) itself, so there is nothing extra to install, and it runs without an API key. → [KeenableTools in the Agno repository](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/keenable.py) ## Install `KeenableTools` ships in Agno 3.1.5 and later: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} pip install -U "agno>=3.1.5" openai ``` The examples use Agno's default OpenAI model, so set `OPENAI_API_KEY`, or pass any other model to `Agent(model=...)`. ## Give it to an agent Add `KeenableTools()` to the agent's tools: ```python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from agno.agent import Agent from agno.tools.keenable import KeenableTools agent = Agent(tools=[KeenableTools()], markdown=True) agent.print_response("What changed in the latest Python release?") ``` `KeenableTools()` registers the `web_search` tool. Each result has its title, URL and the first 500 characters of the page text. Results come back as markdown, or as JSON if you pass `format="json"`. ## Search and read pages Pass `all=True` to let the agent read pages too: ```python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} agent = Agent(tools=[KeenableTools(all=True)], markdown=True) agent.print_response("Find the Agno docs page on toolkits and summarize it, with the link") ``` `all=True` adds `fetch_url_content`, which returns a page's main content as markdown under its title. Requests to private and internal addresses are refused. Async variants are registered under the same names, so `agent.arun()` and `agent.aprint_response()` work unchanged. ## Options | Parameter | Default | What it does | | - | - | - | | `api_key` | `None` | Keenable API key. If unset, the toolkit reads `KEENABLE_API_KEY`. If neither is set, it uses the keyless public endpoints. | | `enable_search` | `True` | Register `web_search`. | | `enable_fetch` | `False` | Register `fetch_url_content`. | | `all` | `False` | Register both. | | `max_results` | `5` | Default number of search results. The agent can ask for a different number per call. | | `max_snippet_chars` | `500` | Page text kept per result. `0` keeps it all. | | `format` | `"markdown"` | `"markdown"` or `"json"` for search results. | | `timeout` | `30` | Request timeout in seconds. | > [!NOTE] > > Without a key, calls run on the shared public tier at [lower rate limits](/rate-limits). Set `KEENABLE_API_KEY`, or pass `KeenableTools(api_key=...)`, to use your organization's limits and remove the hourly cap. ## Related pages > [card] [AG2](/integrations/ag2) > > Give AG2 agents web search and page fetch with KeenableSearchToolkit, built into AG2 1.2.2 and later, with no API key required. > [card] [Vercel AI SDK](/integrations/vercel) > > Keyless web search and page fetch for the Vercel AI SDK (`@keenable/ai-sdk`), plus Vercel Connect to keep the API key out of environment variables. > [card] [Composio](/integrations/composio) > > Keenable as a Composio toolkit: your agent searches the web and reads pages through Composio, next to the other apps it uses there. > [card] [Tool calling](/tool-calling) > > Give an LLM web search and page fetch as tools. Pass the SDK's TOOLS to any OpenAI-compatible chat completions client and run each call with run_tool_call. # Google Antigravity web search plugin Source: https://docs.keenable.ai/integrations/antigravity Install Keenable from the Plugin Marketplace in Antigravity: web search, page fetch and a web lookup skill, with no API key. *Plugin marketplace listing* Give Antigravity's agents web search, page fetch and a skill for everyday web lookups. Install the Keenable plugin from **Customizations → Marketplace** in the Antigravity app, with no config file, no account and no API key. The plugin connects your agents to Keenable's hosted MCP server. It also works in the Antigravity CLI and as a Gemini CLI extension. → [Plugin Marketplace in Antigravity](https://antigravity.google/docs/marketplace) · [keenableai/keenable-antigravity on GitHub](https://github.com/keenableai/keenable-antigravity) ## Install from the marketplace **1. Open the Marketplace** In the Antigravity app, open the **Customizations** tab in the left sidebar (below **Automations**), then open the **Marketplace** tab. **2. Find Keenable** Search for **Keenable**, or browse **Developer Tools**. **3. Install** Click **+** on the card. The plugin appears under **Customizations → Installed**, where a toggle turns it off and **Uninstall** removes it. A plugin installed in the app also shows up in the Antigravity CLI. Then ask your agent a question that needs the live web, such as: ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} Find the release notes for the libraries in this project since our pinned versions and list the breaking changes. ``` The agent calls `search_web_pages` and reads the pages it finds. > [!NOTE] > > Antigravity may show an **Authenticate** button next to the Keenable server. You don't need it: the tools work without signing in, on the shared public tier. ## What you get | Tool or skill | What it does | | - | - | | `search_web_pages` | Ranked web results with an excerpt of each page, narrowed by site or publication date when needed. | | `fetch_page_content` | Up to 20 URLs as clean markdown in one call, or only the part an extraction prompt asks for. | | `keenable-web` skill | When to search, when to read a page, how to cite. | ## Other ways to install ### Antigravity CLI Install the plugin from its repository URL: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} agy plugin install https://github.com/keenableai/keenable-antigravity ``` ### From the repository Clone the repository into your global plugins folder, or into `.agents/plugins/` of a workspace to enable the plugin for that project only: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} git clone https://github.com/keenableai/keenable-antigravity ~/.gemini/config/plugins/keenable ``` ### Gemini CLI The same repository works as a Gemini CLI extension: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} gemini extensions install https://github.com/keenableai/keenable-antigravity ``` ### MCP server only To add the two tools without the skill, put this in `~/.gemini/config/mcp_config.json` and restart Antigravity, which reads the file at startup: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "mcpServers": { "keenable": { "serverUrl": "https://api.keenable.ai/mcp-public" } } } ``` ## Higher rate limits The plugin sends no credentials, so it runs on the shared public tier at [lower rate limits](/rate-limits). To search on your own account, create an API key in the [console](https://app.keenable.ai/console?utm_source=docs\&utm_medium=cta\&utm_campaign=antigravity\&utm_content=console) and add a second server with it in `~/.gemini/config/mcp_config.json`: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "mcpServers": { "keenable-account": { "serverUrl": "https://api.keenable.ai/mcp-public", "headers": { "X-API-Key": "keen_" } } } } ``` The skill works with either server. See [Authentication](/authentication). ## Data The plugin connects only to `https://api.keenable.ai/mcp-public` over HTTPS. It sends search queries and requested URLs to Keenable with an `X-Keenable-Title: antigravity` header, which identifies the plugin's traffic. It sends no credentials, runs no local code or shell commands and reads no local files. → [Full MCP server reference](/mcp-server) ## Related pages > [card] [OpenCode](/integrations/opencode) > > Give OpenCode agents web search and page fetch with opencode-keenable, a native plugin. > [card] [DeepSeek Harness](/integrations/deepseek-harness) > > Keenable web search and page fetch for DeepSeek Harness's built-in web_search and web_fetch tools, with any model and no API key. > [card] [Pi](/integrations/pi) > > Give the Pi coding agent web search and page fetch with the @keenable/pi-search package, or pick Keenable in pi-web-access. > [card] [Agent skill](/agent-skill) > > Install the keenable-web-search agent skill with npx skills add. Your agent searches the web with a bundled script, with no API key and no MCP client. # AnythingLLM web search provider Source: https://docs.keenable.ai/integrations/anythingllm Keenable is a built-in web search provider for AnythingLLM agents, with no API key required. *Built-in search provider* Give your AnythingLLM agents web search with Keenable, a built-in web search provider since AnythingLLM v1.16.2. It works without an API key. → [The Keenable provider in AnythingLLM](https://github.com/Mintplex-Labs/anything-llm/pull/6336) ## Turn on Keenable **1. Open the web search skill** Open **Settings → Agent Skills** and select **Web Search**. **2. Pick Keenable** Switch the skill on and choose **Keenable** as the provider. Leave **API Key** empty to use the public tier, then save. **3. Ask an agent** In a workspace chat, start your message with `@agent` and ask something that needs the web. ## Use your API key Paste your key (`keen_`, from the [console](https://app.keenable.ai/console)) into **API Key (optional)** in the same panel. If you run AnythingLLM in Docker, you can set the key as an environment variable instead: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} AGENT_KEENABLE_API_KEY=keen_ ``` **Base URL** defaults to `https://api.keenable.ai`. Change it only if you route requests through a proxy. > [!NOTE] > > If you don't set a key, searches run on the shared public tier at [lower rate limits](/rate-limits). A key moves them to your organization's limits and removes the hourly cap. ## Related pages > [card] [ChatGPT](/integrations/chatgpt) > > Install Keenable from OpenAI's Plugins Directory, and keep ChatGPT's own web search from competing with it. > [card] [tgpt](/integrations/tgpt) > > Use Keenable as the web search provider in tgpt, the terminal AI chat, with SEARCH_PROVIDER=keenable. No API key needed, in tgpt 2.16.0 and later. > [card] [Claude](/integrations/claude) > > Add Keenable to Claude and Claude Code, and keep Claude's own web search from competing with it. > [card] [Connect your agent (MCP)](/mcp-server) > > Connect the Keenable MCP server to Claude Code, Cursor, Codex and other clients for web search and fetch with no key. Sign in for higher limits and Monitors. # Baseten server-side web search tools Source: https://docs.keenable.ai/integrations/baseten Keenable web search and page fetch as server-side tools on Baseten Model APIs, called by the model inside the inference loop. *Server-side tools* Send one chat request to Baseten Model APIs that names Keenable's tools, and the model searches, reads the pages it picked and answers from what it read. Baseten runs the tools on its side. You don't need an MCP client, a tool loop or a Keenable API key, because Baseten meters the calls and bills them with your inference. → [Baseten Model APIs](https://docs.baseten.co/inference/model-apis/overview) ## Install ### Enable server tools Server tools are in early access. Ask Baseten to enable them for your workspace, then send the `x-baseten-server-tools: true` header with each request. ### Name the tools in a request Add the two tool types to the `tools` array of a Messages request: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -sS -X POST https://inference.baseten.co/v1/messages \ -H "Authorization: Bearer ${BASETEN_API_KEY}" \ -H "Content-Type: application/json" \ -H "x-baseten-server-tools: true" \ -d '{ "model": "deepseek-ai/DeepSeek-V4.1-Flash", "max_tokens": 4096, "messages": [ {"role": "user", "content": "What shipped in the latest Bun release? Cite the pages you used."} ], "tools": [ {"type": "baseten__keenable__search_web_pages"}, {"type": "baseten__keenable__fetch_page_content"} ] }' ``` Each tool entry has only a `type`. Baseten holds the schemas, so there's no Keenable JSON schema to paste and no arguments to declare. ### Or use an SDK The endpoint implements the Anthropic Messages API, so an Anthropic SDK client can reach it through `base_url`. The SDK sends the key as `x-api-key`, which Baseten doesn't read, so set both headers yourself: ```python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import os from anthropic import Anthropic api_key = os.environ["BASETEN_API_KEY"] client = Anthropic( api_key=api_key, base_url="https://inference.baseten.co", default_headers={ "Authorization": f"Bearer {api_key}", "x-baseten-server-tools": "true", }, ) answer = client.messages.create( model="deepseek-ai/DeepSeek-V4.1-Flash", max_tokens=4096, messages=[{"role": "user", "content": "What shipped in the latest Bun release?"}], tools=[ {"type": "baseten__keenable__search_web_pages"}, {"type": "baseten__keenable__fetch_page_content"}, ], ) ``` The tools also work on `/v1/chat/completions` and on `/v1/responses`. Prefer Messages. On Messages it's straightforward to send the assistant, tool-call and tool-result blocks back byte for byte, which keeps the KV cache warm across turns. ## The two tools | Tool | What it does | | - | - | | `baseten__keenable__search_web_pages` | Searches the web and returns ranked results with URLs, titles and snippets. | | `baseten__keenable__fetch_page_content` | Reads one URL and returns the page as clean markdown. | They're the [MCP server](/mcp-server)'s two tools, with the same names and the same arguments. The `baseten__keenable__` prefix is Baseten's namespace for hosted tools. The model fills in every argument it sees. ## What comes back The response contains the whole loop. Each tool round is a `tool_use` block, whose `name` is the full tool type and whose `input` holds the arguments the model wrote. The `tool_result` block with Keenable's answer follows it. The last `text` block is the final answer. Baseten runs tool calls that the model emits together at the same time, so independent lookups overlap instead of running one after another. Handle these three cases: * **The iteration cap.** Baseten limits how many tool rounds one request may run. If a turn hits the cap, the response has `stop_reason: "pause_turn"` and can end on a tool result with no answer. To continue with a fresh budget, send the message history back in a new request. * **Failed tool calls.** Baseten marks a failed call as an error for the model, which usually retries or works around it. Failed calls aren't billed. * **`max_tokens`.** The budget covers the reasoning and commentary between the tool rounds, not the answer alone, so a grounded answer needs more of it than the same question asked without tools. If the value is too low, the response has `stop_reason: "max_tokens"` and the answer stops mid-word. ## Read your usage Alongside the content, the response carries a `baseten` object with one entry per tool call: the `provider` and tool `name`, its `status`, whether it was `billable`, and the Keenable [SKU](/credits#what-a-call-costs) and quantity it was metered as. Failed calls show `billable: false` and no SKU. Use it to attribute cost per call. Treat the shape as informational: it's Baseten's extension field, not a stable protocol. ## Models Baseten enables server tools per model. Check Baseten's model list for the current set, which includes DeepSeek V4.1 Flash, DeepSeek V4 Pro, GLM 5.3 and 5.3 Fast, and Kimi K3. ## Billing No Keenable account is involved, and Keenable doesn't bill you directly. For each successful call, Keenable reports one of the [four SKUs](/credits#what-a-call-costs) and an amount, and Baseten puts that usage on your Baseten invoice. Failed calls are not billed. Per-model tool usage is at the bottom of the model's metrics page in the Baseten console. ## When to call Keenable directly The hosted tools trade control for having nothing to run. Bring your own key and use the [MCP server](/mcp-server) or the [REST API](/api-reference) instead when you want to pick the search mode, filter by site or date, search the index as it stood at [a past instant](/mcp-server#point-in-time-search), or extract a page with a [prompt](/api-reference/fetch). ## Related pages > [card] [OpenRouter](/integrations/openrouter) > > Web search and page fetch for any OpenRouter model, as tools it calls itself: from Python, the AI SDK, or the Agent SDK over MCP. No Keenable key needed. > [card] [Tool calling](/tool-calling) > > Give an LLM web search and page fetch as tools. Pass the SDK's TOOLS to any OpenAI-compatible chat completions client and run each call with run_tool_call. > [card] [Overview](/sdks) > > 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. > [card] [OmniRoute](/integrations/omniroute) > > Route web search and page fetch through Keenable in the OmniRoute AI gateway with provider keenable-search. No key needed, in OmniRoute 3.8.54 and later. # career-ops job search plugin for Keenable Source: https://docs.keenable.ai/integrations/career-ops Find job postings on employers' own ATS pages from career-ops with the Keenable plugin: a search command and a portals.yml provider. No key needed. *Plugin in career-ops* The Keenable plugin for [career-ops](https://github.com/career-ops-hq/career-ops), the open-source job search pipeline, finds postings on employers' own applicant tracking pages, such as Greenhouse, Lever and Ashby. You run it as a command or as a provider in `portals.yml`. It works without an API key, and Keenable maintains it. → [career-ops-plugin-keenable on GitHub](https://github.com/keenableai/career-ops-plugin-keenable) ## Install The plugin is listed in the career-ops plugin registry. From your career-ops folder, add it, then enable it: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} node plugins.mjs add keenable node plugins.mjs enable keenable # shows the capability card node plugins.mjs enable keenable --confirm # grants it ``` The plugin's registry entry allows one host, `api.keenable.ai`, and needs no environment variables. ## Search for postings Preview the postings for a query with `--dry-run`: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} node plugins.mjs run keenable search "remote machine learning engineer" --dry-run ``` Without `--dry-run`, the command appends the new postings to `data/pipeline.md`. A query keeps its operators as written, so a `search_queries` line from `portals.yml` works too: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} node plugins.mjs run keenable search 'site:jobs.ashbyhq.com OR site:jobs.lever.co "Product Designer" remote' ``` ## Scan with portals.yml Set `provider: keenable` and a `scan_query` on an entry in `portals.yml`. `node scan.mjs` then runs that query with the plugin, without spending model tokens: ```yaml theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} job_boards: - name: Remote ML roles (Keenable) provider: keenable scan_query: '"machine learning engineer" remote' max_results: 30 # optional, 1-50 tracked_companies: - name: Reddit provider: keenable scan_query: 'site:job-boards.greenhouse.io/reddit "machine learning"' ``` career-ops applies `data/blacklist.md`, `title_filter` and `location_filter` to the results and records what it adds in `data/scan-history.tsv`. ## Settings Optional settings go in `config/plugins.yml`: ```yaml theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} plugins: keenable: enabled: true max_results: 20 # results per query, 1-50 days_back: 30 # only pages published in the last N days sites: # replaces the default ATS hosts - job-boards.greenhouse.io - jobs.ashbyhq.com ``` | Setting | Where | What it does | | - | - | - | | `max_results` | `config/plugins.yml` or a `portals.yml` entry | Results per query, 1 to 50. | | `days_back` | `config/plugins.yml` | Keeps only pages published in the last N days. | | `sites` | `config/plugins.yml` | Replaces the default hosts: `job-boards.greenhouse.io`, `boards.greenhouse.io`, `jobs.lever.co`, `jobs.ashbyhq.com`, `apply.workable.com`, `jobs.smartrecruiters.com`, `myworkdayjobs.com`. | | `KEENABLE_API_KEY` | `.env` | Optional. Sends searches with your key instead of the keyless endpoint. | The plugin keeps single postings only. A board's index page, a hit on another site or a duplicate is dropped, and every result links to the employer's own posting. Each request carries the query text, the result count, an `X-Keenable-Title: career-ops` header and your key if you set one. Nothing from your CV, tracker or pipeline is sent. > [!NOTE] > > Without a key, searches run on the shared public tier at [lower rate limits](/rate-limits). If the hourly limit is reached, the run stops with a message that says so. Add `KEENABLE_API_KEY` to `.env` to use your organization's limits. See [API keys](/api-keys). ## Related pages > [card] [Obscura](/integrations/obscura) > > Add a web_search tool to Obscura's MCP server with OBSCURA_WEB_SEARCH=keenable, so the agent finds pages before it browses them. No key needed. > [card] [ZeroClaw](/integrations/zeroclaw) > > Select Keenable as the web search provider in ZeroClaw, the Rust agent runtime. It works without an API key. > [card] [hyperresearch](/integrations/hyperresearch) > > Use Keenable as the web provider in hyperresearch, the deep-research pipeline, for search and page fetch. No key or extra install, 0.13.1 and later. > [card] [Search quickstart](/products/search) > > Give your agent ranked web pages with excerpts ready to cite. Try it with no API key. Code, cost per mode, filters by site, date and domain, and gotchas. # Keenable SDK with Cerebras inference Source: https://docs.keenable.ai/integrations/cerebras Ground Cerebras Inference models in live web results with the Keenable SDK: one search for cited answers, or tool calling with TOOLS, in Python and Node. *Keenable SDK with Cerebras* Ground answers from [Cerebras Inference](https://inference-docs.cerebras.ai) models in current web pages with the Keenable SDK. Each search result already carries the page text, so a cited answer takes one search and one chat completion. For agents that decide when to search, the SDK ships OpenAI-compatible tool definitions that go straight into a Cerebras request. → [Cerebras examples in the Keenable SDK repository](https://github.com/keenableai/keenable-sdk/tree/main/examples/cerebras) ## Install Install the Keenable SDK and the Cerebras SDK, then set your Cerebras key: ```bash Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} pip install keenable cerebras_cloud_sdk export CEREBRAS_API_KEY="your-cerebras-key" ``` ```bash Node.js theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} npm install keenable @cerebras/cerebras_cloud_sdk export CEREBRAS_API_KEY="your-cerebras-key" ``` The Keenable SDK runs without a key. To use your organization's limits, also export `KEENABLE_API_KEY`: the SDK reads it from the environment. See [API keys](/api-keys). ## Answer from search results Search once, render the results as a numbered context block with `to_context()`, and ask the model to cite by number: ```python Python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from cerebras.cloud.sdk import Cerebras from keenable import Keenable question = "What did Cerebras announce most recently, and when?" keenable = Keenable() cerebras = Cerebras() results = keenable.search(question, published_after="2026-01-01") completion = cerebras.chat.completions.create( model="gpt-oss-120b", messages=[ {"role": "system", "content": "Answer using only the sources provided. Cite them by number, like [1]."}, {"role": "user", "content": f"{results.to_context()}\n\nQuestion: {question}"}, ], ) print(completion.choices[0].message.content) for index, result in enumerate(results.cited(), start=1): print(f"[{index}] {result.title} - {result.url}") ``` ```javascript Node.js theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import Cerebras from '@cerebras/cerebras_cloud_sdk'; import { Keenable } from 'keenable'; const question = 'What did Cerebras announce most recently, and when?'; const keenable = new Keenable(); const cerebras = new Cerebras(); const results = await keenable.search(question, { publishedAfter: '2026-01-01' }); const completion = await cerebras.chat.completions.create({ model: 'gpt-oss-120b', messages: [ { role: 'system', content: 'Answer using only the sources provided. Cite them by number, like [1].' }, { role: 'user', content: `${results.toContext()}\n\nQuestion: ${question}` }, ], }); console.log(completion.choices[0].message.content); results.cited().forEach((result, index) => { console.log(`[${index + 1}] ${result.title} - ${result.url}`); }); ``` The answer cites sources as `[1]`, `[2]` and so on. `cited()` lists the results that made it into the context, in the same numbering, so the source list matches the citations. A result that did not fit the context's character budget is not listed. ## Let the model search `TOOLS` holds definitions for `keenable_search` and `keenable_fetch`. `run_tool_call` runs the tool the model picked and returns text to hand back: ```python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from cerebras.cloud.sdk import Cerebras from keenable import TOOLS, Keenable, KeenableError, run_tool_call keenable = Keenable() cerebras = Cerebras() messages = [ {"role": "system", "content": "Use the web tools when the answer depends on recent information, and cite the URLs you used."}, {"role": "user", "content": "What did Cerebras announce most recently, and when?"}, ] while True: completion = cerebras.chat.completions.create(model="gpt-oss-120b", messages=messages, tools=TOOLS) message = completion.choices[0].message if not getattr(message, "tool_calls", None): print(message.content) break messages.append(message.model_dump()) for call in message.tool_calls: try: output = run_tool_call(keenable, call.function.name, call.function.arguments) except KeenableError as exc: output = f"Tool call failed: {exc}" messages.append({"role": "tool", "tool_call_id": call.id, "content": output}) ``` The loop ends when the model answers without calling a tool. A failed call goes back to the model as the tool result, so it can try another source. The Node SDK exports the same `TOOLS` and a `runToolCall` function. See the [Node example](https://github.com/keenableai/keenable-sdk/blob/main/examples/cerebras/tool_calling.mjs). ## SDK pieces used | Python | Node.js | What it does | | - | - | - | | `keenable.search(q, published_after=...)` | `keenable.search(q, { publishedAfter })` | Web search. Each result includes page text in `snippet`. | | `results.to_context()` | `results.toContext()` | Renders results as a numbered block for a prompt. | | `results.cited()` | `results.cited()` | The results that fit in the context, in citation order. | | `TOOLS` | `TOOLS` | Tool definitions for `keenable_search` and `keenable_fetch`. | | `run_tool_call(client, name, args)` | `runToolCall(client, name, args)` | Runs one tool call and returns its text output. | See the [Python](https://github.com/keenableai/keenable-sdk/tree/main/python) and [TypeScript](https://github.com/keenableai/keenable-sdk/tree/main/typescript) SDK READMEs for every search filter. > [!NOTE] > > Without `KEENABLE_API_KEY`, searches run on the shared public tier at [lower rate limits](/rate-limits). Set the key to use your organization's limits and remove the hourly cap. ## Related pages > [card] [OmniRoute](/integrations/omniroute) > > Route web search and page fetch through Keenable in the OmniRoute AI gateway with provider keenable-search. No key needed, in OmniRoute 3.8.54 and later. > [card] [OpenRouter](/integrations/openrouter) > > Web search and page fetch for any OpenRouter model, as tools it calls itself: from Python, the AI SDK, or the Agent SDK over MCP. No Keenable key needed. > [card] [Baseten](/integrations/baseten) > > Keenable web search and page fetch as server-side tools on Baseten Model APIs, called by the model inside the inference loop. > [card] [Tool calling](/tool-calling) > > Give an LLM web search and page fetch as tools. Pass the SDK's TOOLS to any OpenAI-compatible chat completions client and run each call with run_tool_call. # ChatGPT web search plugin Source: https://docs.keenable.ai/integrations/chatgpt Install Keenable from OpenAI's Plugins Directory, and keep ChatGPT's own web search from competing with it. *Plugin directory listing* Install Keenable from OpenAI's Plugins Directory to give ChatGPT web search and page fetch, plus two skills: one for focused lookups and one for multi-source research with citations. The plugin works in ChatGPT chats, ChatGPT Work and Codex, which share the directory. There's no config file, developer mode or MCP URL to set up. ChatGPT also searches the web on its own. If both are available, ChatGPT picks between them for each lookup, so [turn its search off](#turn-off-web-search) if you want it to use Keenable. → [Keenable in the OpenAI Plugins Directory](https://chatgpt.com/plugins/plugin_asdk_app_6984a0b396708191a7856354b86ce047) ## Install **1. Find the plugin** Open the [listing](https://chatgpt.com/plugins/plugin_asdk_app_6984a0b396708191a7856354b86ce047), or search for **Keenable** in the directory: **Plugins** in the sidebar of ChatGPT web or desktop, or **Settings → Plugins**. **2. Connect** Select **Connect** and sign in to your Keenable account. There's no API key to paste. Keenable meters usage against the organization of the account you connect, so it shares the [rate limits](/rate-limits) and [pricing](/pricing) of that organization's API keys: 100,000 free requests a month, then \$4 per 1,000. **3. Use it in a chat** Mention **@Keenable** in your prompt, or click **+**, then **More**, and pick Keenable. Two tools become available: `search_web_pages` for ranked results, and `fetch_page_content` to read any URL as clean markdown. > [!NOTE] > > On Enterprise and Edu workspaces, plugins are off until an admin enables them. An admin turns Keenable on under **Workspace settings → Plugins**, and setting it to **Installed** for a role adds it for everyone in that role, with nothing for members to install. On Business, plugins are on by default. If **Connect** says **Disabled by admin**, ask your workspace admin. ## What to ask The plugin gives ChatGPT two tools and two skills that tell it how to combine them. > [card] Search > > Ranked results with an excerpt of each page's text, narrowed to one site or a date range when the question calls for it. > [card] Read > > Any URL as clean markdown: documentation, changelogs, issues, papers, pricing pages. > [card] Research > > Several searches, the pages worth reading, and an answer that cites them. Ask for the result you want, and say which sources count: ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} @Keenable What changed in the EU AI Act guidance this month? Use the official pages and cite each one. ``` ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} @Keenable Read https://docs.keenable.ai/rate-limits and tell me which limits apply without an API key. ``` ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} @Keenable Compare the entry-level plans of three managed Postgres providers from their own pricing pages, in a table with a link next to every price. ``` The last one makes a good task for ChatGPT Work, which can hand the table back as a spreadsheet. ## Turn off web search **On Enterprise and Edu**, a workspace owner or admin turns off ChatGPT's web search once for everyone: open **[Admin settings](https://chatgpt.com/admin/settings)**, find **Web search**, and switch it off. ChatGPT then can't search the web in that workspace even when someone asks it to, and Keenable is the only search left. Switch it back on in the same place. **For your own account**, open **Settings → Personalization**, and under **Additional ChatGPT settings** switch **Web search** off. ChatGPT stops searching on its own. You can still start one of its searches by hand from **+ → Web search**. Switch it back on to undo. To steer ChatGPT toward Keenable whether or not its own search is on, add a line to **Settings → Personalization → Custom instructions**: ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} For web searches and reading web pages, use the Keenable plugin (search_web_pages and fetch_page_content). ``` ## More from Keenable **Keenable SELECT** is a second Keenable plugin in the same directory. It's a separate server that answers a question with one SQL query over live web results and returns a table. See [SELECT](/select). To use the MCP server directly, point any MCP client at `https://api.keenable.ai/mcp` with your API key in the `X-API-Key` header. See the [MCP server reference](/mcp-server). > [!NOTE] > > Codex installs Keenable from the same directory, but Codex also has its own web search, on by default, and keeps using it unless you turn it off. To use your own API key in Codex, add Keenable through `config.toml`. See [Codex](/integrations/codex). ## Related pages > [card] [Claude](/integrations/claude) > > Add Keenable to Claude and Claude Code, and keep Claude's own web search from competing with it. > [card] [AnythingLLM](/integrations/anythingllm) > > Keenable is a built-in web search provider for AnythingLLM agents, with no API key required. > [card] [Web search in Gemini and Gemini CLI](/integrations/gemini) > > Add Keenable to the Gemini app and Gemini CLI, and keep Gemini CLI's own web search from competing with it. > [card] [Agent skill](/agent-skill) > > Install the keenable-web-search agent skill with npx skills add. Your agent searches the web with a bundled script, with no API key and no MCP client. # Web search in Claude and Claude Code Source: https://docs.keenable.ai/integrations/claude Add Keenable to Claude and Claude Code, and keep Claude's own web search from competing with it. *MCP connector* Give Claude web search and page reading through Keenable. On claude.ai, Claude Desktop, Cowork and mobile, you add Keenable from Claude's Connectors Directory, where it's listed as **Keenable Web Search**, in a few clicks and with no config file. In Claude Code, you add the same server with one command. Claude also has its own web search. If both are available, Claude picks between them for each lookup, so each section below also shows how to turn Claude's search off and back on. ## Claude (web, Desktop, mobile) ### Add the connector **1. Find it in the directory** Open **Customize → Connectors**, click **+**, and search for **Keenable Web Search**. From a chat you get to the same place through **+ → Connectors → Manage connectors**. **2. Connect** Click **Connect**. There is no sign-in and nothing to paste. **3. Turn it on in the chat** Click **+** in the lower left of the message box, hover **Connectors**, and toggle **Keenable Web Search** on. You switch connectors on per conversation. If Claude answers without calling Keenable, check that this toggle is on. The listed connector runs on the shared public tier at [lower rate limits](/rate-limits). It also works in Cowork tasks, so a longer task can search and read pages alongside your files and other connectors. ### Use your own account To run on your own Keenable account, with its rate limits and billing, add Keenable by URL instead of from the directory and sign in: 1. **Customize → Connectors → + Add → Add custom connector**. 2. Name it **Keenable**, enter this URL, and click **Add**: ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} https://api.keenable.ai/mcp-oauth ``` 3. Click **Connect**, sign in to Keenable, and allow access. Searches then count against your current organization in Keenable. On Team and Enterprise plans, an Owner adds the connector once under **Organization settings → Connectors**, and each member connects it and signs in to their own account. > [!NOTE] > > You can pass an API key instead of signing in: add `https://api.keenable.ai/mcp`, choose **No sign-in** under **Authentication**, and under **Request headers** pick `x-api-key` with your key (`keen_`, from the [console](https://app.keenable.ai/console)). Request headers are in beta for a limited set of organizations. You can't edit a connector's authentication after you add it, so to change the key, remove the connector and add it again. ### Turn off web search **On a Team or Enterprise plan**, an Owner turns off Claude's web search once for everyone: open **Organization settings → Capabilities** and switch **Web search** off under **Data sources**. Claude then has Keenable as its only way to search in every chat. Switch it back on in the same place. **On a Pro or Max plan**, it depends on which version of the Claude interface your account has. If your message box offers **Chat** and **Cowork** options, web search is a switch in each chat. Click **+** in the lower left of the message box, then click **Web search** so its checkmark disappears. Click it again to turn it back on. If it doesn't, your account has the newer interface. It has no web search switch, and Claude decides when to search. You can still tell Claude which tool to use: open **Settings → General**, and add this to **Instructions for Claude**: ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} For web searches and reading web pages, use the Keenable Web Search connector (search_web_pages and fetch_page_content) instead of the built-in web search. ``` Delete the line to go back. If Claude still doesn't call Keenable, open **+ → Connectors → Tool access** in the chat and choose **Always available**, which loads every connector's tools at the start of the conversation. ## Claude Code ### Add the server Run this command with your own key in place of `keen_`: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} claude mcp add --transport http --scope user keenable https://api.keenable.ai/mcp \ --header "X-API-Key: keen_" ``` `--scope user` makes it available in every project. Omit the `--header` flag to run on the public tier. To run on the public tier with no key, you can install Keenable as a plugin instead. Run these two commands in a Claude Code session: ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} /plugin marketplace add keenableai/keenable-mcp /plugin install keenable@keenable ``` The plugin adds the same two tools with no sign-in. In `/mcp` it shows as **plugin:keenable:keenable**, and its tools are named `mcp__plugin_keenable_keenable__search_web_pages` and `mcp__plugin_keenable_keenable__fetch_page_content`. To use your own key later, uninstall the plugin and add the server with the command above. ### Turn off the built-in search Claude Code ships its own `WebSearch` and `WebFetch` tools. Deny them in `~/.claude/settings.json`: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "permissions": { "deny": ["WebSearch", "WebFetch"] } } ``` A rule that names a whole tool removes it from Claude's context, so Keenable's `search_web_pages` and `fetch_page_content` are the only search and fetch tools it has left. If the file already has a `permissions` block, add the two names to its `deny` list rather than adding a second block. Drop `"WebFetch"` if you want to keep Claude's own page reader. To turn the built-in search back on, delete the entries. To turn the built-in tools off for a single session without editing the file, start Claude Code like this: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} claude --disallowedTools WebSearch WebFetch ``` ### Verify Run `/mcp` to confirm **keenable** is connected with both tools listed, then ask a question that needs the live web. Claude should call `mcp__keenable__search_web_pages` without being told to. With the plugin, look for **plugin:keenable:keenable** and `mcp__plugin_keenable_keenable__search_web_pages` instead. ## What to ask Keenable gives Claude two tools, and Claude combines them across a longer task. > [card] Search > > Ranked results with an excerpt of each page's text, narrowed to one site or a date range when the question calls for it. > [card] Read > > Any URL as clean markdown: documentation, changelogs, issues, papers, pricing pages. > [card] Research > > Several searches, the pages worth reading, and an answer that cites them. Ask for the result you want, and say which sources count: ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} Find the release notes for every version of zod between the one in package.json and the latest, list the breaking changes, and update our schemas to match. ``` ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} Before you change anything, look for reports of this error on github.com from the last 30 days and tell me whether there is a known fix. ``` ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} Check each price in this comparison table against the vendor's own pricing page today, fix what is out of date, and link the page next to every number. ``` The first two suit Claude Code, where Claude can act on what it finds in your repository. The third works in a chat or a Cowork task with the table attached. ## Keenable SELECT **Keenable SELECT** is listed in the same directory as a second connector. It is a separate server that answers a question with one SQL query over live web results and returns a table. See [SELECT](/select). → [Full MCP server reference](/mcp-server) ## Related pages > [card] [Web search in Gemini and Gemini CLI](/integrations/gemini) > > Add Keenable to the Gemini app and Gemini CLI, and keep Gemini CLI's own web search from competing with it. > [card] [ChatGPT](/integrations/chatgpt) > > Install Keenable from OpenAI's Plugins Directory, and keep ChatGPT's own web search from competing with it. > [card] [CowAgent](/integrations/cowagent) > > Keenable is a built-in web search provider in CowAgent that can run without an API key. > [card] [Agent skill](/agent-skill) > > Install the keenable-web-search agent skill with npx skills add. Your agent searches the web with a bundled script, with no API key and no MCP client. # Claude Octopus research with Keenable search Source: https://docs.keenable.ai/integrations/claude-octopus Set OCTOPUS_RESEARCH_WEB_SEARCH=keenable so Claude Octopus research runs one Keenable search and hands every perspective the top results. No key needed. *Research source in Claude Octopus* [Claude Octopus](https://github.com/nyldn/claude-octopus) runs research as several model perspectives in parallel. With `OCTOPUS_RESEARCH_WEB_SEARCH=keenable`, it first runs one Keenable search for the research question and gives every perspective the top five results as leads. It works without an API key. → [Optional web search suggestions in Claude Octopus's research docs](https://github.com/nyldn/claude-octopus/blob/main/docs/RESEARCH-EVIDENCE.md#optional-web-search-suggestions) ## Install The option ships in Claude Octopus 11.26.0, the current release on 19 November 2026. Install the plugin in Claude Code: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} claude plugin marketplace add https://github.com/nyldn/plugins.git claude plugin install octo@nyldn-plugins ``` ## Turn on the search Export the variable, then start a research run: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} export OCTOPUS_RESEARCH_WEB_SEARCH=keenable "$HOME/.claude-octopus/plugin/scripts/orchestrate.sh" discover \ --intensity standard "Compare current approaches to signed webhooks" ``` Before `probe_discover` dispatches its perspectives, Claude Octopus sends the question to Keenable. Each perspective gets up to five titles, URLs and 500-character excerpts, wrapped as untrusted content. They are leads, not verified claims: the perspectives still open and cite the pages, and the usual citation checks apply. ## Behaviour | Case | What happens | | - | - | | Default run, dry run, cache hit or resumed run | No lookup. | | Intensity `quick`, `standard` or `deep` | One lookup. Keenable adds no model seat. | | Search fails, is empty or malformed | One fixed warning, then research continues with the original prompts. | | A provider allowlist is set | Add `keenable` to it next to the model providers, or no lookup runs. | | `KEENABLE_API_KEY` set | Calls `/v1/search` with `X-API-Key`. Without it, calls `/v1/search/public` with an `X-Keenable-Title` header. | One lookup has a 15-second deadline and doesn't retry or follow redirects. Python's standard library makes the request, so there is nothing else to install. The key, if you set one, is kept out of model child processes and prompts. > [!NOTE] > > Without a key, lookups run on the shared public tier at [lower rate limits](/rate-limits), shared by everyone behind your IP address. Export `KEENABLE_API_KEY` to use your organization's limits. See [API keys](/api-keys). ## Related pages > [card] [Gajae-Code](/integrations/gajae-code) > > Use Keenable as the web search provider in Gajae-Code (gjc), the coding-agent harness, with providers.webSearch set to keenable. No key needed. > [card] [FrontierAgent](/integrations/frontier-agent) > > Set WEB_SEARCH_PROVIDER=keenable to send FrontierAgent's web_search tool to Keenable, up to 50 results per query. Works without an API key. > [card] [Codex](/integrations/codex) > > Add Keenable to Codex over MCP or the Plugins Directory, and turn off Codex's built-in web search so the agent calls Keenable. > [card] [CLI](/cli) > > Install the Keenable CLI, sign in once, add Keenable to Claude Code, Cursor and Codex over MCP, and search, fetch and run monitors from the terminal. # Web search in Codex over MCP Source: https://docs.keenable.ai/integrations/codex Add Keenable to Codex over MCP or the Plugins Directory, and turn off Codex's built-in web search so the agent calls Keenable. *MCP server* Connect Codex to Keenable with an MCP entry in `config.toml`, or with the plugin listing Codex shares with ChatGPT. The MCP route takes your own API key, so use it on a paid tier. It also needs a second step: turning off the built-in search. > [!WARNING] > > **Turn off Codex's built-in web search after you add the server.** Codex ships its own web search, enabled by default, and keeps using it instead of Keenable. The Keenable tools look connected in `/mcp` but Codex never calls them unless you name them in the prompt. [Turn the built-in search off](#turn-off-the-built-in-search) to fix this. ## Install ### Add the server Add the following to `~/.codex/config.toml`: ```toml theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} [mcp_servers.keenable] url = "https://api.keenable.ai/mcp" http_headers = { "X-API-Key" = "keen_" } ``` The key travels in the `X-API-Key` header, not an environment variable. Codex doesn't read `KEENABLE_API_KEY` for a remote server. Create one in the [console](https://app.keenable.ai/console); see [Authentication](/authentication). To try Keenable in Codex with no key, use the keyless URL and leave out the `http_headers` line: ```toml theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} [mcp_servers.keenable] url = "https://api.keenable.ai/mcp-public" ``` This runs on the shared public tier at [lower rate limits](/rate-limits). Don't remove the header and keep the `/mcp` URL. `/mcp` publishes OAuth discovery metadata, which can make Codex start a browser sign-in instead of connecting. `/mcp-public` publishes none. See [Keyless endpoint for listings and presets](/mcp-server#keyless-endpoint-for-listings-and-presets). ### Turn off the built-in search Codex enables web search by default for local chats, in `cached` mode, where results come from an index OpenAI maintains rather than a live fetch. Set `web_search` to `disabled` to remove that tool. Codex then uses `search_web_pages` for every lookup. `web_search` is a **top-level** key, so put it above the `[mcp_servers.keenable]` line. A bare key written after a table header belongs to that table. Below the header, it becomes `mcp_servers.keenable.web_search`, which Codex ignores without an error. The finished file: ```toml theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} web_search = "disabled" [mcp_servers.keenable] url = "https://api.keenable.ai/mcp" http_headers = { "X-API-Key" = "keen_" } ``` > [!NOTE] > > The mode key takes four values: `cached` (the default), `indexed`, `live`, and `disabled`. A full-access sandbox (`--yolo` or `danger-full-access`) upgrades `cached` to `live` without telling you, so a permissive session searches the live web whether or not you asked for it. > > Don't confuse the mode with the `[tools.web_search]` table, which carries settings like `allowed_domains` and `context_size` and does **not** switch the tool off. Older releases used `[tools] web_search = true` and then `[features] web_search_request = true`; both are deprecated in favour of the top-level key. To keep the built-in tool for other work, scope the change to a profile instead and start Codex with `codex --profile research`. A profile is its own file, `~/.codex/research.config.toml`, which Codex layers over `config.toml`. The key stays top-level there: ```toml theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} web_search = "disabled" ``` ### Tell the agent which tool to use Codex reads `AGENTS.md` for project instructions, and `~/.codex/AGENTS.md` applies everywhere. Name the tools there even with the built-in search disabled. Codex loads MCP tool schemas on demand: it sees only a tool's name and description until it decides the tool is relevant. Add this rule to `AGENTS.md`: ```markdown theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} ## Web search - Use `search_web_pages` for anything that needs the web. - Follow a search with `fetch_page_content` to read the sources you cite. ``` To make Codex check a library's current docs before it writes code against it, add the rule in [Docs lookup for coding agents](/guides/docs-lookup-for-coding-agents). ### Verify Run `/mcp` in the TUI to confirm the server connected and both tools are listed, then ask something that needs the live web. Codex should call `search_web_pages` without being told to. If Codex still doesn't call Keenable, check `codex --version`. Releases before v0.121.0 registered on-demand tool names in a format their own lookup table didn't match, so Codex never called any MCP server's tools. Update Codex to fix it. ## Plugins Directory Keenable is also published in OpenAI's Plugins Directory, the catalog Codex shares with ChatGPT. Install it from the [listing](https://chatgpt.com/plugins/plugin_asdk_app_6984a0b396708191a7856354b86ce047) and sign in through OAuth. There's no key to paste. Keenable meters usage against the organization of the account you connect, so it shares the [rate limits](/rate-limits) and [pricing](/pricing) of every API key the organization has issued: 100,000 free requests a month, then \$4 per 1,000. The same listing covers [ChatGPT](/integrations/chatgpt). The built-in search competes with the plugin exactly as it does with the MCP server, so the `web_search` change above is worth making on either route. **Keenable SELECT** is a second Keenable plugin in the same directory. It's a separate server that answers a question with one SQL query over live web results and returns a table. See [SELECT](/select) for both routes into it. → [Full MCP server reference](/mcp-server) ## Related pages > [card] [Cursor](/integrations/cursor) > > Add Keenable to Cursor over MCP with one click, an mcp.json entry or the Keenable CLI, and turn off Cursor's own web search. > [card] [Gajae-Code](/integrations/gajae-code) > > Use Keenable as the web search provider in Gajae-Code (gjc), the coding-agent harness, with providers.webSearch set to keenable. No key needed. > [card] [DeepSeek Harness](/integrations/deepseek-harness) > > Keenable web search and page fetch for DeepSeek Harness's built-in web_search and web_fetch tools, with any model and no API key. > [card] [Claude](/integrations/claude) > > Add Keenable to Claude and Claude Code, and keep Claude's own web search from competing with it. # cognee web fetch backend Source: https://docs.keenable.ai/integrations/cognee Give cognee clean Markdown pages: Keenable is the web-fetch backend behind cognee's URL ingestion and scheduled scraper. *Fetch backend* From version 1.5.0, cognee can fetch URLs through Keenable, so pages enter its graph memory as clean Markdown. Pass a URL to `remember()` or `add()`, and cognee asks Keenable for the page as Markdown instead of crawling the HTML itself. The rest of the pipeline (chunking, embeddings, entity extraction, recall) doesn't change. → [View the change on GitHub](https://github.com/topoteretes/cognee/pull/4421) · [cognee's URL-ingestion guide](https://docs.cognee.ai/guides/web-url-ingestion) ## Install ### Install cognee The Keenable backend is part of cognee, so there's no Keenable package to add: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} pip install "cognee>=1.5.0" ``` ### Set the key ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} export KEENABLE_API_KEY="keen_..." ``` > [!NOTE] > > cognee needs the key. It picks Keenable only if `KEENABLE_API_KEY` is set, and it calls the keyed `/v1/fetch` endpoint. If the key is missing, cognee uses a different backend instead of calling Keenable without a key. Create a key at [app.keenable.ai/console](https://app.keenable.ai/console). ### Check the precedence cognee chooses a fetch backend from the environment, in this order: 1. Tavily, if `TAVILY_API_KEY` is set 2. Keenable, if `KEENABLE_API_KEY` is set 3. The built-in crawler If both keys are set, cognee uses Tavily. To route URL ingestion through Keenable, unset `TAVILY_API_KEY` or [select the backend explicitly](#select-the-backend-explicitly). ## Use ### Give cognee a URL Pass the URL to `remember()`, then query what cognee learned: ```python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} import cognee await cognee.remember("https://docs.example.com/pricing") await cognee.recall("what does the enterprise tier cost?") ``` `remember()` fetches the page through Keenable, ingests the Markdown, and builds the graph. `recall()` answers from the graph without fetching the page again. ### Fetch the current version of a page By default Keenable returns its indexed copy of a page when it has one, and fetches the page from the source when it doesn't. To fetch every page from the source, turn on live fetching: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} export KEENABLE_LIVE_FETCH="true" ``` With live fetching on, every request goes to the source page. Leave it off when the indexed copy is recent enough and you want the faster cached path. A fetch from the source is billed as `fetch.live`. See [what each call costs](/pricing#what-each-call-costs). ### Select the backend explicitly If you call cognee's fetch layer directly, pass the backend as a parameter. The environment precedence doesn't apply: ```python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from cognee.tasks.web_scraper import fetch_page_content pages = await fetch_page_content(urls, preferred_tool="keenable") ``` ### Narrow the page with an extraction prompt `KeenableConfig` carries the per-call options. `prompt` makes Keenable return only the part of the page you ask for instead of the whole document: ```python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from cognee.tasks.web_scraper import fetch_page_content from cognee.tasks.web_scraper.config import KeenableConfig cfg = KeenableConfig(live=True, prompt="Extract the pricing table and plan limits only.") pages = await fetch_page_content(url, preferred_tool="keenable", keenable_config=cfg) ``` ### Track a page over time cognee's scheduled scraper runs through the same fetch path (it needs `apscheduler`): ```python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from cognee.tasks.web_scraper import cron_web_scraper_task from cognee.tasks.web_scraper.config import KeenableConfig await cron_web_scraper_task( url=["https://docs.example.com/changelog"], schedule="0 6 * * *", job_name="daily_changelog", keenable_config=KeenableConfig(live=True), tavily_api_key=None, # defaults to TAVILY_API_KEY, which would win ) ``` Each run writes `WebPage` nodes into the graph, linked `is_part_of` to a `WebSite`. The `ScrapingJob` links to the `WebSite` with `is_scraping`. Every page carries a SHA-256 `content_hash`, so the job can tell whether a page changed between runs. Unlike `remember()`, this path indexes the nodes directly and skips chunking and entity extraction. ## Fetch behavior * cognee sends `GET /v1/fetch?url=...` with `X-API-Key`, plus `live=true` and `prompt=...` when set, and keeps the `content` field of the response. * Up to 5 URLs are in flight at once (`KeenableConfig.concurrency`), with a 30-second timeout per request (`timeout`, 1 to 120). * If a URL fails, cognee logs a warning, skips it and continues with the rest of the batch. If every URL fails, cognee raises the first error instead of returning an empty result, so a bad key shows up as an authentication error. * Warnings identify a failed URL by its position in the batch and the exception class, never by the URL, so credentials in query strings can't leak into logs. ## Configuration | Setting | Environment variable | `KeenableConfig` field | Default | | - | - | - | - | | API key | `KEENABLE_API_KEY` | `api_key` | none (required) | | Base URL | `KEENABLE_BASE_URL` | `base_url` | `https://api.keenable.ai` | | Live fetch | `KEENABLE_LIVE_FETCH` | `live` | `false` | | Extraction prompt | None | `prompt` | none (max 2000 chars) | | Concurrency | None | `concurrency` | `5` | | Timeout (s) | None | `timeout` | `30` | The environment variables cover the memory path (`remember()`, `add()`). The `KeenableConfig` fields cover direct calls to `fetch_page_content`, `web_scraper_task` and `cron_web_scraper_task`, and override the environment for that call. ## Related pages > [card] [Fetch quickstart](/products/fetch) > > Turn any URL into clean markdown your model can read, or get only the part a prompt asks for. Try it with no API key. Code, cost per call and gotchas. > [card] [LlamaIndex](/integrations/llamaindex) > > Give LlamaIndex agents web search and page reading with the Keenable ToolSpec. > [card] [Haystack](/integrations/haystack) > > Add web search and page fetch to Haystack pipelines with the Keenable components. > [card] [GPT Researcher](/integrations/gpt-researcher) > > Give GPT Researcher web search with no API key through gpt-researcher-keenable, a retriever plugin. # Composio web search toolkit Source: https://docs.keenable.ai/integrations/composio Keenable as a Composio toolkit: your agent searches the web and reads pages through Composio, next to the other apps it uses there. *Toolkit in Composio* [Composio](https://composio.dev) connects agents to apps and services through one SDK and handles auth for each of your users. Its **Keenable** toolkit (`keenable`) gives your agent web search and page fetch, next to the other tools it already uses through Composio, such as saving results to Notion or Slack. → [Keenable toolkit in the Composio docs](https://docs.composio.dev/toolkits/keenable) ## Tools | Tool | What it does | | - | - | | `KEENABLE_SEARCH_WEB` | Ranked web results with page excerpts, optionally limited to one site or a publication date range. Runs on the user's Keenable API key. | | `KEENABLE_FETCH_URL` | Any URL as clean markdown, optionally with an extraction prompt. Runs on the user's Keenable API key. | | `KEENABLE_SEARCH_WEB_PUBLIC` | The same search without a key, on Keenable's public rate-limited pool. Takes a required `keenable_title`, your application's name. | | `KEENABLE_FETCH_URL_PUBLIC` | The same fetch without a key, on the public pool. Takes a required `keenable_title`. | ## Set it up **1. Create a session with the toolkit** ```python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from composio import Composio composio = Composio() # reads COMPOSIO_API_KEY session = composio.create(user_id="user_123", toolkits=["keenable"]) ``` **2. Connect the user's Keenable key** Send the user to the connection link once. They enter an API key from the [Keenable dashboard](https://keenable.ai), and Composio stores it for that user. ```python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} request = session.authorize("keenable") print(request.redirect_url) request.wait_for_connection() ``` The `_PUBLIC` tools need no key and no connection, only a `keenable_title` argument with your application's name. **3. Call the tools** Pass `session.tools()` to your agent, or call a tool directly: ```python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} result = session.execute( "KEENABLE_SEARCH_WEB", arguments={"query": "latest Model Context Protocol release", "published_after": "7d"}, ) # keyless result = session.execute( "KEENABLE_SEARCH_WEB_PUBLIC", arguments={"query": "latest Model Context Protocol release", "keenable_title": "my-app"}, ) ``` The keyed tools run on the user's Keenable organization, against its [rate limits](/rate-limits), and are billed at its [prices](/pricing): 100,000 free requests a month, then \$4 per 1,000. The public tools call Keenable from Composio's servers, so they share one per-IP pool of 1,000 requests an hour with every other Composio user of those tools. Use them to try the toolkit and connect a key for real traffic. Composio's TypeScript SDK works the same way; see the [Composio docs](https://docs.composio.dev/docs/configuring-sessions). ## Related pages > [card] [CrewAI](/integrations/crewai) > > Give CrewAI agents Keenable web search with the official SDK. Keyless by default. > [card] [AG2](/integrations/ag2) > > Give AG2 agents web search and page fetch with KeenableSearchToolkit, built into AG2 1.2.2 and later, with no API key required. > [card] [Google ADK](/integrations/google-adk) > > Give Google ADK agents Keenable search and fetch over the hosted MCP server. > [card] [Tool calling](/tool-calling) > > Give an LLM web search and page fetch as tools. Pass the SDK's TOOLS to any OpenAI-compatible chat completions client and run each call with run_tool_call. # Convex web search component Source: https://docs.keenable.ai/integrations/convex Add Keenable search and fetch to a Convex app with the @keenable/convex component, with or without an API key. *Convex component* `@keenable/convex` installs into a Convex app's `convex.config.ts` and exposes `search` and `fetch` as component actions behind a typed client. Both environment variables are optional, so registering the component is the whole setup. You don't need a key or any environment variables before the first call. → [@keenable/convex on npm](https://www.npmjs.com/package/@keenable/convex) ## Install ### Install the package ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} npm install @keenable/convex ``` ### Register the component Add the component to your app's config: ```typescript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} // convex/convex.config.ts import { defineApp } from "convex/server"; import keenable from "@keenable/convex/convex.config"; const app = defineApp(); app.use(keenable); export default app; ``` ### Call it from your own action Wrap the component in an action your app owns rather than exposing it directly. Put your auth and rate limiting in that wrapper. This action searches and returns the results as numbered sources: ```typescript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} // convex/search.ts import { KeenableClient, toContext } from "@keenable/convex"; import { v } from "convex/values"; import { action } from "./_generated/server"; import { components } from "./_generated/api"; const keenable = new KeenableClient(components.keenable); export const searchWeb = action({ args: { query: v.string() }, handler: async (ctx, args) => { const { results } = await keenable.search(ctx, { query: args.query, maxResults: 5 }); return toContext(results); // numbered, citable sources for a prompt }, }); ``` `toContext` renders results as numbered sources and drops whole sources at the budget rather than cutting one mid-page. `keenable.fetch(ctx, { url })` returns the page as markdown with a `truncated` flag, so a caller can tell a whole page from a truncated one. ### Add a key to lift the rate limit The component can't read `process.env`. Convex passes environment variables in through the app, so declare the key on the app and bind it to the component. Replace `convex/convex.config.ts` with this version: ```typescript theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} // convex/convex.config.ts import { defineApp } from "convex/server"; import { v } from "convex/values"; import keenable from "@keenable/convex/convex.config"; const app = defineApp({ env: { KEENABLE_API_KEY: v.string() } }); app.use(keenable, { env: { KEENABLE_API_KEY: app.env.KEENABLE_API_KEY } }); export default app; ``` Then set the key in your Convex deployment: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} npx convex env set KEENABLE_API_KEY keen_... ``` > [!NOTE] > > Binding a key removes the hourly request cap. Without one, calls run on the shared public tier at [lower rate limits](/rate-limits). ## Parameters `search` takes `site`, `publishedAfter` / `publishedBefore`, `acquiredAfter` / `acquiredBefore`, `snippetMaxLength` (default 1000) and `maxResults`. `fetch` takes `contentMaxLength` (default 10000). ## Related pages > [card] [Dify](/integrations/dify) > > Add web search and page fetch to Dify agents and workflows with the Keenable plugin from the Dify Marketplace. Works without an API key. > [card] [Tines](/integrations/tines) > > Call Keenable web search and page fetch from Tines stories with the HTTP Request action, with no key to start. > [card] [Langflow](/integrations/langflow) > > Add web search and page fetch to the Langflow canvas with the Keenable Search and Keenable Fetch components. Works without an API key. > [card] [Search](/api-reference/search) > > Search the web with POST /v1/search: ranked results with titles, URLs and snippets, filtered by site, excluded domains, publish date or index date. # CowAgent web search provider Source: https://docs.keenable.ai/integrations/cowagent Keenable is a built-in web search provider in CowAgent that can run without an API key. *Search provider* [CowAgent](https://github.com/zhayujie/CowAgent) is an open-source AI assistant that plans tasks, runs Skills, and works from a web console and the major IM platforms. Keenable is one of the backends of its built-in `web_search` tool. If you turn it on with an empty key field, searches go to Keenable's public endpoint, with no account needed. → [The Keenable provider in CowAgent](https://github.com/zhayujie/CowAgent/pull/3122) > [!NOTE] > > Keenable ships with CowAgent **2.1.8** and later. Install CowAgent with the [quick start](https://docs.cowagent.ai/guide/quick-start), or bring an existing install up to date with `cow update` ([upgrade guide](https://docs.cowagent.ai/guide/upgrade)). ## Turn it on **1. Open the search settings** In the [web console](https://docs.cowagent.ai/channels/web) (`http://localhost:9899` by default), open **Config**, switch to the **Models** tab, and find the **Web Search** card. **2. Add Keenable** Click **Add provider** and pick **Keenable**. Leave **API Key** empty and click **Save**. The card now lists **Keenable · anonymous**. **3. Ask the agent** Ask something that needs the web. The agent calls its `web_search` tool, which answers from Keenable when no other search provider is set up. The console saves this to `config.json` (`~/CowAgent/config.json` for a script install, `~/.cow/config.json` for the desktop app). To set it by hand, add this block and run `cow restart`: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "tools": { "web_search": { "keenable_anonymous": true } } } ``` ## Which provider answers The search strategy defaults to `auto`, which uses the first configured provider in this order: DeepSeek, Bocha, Baidu Qianfan, Zhipu, LinkAI, AnySearch, Serply, Tavily, Outcrawl, Firecrawl, SpecStream, SearXNG, Keenable. Keenable comes last, so a provider you already set up keeps answering. With two or more providers configured, the agent can still pick Keenable for a single call. To always search with Keenable, set **Strategy** to **Pinned** and **Provider** to **Keenable** in the same card and click **Save**, or in `config.json`: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "tools": { "web_search": { "strategy": "fixed", "provider": "keenable", "keenable_anonymous": true } } } ``` ## What the tool returns Each call returns up to 50 results (10 by default), each with a `title`, `url`, `snippet`, and `datePublished`. Snippets run about 300 characters, or about 1,000 when the agent asks for summaries. The tool's `freshness` filter (`oneDay`, `oneWeek`, `oneMonth`, `oneYear`, or a range such as `2025-01-01..2025-02-01`) limits results by publish date. ## Use your API key Paste your key (`keen_`, from the [console](https://app.keenable.ai/console)) into **API Key** in the same dialog, or set `tools.web_search.keenable_api_key` in `config.json`. If that value is empty, CowAgent reads the `KEENABLE_API_KEY` environment variable instead. With a key, Keenable counts as configured without `keenable_anonymous`. > [!NOTE] > > Without a key, searches run on the shared public tier at [lower rate limits](/rate-limits). A key moves them to the authenticated endpoint and your organization's limits, and removes the hourly cap. ## Related pages > [card] [LibreChat](/integrations/librechat) > > Keenable is the keyless search provider and content scraper built into LibreChat's web search. > [card] [Web search in Gemini and Gemini CLI](/integrations/gemini) > > Add Keenable to the Gemini app and Gemini CLI, and keep Gemini CLI's own web search from competing with it. > [card] [tgpt](/integrations/tgpt) > > Use Keenable as the web search provider in tgpt, the terminal AI chat, with SEARCH_PROVIDER=keenable. No API key needed, in tgpt 2.16.0 and later. > [card] [Connect your agent (MCP)](/mcp-server) > > Connect the Keenable MCP server to Claude Code, Cursor, Codex and other clients for web search and fetch with no key. Sign in for higher limits and Monitors. # CrewAI web search tool Source: https://docs.keenable.ai/integrations/crewai 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](/rate-limits). ## Related pages > [card] [Google ADK](/integrations/google-adk) > > Give Google ADK agents Keenable search and fetch over the hosted MCP server. > [card] [Composio](/integrations/composio) > > 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](/integrations/haystack) > > Add web search and page fetch to Haystack pipelines with the Keenable components. > [card] [Overview](/sdks) > > 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. # Web search in Cursor over MCP Source: https://docs.keenable.ai/integrations/cursor Add Keenable to Cursor over MCP with one click, an mcp.json entry or the Keenable CLI, and turn off Cursor's own web search. *MCP server* Cursor connects to Keenable as a remote MCP server at `https://api.keenable.ai/mcp`. Add it with a one-click link, an entry in `mcp.json`, or one command with the [Keenable CLI](/cli). Cursor's agent also has its own Web Search and Web Fetch tools. If both sets of tools are on, the agent picks between them on each lookup. [Turn Cursor's tools off](#turn-off-the-built-in-search) and Keenable handles every search. ## Install ### One click [Add to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=keenable\&config=eyJ1cmwiOiJodHRwczovL2FwaS5rZWVuYWJsZS5haS9tY3AifQ==) The link opens Cursor and adds the server with no key, so it runs on the shared public tier: 1,000 requests per hour and up to 10 per second per IP (see [Rate limits](/rate-limits)). To use your own key, add it to `mcp.json` as below, or use the CLI. ### mcp.json Add the server to `~/.cursor/mcp.json` to use it in every project, or to `.cursor/mcp.json` in a repository to share it with that project only: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "mcpServers": { "keenable": { "url": "https://api.keenable.ai/mcp", "headers": { "X-API-Key": "keen_" } } } } ``` The key travels in the `X-API-Key` header. Create one in the [console](https://app.keenable.ai/console); see [Authentication](/authentication). If the file already has an `mcpServers` object, add the `keenable` entry to it rather than adding a second one. Omit the `headers` block to run on the public tier. Don't put a project-level `.cursor/mcp.json` that holds your key under version control. Keep the key in the global file, or leave the header out of the shared one. ### Keenable CLI These commands install the CLI, sign you in and add Keenable to Cursor: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} brew install keenableai/tap/keenable-cli keenable login keenable configure-mcp --cursor --yes ``` `keenable login` opens a browser device-code flow and stores the credentials locally. `configure-mcp --cursor` then writes the same entry to `~/.cursor/mcp.json`, with the stored key in its `headers` and `"type": "streamable-http"`. It leaves your other servers in the file as they are. For CI or headless hosts, `keenable login --api-key ` works too, but the key lands in shell history. On a developer machine, use the browser flow. Run `keenable reset --cursor` to remove the entry. Other install methods are on the [CLI](/cli#installation) page. ## Turn off the built-in search Cursor's agent ships Web Search and Web Fetch tools, enabled by default. Open **Cursor Settings → Agents → Context and Tools** and turn both off (the labels and the exact submenu can move between Cursor releases). Keenable's `search_web_pages` and `fetch_page_content` are then the only search and fetch tools the agent has. Keep Web Fetch on if you want Cursor's own page reader for other work. Those toggles also apply to subagents. If the settings path above doesn't match your build, open a new Agent chat and check the tools list: when Cursor's own Web Search / Web Fetch are gone and the Keenable tools remain, the switch worked. To turn the built-in search back on, switch the toggles on again. ### Tell the agent which tool to use A rule makes the choice explicit, which helps when you keep Cursor's tools on. Add it under **Customize → Rules** as a user rule to apply it everywhere, or put it in `AGENTS.md` at the root of a repository: ```markdown theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} ## Web search - Use `search_web_pages` for anything that needs the web. - Follow a search with `fetch_page_content` to read the sources you cite. ``` To make the agent check a library's current docs before it writes code against it, add the rule in [Docs lookup for coding agents](/guides/docs-lookup-for-coding-agents). ## Verify Open **Customize** in the sidebar and check that **keenable** is listed and switched on, with both tools. Then start a new Agent chat and ask something that needs the live web. The agent should call `search_web_pages` without being told to. > [!NOTE] > > If the server is listed but the agent never calls it, start a new chat after adding the server or changing the toggles. If it still searches with its own tool, confirm Web Search is off in settings, or check the chat's tools list as described [above](#turn-off-the-built-in-search). ## Keenable SELECT **Keenable SELECT** is a second Keenable server that answers a question with one SQL query over live web results and returns a table. It has its own Add to Cursor link; see [SELECT](/select). → [Full MCP server reference](/mcp-server) ## Related pages > [card] [DeepSeek Harness](/integrations/deepseek-harness) > > Keenable web search and page fetch for DeepSeek Harness's built-in web_search and web_fetch tools, with any model and no API key. > [card] [Codex](/integrations/codex) > > Add Keenable to Codex over MCP or the Plugins Directory, and turn off Codex's built-in web search so the agent calls Keenable. > [card] [Google Antigravity](/integrations/antigravity) > > Install Keenable from the Plugin Marketplace in Antigravity: web search, page fetch and a web lookup skill, with no API key. > [card] [Agent skill](/agent-skill) > > Install the keenable-web-search agent skill with npx skills add. Your agent searches the web with a bundled script, with no API key and no MCP client. # de-anthropocentric research engine web retrieval Source: https://docs.keenable.ai/integrations/de-anthropocentric-research-engine Keenable is one of the MCP servers the de-anthropocentric research engine recommends for web retrieval, with no install and no key. *Recommended MCP server* Give your de-anthropocentric research engine (DARE) runs Keenable web search and page fetch. DARE is a library of agent skills that binds to no retrieval tool: a run searches with whatever MCP servers your coding agent already has. Its README lists Keenable among the recommended servers because it needs no install and no key. → [View the change on GitHub](https://github.com/yogsoth-ai/de-anthropocentric-research-engine/pull/29) ## Install the engine Run this in your own project directory, not in a clone of the DARE repository: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} npx skills add yogsoth-ai/de-anthropocentric-research-engine --skill '*' ``` ## Add Keenable to your agent DARE ships no MCP config file. Add Keenable to the coding agent that runs DARE instead. In Claude Code, put this in `.mcp.json` at the root of your project: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "mcpServers": { "keenable": { "type": "http", "url": "https://api.keenable.ai/mcp" } } } ``` For other agents, see [MCP server](/mcp-server#installation). ## Use it in a research run Start a run with `/dare` and give it a research direction. When a step needs the web, the agent can call `search_web_pages` and `fetch_page_content`. See the [MCP server reference](/mcp-server) for the full tool list. > [!NOTE] > > This entry sends no key, so calls run on the shared public tier at [lower rate limits](/rate-limits). To remove the hourly request cap, add `"headers": { "X-API-Key": "keen_" }` to the `keenable` entry in `.mcp.json`. ## Related pages > [card] [GPT Researcher](/integrations/gpt-researcher) > > Give GPT Researcher web search with no API key through gpt-researcher-keenable, a retriever plugin. > [card] [Qwen-MM-Plugins](/integrations/qwen-mm-plugins) > > Use Keenable for web_search and web_extractor in the Qwen-MM-Plugins search plugin with QWEN_MM_SEARCH_BACKEND=keenable. Works without an API key. > [card] [Hermes Agent](/integrations/hermes-agent) > > Keenable is built into Hermes Agent as a web backend for web_search and web_extract, and works without a key. > [card] [Search quickstart](/products/search) > > Give your agent ranked web pages with excerpts ready to cite. Try it with no API key. Code, cost per mode, filters by site, date and domain, and gotchas. # DeepSeek Harness web search and fetch Source: https://docs.keenable.ai/integrations/deepseek-harness Keenable web search and page fetch for DeepSeek Harness's built-in web_search and web_fetch tools, with any model and no API key. *Plugin* Give DeepSeek Harness web search and page fetch that work with any model, local models included, with no API key. The `@keenable/dsh-keenable` plugin answers Harness's built-in `web_search` and `web_fetch` tools through Keenable. The search provider Harness ships with needs a DeepSeek account or API key. → [@keenable/dsh-keenable on npm](https://www.npmjs.com/package/@keenable/dsh-keenable) ## Install You need DeepSeek Harness 0.2.0-rc.2 or newer (below 0.4) and Node.js 22.12 or newer. On a 0.1.x Harness, install `@keenable/dsh-keenable@0.1.0` instead. ### Install the plugin In Harness, open **Plugins → Add plugin**, enter `@keenable/dsh-keenable`, then choose **Install → Enable now**. If you use the [dsh-market](https://github.com/dsh-market/dsh-market) plugin market, search its catalog for Keenable and install it from there. Or install from the terminal into the profile you run, then restart Harness: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} npx @deepseek-ai/dsh plugin --profile web add @keenable/dsh-keenable npx @deepseek-ai/dsh web ``` Each profile (`web`, `tui` and `headless`) needs its own install. ### Use it The plugin points both web tools at Keenable, with nothing to configure. Ask the model to search the web or read a URL. `web_search` returns a title, URL, excerpt and publication date (when known) for each result. `web_fetch` returns the page as markdown. Keenable's servers fetch each page, so the machine running Harness never requests a URL the model chose. Requests to private or internal hosts are refused. ### Add a key (optional) If you don't add a key, both tools run on the shared public tier at [lower rate limits](/rate-limits). To remove the hourly cap, create a key in the [console](https://app.keenable.ai/console), then either set `KEENABLE_API_KEY` in the environment Harness starts in, or open **Plugins → @keenable/dsh-keenable** and save the key with the **Configure** control on the `keenable` row. A key saved on the page wins over the environment variable. The `headless` profile doesn't read keys saved on the page, so set the environment variable there. To keep Harness's local fetch provider and use Keenable for search only, see the [plugin README](https://github.com/keenableai/dsh-keenable#keeping-the-local-fetch-provider). ## Related pages > [card] [Google Antigravity](/integrations/antigravity) > > Install Keenable from the Plugin Marketplace in Antigravity: web search, page fetch and a web lookup skill, with no API key. > [card] [Cursor](/integrations/cursor) > > Add Keenable to Cursor over MCP with one click, an mcp.json entry or the Keenable CLI, and turn off Cursor's own web search. > [card] [OpenCode](/integrations/opencode) > > Give OpenCode agents web search and page fetch with opencode-keenable, a native plugin. > [card] [CLI](/cli) > > Install the Keenable CLI, sign in once, add Keenable to Claude Code, Cursor and Codex over MCP, and search, fetch and run monitors from the terminal. # Web search in Devin Desktop over MCP Source: https://docs.keenable.ai/integrations/devin-desktop Add Keenable to Devin Desktop (formerly Windsurf) over MCP. Config paths for Devin Local and the legacy Windsurf data directory. *MCP server* Give [Devin Desktop](https://devin.ai/), Cognition's editor formerly called Windsurf, web search and page fetch through the Keenable MCP server at `https://api.keenable.ai/mcp`. Add the server in an `mcp_config.json` file, or with one command from the [Keenable CLI](/cli). ## Install ### mcp_config.json Devin Local reads MCP servers from these files. Use the user-scope file to make Keenable available in every project: | Scope | Path | | - | - | | User | `~/.config/devin/mcp_config.json` (Windows: `%APPDATA%\devin\mcp_config.json`) | | Project | `.devin/mcp_config.json` | | Local (gitignored) | `.devin/mcp_config.local.json` | Add this entry to one of them: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "mcpServers": { "keenable": { "url": "https://api.keenable.ai/mcp", "headers": { "X-API-Key": "keen_" } } } } ``` Devin Local reads the address from `url`. Create a key in the [console](https://app.keenable.ai/console?utm_source=docs\&utm_medium=cta\&utm_campaign=devin_desktop\&utm_content=console), and see [Authentication](/authentication) for details. To run on the public tier, omit the `headers` block and point `url` at the keyless endpoint, `https://api.keenable.ai/mcp-public`. The public tier allows 1,000 requests per hour and up to 10 per second per IP address (see [Rate limits](/rate-limits)). Don't commit a config file that holds your key. Put the key in `.devin/mcp_config.local.json` or the user-scope file. ### Legacy Windsurf path A pre-rebrand install reads `~/.codeium/windsurf/mcp_config.json` instead. Use the same JSON there, with the key `serverUrl` in place of `url`. ### Keenable CLI Install the CLI, sign in, and write the entry to the user-scope file: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} brew install keenableai/tap/keenable-cli keenable login keenable configure-mcp --devin --yes ``` `keenable login` opens a browser device-code sign-in and stores your credentials locally. `configure-mcp --devin` writes the entry, with `url` and the stored key, to `~/.config/devin/mcp_config.json`. The command does nothing unless the `~/.config/devin` directory exists. To remove the entry, run `keenable reset --devin`. For other ways to install the CLI, see [CLI](/cli#installation). For a pre-rebrand install, `configure-mcp --windsurf` writes the entry with `serverUrl` to the legacy `~/.codeium/windsurf/mcp_config.json` instead. ## Use it Ask Devin Desktop a question that needs the web, for example "What are the fastest inference providers in 2026? Cite your sources." It calls `search_web_pages` and answers with linked sources. For a known URL, ask it to read the page with `fetch_page_content`. See [MCP server](/mcp-server) for the tool list and every other client. ## Related pages > [card] [oh-my-pi](/integrations/oh-my-pi) > > Use Keenable as the web search engine in oh-my-pi (omp), the coding agent, with the web/keenable model role. Works without an API key. > [card] [Pi](/integrations/pi) > > Give the Pi coding agent web search and page fetch with the @keenable/pi-search package, or pick Keenable in pi-web-access. > [card] [OpenClaude](/integrations/openclaude) > > Make Keenable the web search backend in OpenClaude with /search keenable or WEB_SEARCH_PROVIDER=keenable. No key needed, in OpenClaude 0.34.0 and later. > [card] [Agent skill](/agent-skill) > > Install the keenable-web-search agent skill with npx skills add. Your agent searches the web with a bundled script, with no API key and no MCP client. # Dify web search plugin Source: https://docs.keenable.ai/integrations/dify Add web search and page fetch to Dify agents and workflows with the Keenable plugin from the Dify Marketplace. Works without an API key. *Marketplace plugin* Give your Dify agents and workflows web search and page fetch with the `keenable` tool plugin. It adds two tools, **Keenable Search** and **Keenable Fetch**, and runs without an API key. → [keenable on Dify Marketplace](https://marketplace.dify.ai/plugin/keenable/keenable) · [plugin source](https://github.com/keenableai/dify-plugin-keenable) ## Install The plugin needs Dify 1.2.0 or later, on Dify Cloud or a self-hosted instance. **1. Find the plugin** Open the [Dify Marketplace](https://marketplace.dify.ai/plugin/keenable/keenable), or search for "Keenable" in your workspace's plugin marketplace. **2. Install it** Select **Install**. Dify adds the **Keenable** tool provider to your workspace. **3. Authorize the provider** Open **Integrations** → **Tools** → **Tool Plugin**, select **Keenable**, and save. Leave **Keenable API key (optional)** empty to run on the keyless tier, or paste a `keen_…` key from the [console](https://app.keenable.ai/console/api-keys). If you paste a key, Dify checks it with one search when you save. An invalid key fails at that point, not on the first agent run. ## Add the tools Add **Keenable Search** or **Keenable Fetch** to an Agent app or to a Workflow tool node. * **In an Agent app**, add both tools. The model calls Keenable Search to find pages, then Keenable Fetch to read the most relevant one. * **In a Workflow**, add a Tool node and set its inputs. Each tool returns a `json` output for later nodes and a `text` output for an LLM node. | Tool | Input | Required | What it does | | - | - | - | - | | Keenable Search | `query` | Yes | The search query. | | Keenable Search | `mode` | No | `pro` (default) or `realtime`. | | Keenable Search | `site` | No | Keep results from one domain, such as `github.com`. | | Keenable Search | `published_after` | No | Keep pages published on or after a date, as `YYYY-MM-DD`. | | Keenable Search | `published_before` | No | Keep pages published on or before a date, as `YYYY-MM-DD`. | | Keenable Fetch | `url` | Yes | An absolute `http` or `https` URL to read. | Keenable Search returns `{"results": [...]}` in `json`, with each result's `title`, `url`, `snippet` and `published_at`. Its `text` output lists the results with the first 500 characters of each snippet. Keenable Fetch returns the page fields in `json` and the page as markdown in `text`. The model sets every input per call, so an agent can narrow a search to one site or a date range on its own. ## Check the connection From the machine that hosts Dify, run a keyless search like the one the plugin sends. A self-hosted Dify behind an egress firewall needs outbound HTTPS to `api.keenable.ai` on port 443, and this request tests it: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -sS -X POST "https://api.keenable.ai/v1/search/public" \ -H "Content-Type: application/json" \ -H "X-Keenable-Title: My Dify app" \ -d '{ "query": "Dify plugin development guide", "mode": "pro", "site": "docs.dify.ai" }' ``` You get a JSON object with a `results` array. If the request times out, allow `api.keenable.ai` in your egress rules. The plugin calls no other host, unless `KEENABLE_API_URL` is set on the plugin runtime. ## Troubleshooting The plugin returns errors as a `text` message, so an agent run continues and the model sees what went wrong. | Message | Cause | Fix | | - | - | - | | `Keenable rate limit exceeded (429)` | The keyless tier allows 1,000 requests per hour per IP address. | Add an API key to the provider. See [Rate limits](/rate-limits). | | `Keenable authentication failed (401)` | The saved key is wrong or incomplete. | Copy the key again from the console and save the provider. See [Errors](/errors#401-invalid-key). | | `Keenable: insufficient credits (402)` | Your organization is out of funds. | Add funds in the console. See [Errors](/errors#402). | | `Keenable API error (422)` | Keenable couldn't extract text from the page, often a JavaScript-only app. | Fetch a different URL. | | `Refusing to fetch a private/internal address` | The URL points at a loopback, private or cloud metadata address. | Pass a public URL. The plugin blocks these before sending a request. | | `No results found for '…'` | The search matched nothing. | Remove the `site` or date filters, or rephrase the query. | For the same tools in other visual builders, see [Langflow](/integrations/langflow) and [n8n](/integrations/n8n). > [!NOTE] > > Without a key, calls run on the shared keyless tier at [lower rate limits](/rate-limits). Paste a `keen_…` key into **Keenable API key (optional)** to use your organization's limits and remove the hourly cap. ## Related pages > [card] [Convex](/integrations/convex) > > Add Keenable search and fetch to a Convex app with the @keenable/convex component, with or without an API key. > [card] [Tines](/integrations/tines) > > Call Keenable web search and page fetch from Tines stories with the HTTP Request action, with no key to start. > [card] [RAGFlow](/integrations/ragflow) > > Give RAGFlow agents web search with the Keenable tool built into RAGFlow's visual agent builder. Works without an API key. > [card] [Fetch](/api-reference/fetch) > > Fetch a web page with GET /v1/fetch and get its main text as markdown, or only the part a prompt asks for. # Where Keenable is listed: MCP registries and directories Source: https://docs.keenable.ai/integrations/directories Every MCP registry, connector directory and skill catalog that lists Keenable, with a link to each listing and the install command it uses. Install Keenable from the catalog you already use. Every listing on this page points at Keenable's hosted MCP server or at the `keenable-web-search` skill. The MCP server listings give you the same tools wherever you find them: `search_web_pages` and `fetch_page_content`. The skill listings give your agent search through a Python script, with no MCP client and no page fetch tool. All listings but the OpenAI plugin work with no API key to start. See the [MCP server](/mcp-server) reference for per-client setup. ## Listings | Listing | What it lists | How you install from it | | - | - | - | | [Claude Connectors Directory](/integrations/claude) | Keenable Web Search connector | **Customize → Connectors**, then search for **Keenable Web Search**. | | [OpenAI Plugins Directory](/integrations/chatgpt) | Keenable plugin for ChatGPT and Codex | **Plugins** in ChatGPT, then search for **Keenable**. | | [Antigravity Plugin Marketplace](/integrations/antigravity) | Keenable plugin with search, fetch and the skill | **Customizations → Marketplace → Keenable**. | | [Official MCP Registry](https://registry.modelcontextprotocol.io/v0/servers?search=ai.keenable) | Server `ai.keenable/web-search`: the remote endpoint and the `@keenable/mcp` npm package | Clients that read the registry install it by that name. See [Read the registry entry](#read-the-registry-entry). | | [GitHub MCP Registry](https://github.com/mcp/ai.keenable/web-search) | Server `ai.keenable/web-search` | **Install** on the listing, then pick VS Code. See [VS Code from the GitHub MCP Registry](#vs-code-from-the-github-mcp-registry). | | [Glama](https://glama.ai/mcp/connectors/ai.keenable.api/keenable-web-search) | Keenable Web Search connector | Add the connector in Glama. It connects to the hosted server. | | [PulseMCP](https://www.pulsemcp.com/servers/keenable-web-search) | Server `ai.keenable/web-search`, marked official | Copy the remote URL into your client. No account or key. | | [mcp.so](https://mcp.so/servers/keenable-mcp) | Keenable Web Search | The `npx -y @keenable/mcp` config. See [Local bridge from npm](#local-bridge-from-npm). | | [LobeHub](https://lobehub.com/mcp/keenableai-keenable-mcp) | Keenable MCP (`keenableai-keenable-mcp`) | The remote URL, or the same npm bridge. | | [Official MCP servers list](https://github.com/VoltAgent/official-mcp-servers) | Keenable, under Emerging and Independent | Links to the [keenable-mcp repository](https://github.com/keenableai/keenable-mcp). | | [skills.sh](https://skills.sh/keenableai/keenable-mcp/keenable-web-search) | The `keenable-web-search` agent skill | `npx skills add`. See [Agent skill from skills.sh](#install-the-agent-skill). | | [ClawHub](https://clawhub.ai/keenable/keenable-web-search) | The `keenable-web-search` agent skill | Install it from ClawHub. The skill has no dependencies. | If a listing shows a setup that differs from the [MCP server](/mcp-server) page, follow the MCP server page. ## Read the registry entry The Official MCP Registry serves each published version of `ai.keenable/web-search` as JSON. To see the latest manifest, with its remote URL and npm package: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -s "https://registry.modelcontextprotocol.io/v0/servers?search=ai.keenable" ``` The entry with `"isLatest": true` is the current one. Its `remotes` list holds a Streamable HTTP endpoint with an optional `X-API-Key` header, and its `packages` list holds `@keenable/mcp` with an optional `KEENABLE_API_KEY` variable. ## VS Code from the GitHub MCP Registry The GitHub MCP Registry backs one-click MCP installs in VS Code. It reads the same `server.json` as the Official MCP Registry, so **Install** on the listing adds the registry's remote: the keyless endpoint `https://api.keenable.ai/mcp-public?keenable_title=mcp-registry`. That endpoint publishes no OAuth discovery, and it accepts an optional `X-API-Key` header. See [Keyless endpoint for listings and presets](/mcp-server#keyless-endpoint-for-listings-and-presets). To write the entry by hand, for example because you will add your own key, point it at `/mcp`: ```json .vscode/mcp.json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "servers": { "keenable": { "type": "http", "url": "https://api.keenable.ai/mcp", "headers": { "X-API-Key": "keen_" } } } } ``` Leave out `headers` to run on the public tier. VS Code uses the top-level key `servers`, not `mcpServers`. Open Copilot Chat in agent mode: the tools picker lists `search_web_pages` and `fetch_page_content`. ## Local bridge from npm mcp.so, LobeHub and the registry's npm entry use the stdio bridge, which runs locally and forwards to the hosted server. This is the shape for clients that take only local commands, such as Claude Desktop's config file: ```json theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} { "mcpServers": { "keenable": { "command": "npx", "args": ["-y", "@keenable/mcp"] } } } ``` Add `"env": { "KEENABLE_API_KEY": "keen_" }` to the entry to use your key. See [Local bridge (with an API key)](/mcp-server#local-bridge-with-an-api-key). ## Install the agent skill The skill gives agents web search through a Python script, with no MCP client. Install it into a project for Claude Code: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} npx skills add keenableai/keenable-mcp --skill keenable-web-search -a claude-code -y ``` The command prints where it copied the skill. Change `-a` for another agent. See [Agent skill](/agent-skill). > [!NOTE] > > Most listings start keyless, on the shared public tier at [lower rate limits](/rate-limits). For the registry entries, Glama, PulseMCP, mcp.so and LobeHub, add an [API key](/api-keys) in the `X-API-Key` header, or as `KEENABLE_API_KEY` for the npm bridge, to use your organization's limits. The skill takes no key. The Claude connector and the Antigravity plugin take no key either, and their pages show how to add Keenable on your own account. The OpenAI plugin is the exception: you sign in to a Keenable account, and usage counts against that organization's limits and pricing. See [ChatGPT and Codex](/integrations/chatgpt). ## Related pages > [card] [Integrations](/integrations) > > Connect Keenable web search to your agent stack: LangChain, LlamaIndex, Haystack, MCP and more. > [card] [Cursor](/integrations/cursor) > > Add Keenable to Cursor over MCP with one click, an mcp.json entry or the Keenable CLI, and turn off Cursor's own web search. > [card] [CLI](/cli) > > Install the Keenable CLI, sign in once, add Keenable to Claude Code, Cursor and Codex over MCP, and search, fetch and run monitors from the terminal. # FrontierAgent web search with Keenable Source: https://docs.keenable.ai/integrations/frontier-agent Set WEB_SEARCH_PROVIDER=keenable to send FrontierAgent's web_search tool to Keenable, up to 50 results per query. Works without an API key. *Search provider in FrontierAgent* Keenable is a search provider for the `web_search` tool in [FrontierAgent](https://github.com/ApodexAI/FrontierAgent), the terminal agent you launch in any project. Serper stays the default. Set one variable and `web_search` sends its queries to Keenable instead, without an API key. → [Global install guide in the FrontierAgent repository](https://github.com/ApodexAI/FrontierAgent/blob/main/docs/install/global-install.md) ## Install FrontierAgent has no releases yet, so it ships from its `main` branch. Install it as a tool with [uv](https://docs.astral.sh/uv/): ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} uv tool install --python 3.12 git+https://github.com/ApodexAI/FrontierAgent.git ``` This installs `frontier-agent` and its alias `apodex`. ## Select Keenable A global install reads settings from `~/.config/apodex/env` (or `$XDG_CONFIG_HOME/apodex/env`), next to your model settings. Add the provider line: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} config_dir="${XDG_CONFIG_HOME:-$HOME/.config}/apodex" mkdir -p "$config_dir" echo "WEB_SEARCH_PROVIDER=keenable" >> "$config_dir/env" chmod 600 "$config_dir/env" ``` Open a terminal in a project and run `frontier-agent`. When the agent calls `web_search`, the query goes to Keenable. For a clone run with `uv sync`, put the same line in the repository's `.env`, or export it in the shell. ## Settings | Setting | What it does | | - | - | | `WEB_SEARCH_PROVIDER=keenable` | Sends `web_search` to Keenable, up to 50 results per query. `serper` is the default. | | `KEENABLE_API_KEY` | Optional. With a key, searches go through your Keenable account at its higher limits and use its credits. | The setting changes `web_search` only. `web_fetch` keeps its own provider. The env file takes plain `KEY=value` lines and reads values literally: `${VAR}` is not expanded. `APODEX_ENV_FILE=/path/to/file` points FrontierAgent at a different file. > [!NOTE] > > Without a key, searches run on the shared public tier at [lower rate limits](/rate-limits). Add `KEENABLE_API_KEY` to the same env file to use your organization's limits. See [API keys](/api-keys). ## Related pages > [card] [Claude Octopus](/integrations/claude-octopus) > > Set OCTOPUS_RESEARCH_WEB_SEARCH=keenable so Claude Octopus research runs one Keenable search and hands every perspective the top results. No key needed. > [card] [OpenClaude](/integrations/openclaude) > > Make Keenable the web search backend in OpenClaude with /search keenable or WEB_SEARCH_PROVIDER=keenable. No key needed, in OpenClaude 0.34.0 and later. > [card] [Gajae-Code](/integrations/gajae-code) > > Use Keenable as the web search provider in Gajae-Code (gjc), the coding-agent harness, with providers.webSearch set to keenable. No key needed. > [card] [Connect your agent (MCP)](/mcp-server) > > Connect the Keenable MCP server to Claude Code, Cursor, Codex and other clients for web search and fetch with no key. Sign in for higher limits and Monitors. # Gajae-Code web search with Keenable Source: https://docs.keenable.ai/integrations/gajae-code Use Keenable as the web search provider in Gajae-Code (gjc), the coding-agent harness, with providers.webSearch set to keenable. No key needed. *Search provider in Gajae-Code* Keenable is a web search provider in [Gajae-Code](https://github.com/Yeachan-Heo/gajae-code) (`gjc`), the coding-agent harness you drop into any repository. Select it and the agent's `web_search` tool sends queries to Keenable. It works without an API key. → [web_search in Gajae-Code's docs](https://github.com/Yeachan-Heo/gajae-code/blob/main/docs/tools/web_search.md) ## Install Keenable is in Gajae-Code 0.21.1, the current release on 19 November 2026. Gajae-Code's README has the install script for each platform, for example on Linux and macOS: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} curl -fsSL https://raw.githubusercontent.com/Yeachan-Heo/gajae-code/main/scripts/install.sh | sh ``` The README also shows how to download the script at a release tag and read it before you run it. ## Select Keenable Set the search provider from the shell: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} gjc config set providers.webSearch keenable ``` The setting is saved in the global `config.yml` of the agent directory, `~/.gjc/agent/` by default. `gjc config path` prints the directory in use. Start `gjc` and ask a question that needs the web: the agent's `web_search` calls go to Keenable. To keep another provider first and fall back to Keenable, list it in `web_search.fallback` instead. ## Settings | Setting | What it does | | - | - | | `providers.webSearch: keenable` | Uses Keenable for `web_search`. Keenable is never picked in `auto` mode. | | `web_search.fallback` | A list of providers to try after the selected one. Keenable can be one of them. | | `KEENABLE_API_KEY` | Optional. With a key, or a stored `keenable` credential, gjc calls `/v1/search` with `X-API-Key` instead of the keyless `/v1/search/public`. | Each request carries `query`, `max_results` and an `X-Keenable-Title` header. Gajae-Code asks for 10 results by default and up to 50. > [!NOTE] > > Without a key, searches run on the shared public tier at [lower rate limits](/rate-limits). Export `KEENABLE_API_KEY`, or add it to `~/.gjc/agent/.env`, to use your organization's limits. See [API keys](/api-keys). ## Related pages > [card] [Codex](/integrations/codex) > > Add Keenable to Codex over MCP or the Plugins Directory, and turn off Codex's built-in web search so the agent calls Keenable. > [card] [Claude Octopus](/integrations/claude-octopus) > > Set OCTOPUS_RESEARCH_WEB_SEARCH=keenable so Claude Octopus research runs one Keenable search and hands every perspective the top results. No key needed. > [card] [Cursor](/integrations/cursor) > > Add Keenable to Cursor over MCP with one click, an mcp.json entry or the Keenable CLI, and turn off Cursor's own web search. > [card] [Agent skill](/agent-skill) > > Install the keenable-web-search agent skill with npx skills add. Your agent searches the web with a bundled script, with no API key and no MCP client. # Web search in Gemini and Gemini CLI Source: https://docs.keenable.ai/integrations/gemini Add Keenable to the Gemini app and Gemini CLI, and keep Gemini CLI's own web search from competing with it. *MCP custom app* Give Gemini web search and page reading through Keenable. In the Gemini app, you add Keenable as a custom app by pasting its MCP server URL and signing in to your Keenable account. In Gemini CLI, you add the same server with one command. Gemini also searches the web with Google. In Gemini CLI you can turn that search off. In the Gemini app, you pick Keenable for a prompt with `@`. ## Gemini app ### Add the custom app You add the app once in the web app at [gemini.google.com](https://gemini.google.com). After that, it works in both the Gemini web app and the Gemini mobile app. **1. Open Connected Apps** On your computer, open [gemini.google.com](https://gemini.google.com), click **Settings** at the bottom, then **Connected Apps**. If you don't see **Connected Apps**, click **Personal Intelligence** first, then **Connected Apps**. **2. Add the server URL** Under **Custom apps**, click **Add a custom app**, enter this URL, and click **Next**: ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} https://api.keenable.ai/mcp-oauth ``` Leave **Advanced features** as it is. Keenable supports Dynamic Client Registration, so Gemini registers itself and there are no credentials to enter. **3. Sign in** Follow the on-screen instructions, sign in to Keenable, and allow access. Searches then count against your current organization in Keenable, with its [rate limits](/rate-limits) and [pricing](/pricing). Signing in also adds the [Monitors tools](/mcp-server#monitors-tools). > [!NOTE] > > Google limits custom apps to personal Google Accounts, so you can't add one if you sign in to Gemini with a work or school account. You also need to be 18 or over, be in the US, and have Gemini's **History** setting on. See Google's [Connect & manage custom apps](https://support.google.com/gemini/answer/17209137) for the current requirements. ### Use it in a chat If a connected app fits the prompt, Gemini can call it on its own, but Gemini also searches with Google. Google documents no setting that turns that search off in the Gemini app. To make sure Gemini uses Keenable for a prompt, type `@` in the message box and select the Keenable app. To turn Keenable off, open **Settings → Connected Apps** again and switch it off under **Custom apps**. To remove it, click **More details → Remove app**, which also unlinks Keenable from your Google Account. ## Gemini CLI ### Add the server Run this command with your own key in place of `keen_`: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} gemini mcp add --transport http --scope user keenable https://api.keenable.ai/mcp \ --header "X-API-Key: keen_" ``` `--scope user` makes it available in every project. Without it, Gemini CLI adds the server to the current project only. The key also adds the [Monitors tools](/mcp-server#monitors-tools). Omit the `--header` flag to run on the public tier at [lower rate limits](/rate-limits), with the two web tools only. ### Turn off the built-in search Gemini CLI ships its own `google_web_search` and `web_fetch` tools. Deny them with a policy file. Create `~/.gemini/policies/keenable.toml`: ```toml theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} [[rule]] toolName = ["google_web_search", "web_fetch"] decision = "deny" priority = 100 ``` Gemini CLI loads every `.toml` file in `~/.gemini/policies`. A deny rule that names a whole tool removes it from the model's context, so Keenable's `search_web_pages` and `fetch_page_content` are the only search and fetch tools it has left. Drop `"web_fetch"` if you want to keep Gemini's own page reader. To turn the built-in search back on, delete the file. ### Verify Run `/mcp` in Gemini CLI to confirm **keenable** is connected with `search_web_pages` and `fetch_page_content` listed, or run `gemini mcp list` from your shell. Then ask a question that needs the live web. Gemini should call `search_web_pages` without being told to. ## What to ask Keenable gives Gemini two web tools, and Gemini combines them across a longer task. > [card] Search > > Ranked results with an excerpt of each page's text, narrowed to one site or a date range when the question calls for it. > [card] Read > > Any URL as clean markdown: documentation, changelogs, issues, papers, pricing pages. > [card] Research > > Several searches, the pages worth reading, and an answer that cites them. Ask for the result you want, and say which sources count. In the Gemini app, start with `@` and the Keenable app: ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} What changed in the EU AI Act guidance this month? Use the official pages and cite each one. ``` ```text theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} Find the release notes for every version of zod between the one in package.json and the latest, list the breaking changes, and update our schemas to match. ``` The first suits the Gemini app. The second suits Gemini CLI, where Gemini can act on what it finds in your repository. ## More from Keenable Gemini CLI also installs Keenable as an extension, with a skill for web lookups. See [Google Antigravity](/integrations/antigravity#gemini-cli). → [Full MCP server reference](/mcp-server) ## Related pages > [card] [CowAgent](/integrations/cowagent) > > Keenable is a built-in web search provider in CowAgent that can run without an API key. > [card] [Claude](/integrations/claude) > > Add Keenable to Claude and Claude Code, and keep Claude's own web search from competing with it. > [card] [LibreChat](/integrations/librechat) > > Keenable is the keyless search provider and content scraper built into LibreChat's web search. > [card] [Agent skill](/agent-skill) > > Install the keenable-web-search agent skill with npx skills add. Your agent searches the web with a bundled script, with no API key and no MCP client. # Google ADK web search over MCP Source: https://docs.keenable.ai/integrations/google-adk Give Google ADK agents Keenable search and fetch over the hosted MCP server. *Agent framework · MCP* Give [Google Agent Development Kit](https://adk.dev/) (ADK) agents web search and page fetch by adding the Keenable MCP server as a remote MCP toolset. You don't need an ADK-specific package. ## Install ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} pip install "google-adk[mcp]" ``` The `mcp` extra installs the MCP client that `McpToolset` needs. Without it, the import below fails. ## Connect the MCP server Add Keenable to your agent as an `McpToolset`: ```python theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} from google.adk.agents import LlmAgent from google.adk.tools.mcp_tool import McpToolset from google.adk.tools.mcp_tool.mcp_session_manager import StreamableHTTPConnectionParams root_agent = LlmAgent( model="gemini-2.5-flash", name="keenable_research_agent", instruction="Search the web with Keenable before you answer. Cite source URLs.", tools=[ McpToolset( connection_params=StreamableHTTPConnectionParams( url="https://api.keenable.ai/mcp", headers={"X-API-Key": "keen_"}, ) ) ], ) ``` The key travels in the `X-API-Key` header. Create one in the [console](https://app.keenable.ai/console). To run without a key, omit the `headers` argument: calls then run on the shared public tier at [lower rate limits](/rate-limits). If your client reads OAuth discovery before it connects, use `https://api.keenable.ai/mcp-public` instead. See [MCP server](/mcp-server#keyless-endpoint-for-listings-and-presets). The agent gets the `search_web_pages` and `fetch_page_content` tools. Ask it a question that needs the web. It calls the tools and answers with sources. ## Related pages > [card] [Haystack](/integrations/haystack) > > Add web search and page fetch to Haystack pipelines with the Keenable components. > [card] [CrewAI](/integrations/crewai) > > Give CrewAI agents Keenable web search with the official SDK. Keyless by default. > [card] [LangChain](/integrations/langchain) > > Give LangChain agents web search and page fetch with langchain-keenable: the KeenableSearch and KeenableFetch tools. > [card] [Tool calling](/tool-calling) > > Give an LLM web search and page fetch as tools. Pass the SDK's TOOLS to any OpenAI-compatible chat completions client and run each call with run_tool_call. # GPT Researcher web search retriever Source: https://docs.keenable.ai/integrations/gpt-researcher Give GPT Researcher web search with no API key through gpt-researcher-keenable, a retriever plugin. *Retriever plugin* Give [GPT Researcher](https://github.com/assafelovic/gpt-researcher) Keenable web search with the `gpt-researcher-keenable` retriever plugin. It works without an API key. GPT Researcher finds the plugin through its plugin entry point, so you don't change any GPT Researcher code. → [gpt-researcher-keenable on PyPI](https://pypi.org/project/gpt-researcher-keenable/) ## Install You need GPT Researcher 0.16.1 or later. Install the plugin: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} pip install gpt-researcher-keenable ``` ## Select Keenable Set the `RETRIEVER` environment variable: ```bash theme={"theme":{"light":"github-light-high-contrast","dark":"dark-plus"}} export RETRIEVER=keenable ``` To use Keenable alongside the built-in retrievers, separate the names with commas, for example `RETRIEVER=keenable,arxiv`. ## Retriever behavior * Each result gives GPT Researcher a title, a URL and a short preview of the page. GPT Researcher then scrapes the pages it keeps, as it does with its built-in web retrievers. * `MAX_SEARCH_RESULTS_PER_QUERY` sets the number of results, from 1 to 50. * If you set `query_domains`, the plugin searches only the first domain you list. * If a network or API call fails, the plugin logs the error and returns no results, so the research run continues. > [!NOTE] > > If you don't set a key, searches run on the shared public tier at [lower rate limits](/rate-limits). Set `KEENABLE_API_KEY` to use your organization's limits and remove the hourly cap. ## Related pages > [card] [Hermes Agent](/integrations/hermes-agent) > > Keenable is built into Hermes Agent as a web backend for web_search and web_extract, and works without a key. > [card] [de-anthropocentric research engine](/integrations/de-anthropocentric-research-engine) > > Keenable is one of the MCP servers the de-anthropocentric research engine recommends for web retrieval, with no install and no key. > [card] [ketch](/integrations/ketch) > > Use Keenable as the built-in search backend in ketch, the agent CLI written in Go. > [card] [Fetch quickstart](/products/fetch) > > Turn any URL into clean markdown your model can read, or get only the part a prompt asks for. Try it with no API key. Code, cost per call and gotchas. # Haystack web search components Source: https://docs.keenable.ai/integrations/haystack Add web search and page fetch to Haystack pipelines with the Keenable components. *Pipeline components* Add web search and page fetch to your Haystack pipelines with two Keenable components, `KeenableWebSearch` and `KeenableFetcher`. → [keenable in the Haystack integrations catalog](https://haystack.deepset.ai/integrations/keenable)