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 searchespython.org and every subdomain except the forum at discuss.python.org, and prints the top 5 results. It runs with no API key:
docs.python.org, peps.python.org and bugs.python.org, none from discuss.python.org:
Example output · results vary
max_results set to 2 and snippet_max_length to 180:
Response excerpt · results vary
max_results can come back. If exclude_domains covers the whole site, the response has no results.
Write an entry
Eachexclude_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
Thesite parameter takes one site. To search several, put site: operators in query and join them with OR:
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 takeexclude_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
- Exclude domains: what an entry matches, clean-up, limits and GET requests.
- Search request:
siteandexclude_domainsin full. - Filter by date: add a date window to a site search.