In short. Use blocked_domains inside the Responses API web_search tool's filters object to exclude named domains from a search request.
Definition:
blocked_domainsis a domain filter inside thefiltersobject of the Responses APIweb_searchtool. It lets an API request name domains that the web search configuration should leave out, using host names without an HTTP or HTTPS prefix.
Key facts
- OpenAI's web search documentation says the
filtersparameter supports up to 100allowed_domainsor up to 100blocked_domains. - The same documentation says to omit the HTTP or HTTPS prefix when formatting a domain, such as
openai.comrather thanhttps://openai.com/. - OpenAI says the domain filtering approach also includes subdomains in the search.
- Domain filtering is documented only for the Responses API with the
web_searchtool. - OpenAI's Responses API reference describes
filtersas an optional object on the web search tool.
How do I add blocked domains to a request?
Put blocked_domains inside filters, which is inside the web search tool definition. The guide's example combines an allowed list with three blocked domains:
{
"type": "web_search",
"filters": {
"blocked_domains": ["reddit.com", "quora.com", "wikipedia.org"]
}
}
Each array item is a domain name. The documented format uses example.com, without https:// and without a path. The guide permits up to 100 entries in blocked_domains, so a longer exclusion list must be reduced to that documented limit.
Which API supports this setting?
OpenAI places domain filtering in the Responses API's hosted web_search tool. Its guide states that domain filtering is available only there, even though the same page also describes web search in some Chat Completions cases. The API reference identifies the tool type as web_search or web_search_2025_08_26 and describes filters as optional search configuration.
This scope matters when comparing request formats. A Chat Completions request that uses a specialized search model is a different path from a Responses request containing a web_search tool and its filters object.
How can I inspect the URLs used by the search?
The web search guide documents a sources field for viewing all URLs retrieved during a web search. It says this list is complete for the URLs the model consulted, while inline citations show only the most relevant references. The guide's example requests the source list with this option:
{
"include": ["web_search_call.action.sources"]
}
The API reference describes external_web_access separately: when omitted, live internet access defaults to true; when set to false, the tool runs in offline or cache-only mode. That setting controls access mode, while blocked_domains controls domain filtering.
Related terms
FAQ
Can I use blocked_domains in Chat Completions?
OpenAI documents domain filtering only with the Responses API web_search tool. Chat Completions search models follow a separate request path.
Should a blocked domain include https://?
No. The web search guide says to omit the HTTP or HTTPS prefix and use the domain name itself.
Are subdomains covered?
OpenAI says the domain filtering approach includes subdomains in the search. The documentation does not give a separate matching rule for a blocked parent domain and each subdomain.
Sources
Check how a page reads to answer engines. Open the GEO score analyzer