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

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

# Safe search for pro and realtime 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.

## 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](https://docs.keenable.ai/api-reference/search.md#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](https://docs.keenable.ai/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](https://docs.keenable.ai/products/fetch.md). |
| 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](https://docs.keenable.ai/errors.md#400-invalid-request).

## Related

* [Search](https://docs.keenable.ai/products/search.md): every search parameter, with examples.
* [Search API reference](https://docs.keenable.ai/api-reference/search.md#request): the request and response fields.
* [Changelog](https://docs.keenable.ai/changelog.md): every change, newest first.


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