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

# Moderation replaces safety_mode on search

> 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`](https://docs.keenable.ai/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](https://docs.keenable.ai/mcp-server.md#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](https://docs.keenable.ai/api-reference/search.md#deprecation-warnings).

Time Machine search doesn't take `moderation`, and `safety_mode` there is unchanged until 1 March 2027. See [Time Machine search](https://docs.keenable.ai/api-reference/time-machine.md).

## 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](https://docs.keenable.ai/products/fetch.md). |

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](https://docs.keenable.ai/errors.md#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](https://docs.keenable.ai/api-reference/search.md#request): the `moderation` field and every other request field.
* [Versioning and deprecation](https://docs.keenable.ai/versioning.md): how long a deprecated parameter keeps working.
* [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.