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
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 leavesmode out, so the search runs in pro, the default:
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 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 lists every one:
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:
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.
Related
- Search: every search parameter, with examples.
- Search API reference: the request and response fields.
- Changelog: every change, newest first.