Skip to main content
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

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:
You see results from docs.python.org, peps.python.org and bugs.python.org, none from discuss.python.org:
Example output · results vary
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:
Response excerpt · results vary
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.

Search several sites

The site parameter takes one site. To search several, put site: operators in query and join them with OR:
Keep every site filter in one place. Use the site parameter, or site: operators in the query, not both. See Search operators, and the Search operators guide for grouping several sites with other terms.

Common mistakes

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.

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). Over MCP, search_web_pages takes site and exclude_domains (see MCP server).

API reference