
I Tried Out the Domain Filter Supported by Amazon Bedrock Web Search
This page has been translated by machine translation. View original
Introduction
On October 23, 2026, domain filters were added to Web Search on Amazon Bedrock. You can now specify in the request which domains to include in results and which to exclude.
This article is a follow-up to the article right after Web Search became generally available (Previous Article 1) and the article covering External Web Access (Previous Article 2).
I ran the same question asking about DevelopersIO articles three times each under three conditions: no filter, allowed_domains, and blocked_domains. I checked the differences in search queries, open_page, and citations in the logs. I also examined the behavior when the model was made to open a URL that was not allowed or one that was excluded.
Configuration
Controlling the sources
The means of deciding which sites Web Search uses as the basis for its answers have been added as follows.
| Date | What was added | Means of deciding the sources |
|---|---|---|
| 2026-08-04 | General availability of Web Search | Searches an Amazon-operated Web index. In Previous Article 1, the model added site: to its additional searches to narrow them to official AWS domains |
| 2026-08-19 | External Web Access | The IAM bedrock-websearch:ExternalWebAccess permission and the request's external_web_access determine whether retrieval from the public Web is allowed. The announcement does not describe any means of specifying the sites to retrieve from |
| 2026-10-23 | Domain filters | In the request, filters' allowed_domains / blocked_domains specify the domains to include in results and the domains to exclude |
The only Web Search condition key listed in the IAM guide is aws:RequestedRegion, which restricts by Region.
How to write filters
Specify allowed_domains or blocked_domains in the filters of the web_search tool. According to the announcement, allowed_domains is for limiting results to trusted sources, and blocked_domains is for excluding specific sources. Each list can contain up to 100 entries.
Write domains without http:// or https://. Each entry also matches subdomains; in the guide's example, specifying aws.amazon.com also includes docs.aws.amazon.com.
The tools values used in the verification are the following two. In the invocation script described later, they were passed as-is to the --tools argument.
[
{
"type": "web_search",
"external_web_access": true,
"filters": {
"allowed_domains": ["dev.classmethod.jp"]
}
}
]
[
{
"type": "web_search",
"external_web_access": true,
"filters": {
"blocked_domains": ["dev.classmethod.jp"]
}
}
]
Prerequisites
Endpoint
Web Search is a server-side tool and cannot be used with the bedrock-runtime Responses API. You call it through the bedrock-mantle Responses API. The bedrock-mantle guide also states that server-side tools and preconfigured tools (including Web Search) are not available on bedrock-runtime. The same guide recommends bedrock-runtime for new applications and positions bedrock-mantle as the one to use when you need features that bedrock-runtime lacks.
I sent requests to bedrock-runtime with the same model (us.openai.gpt-5.6-luna) and input in two ways: without tools and with web_search. Without tools it returned HTTP 200, and with web_search it returned the following 400.
REQUEST_URL=https://bedrock-runtime.us-east-1.amazonaws.com/openai/v1/responses
REQUEST_BODY={"model": "us.openai.gpt-5.6-luna", "input": "web search bedrock bedrock-websearch:ExternalWebAccess", "store": false, "tools": [{"type": "web_search", "external_web_access": true}]}
HTTP_STATUS=400
{
"error": {
"message": "web search is not supported for this request",
"type": "invalid_request_error",
"param": null,
"code": "validation_error"
}
}
The Mantle base URL path for the model openai.gpt-5.6-luna is /openai/v1. Specifying /v1 returned a different 400.
REQUEST_URL=https://bedrock-mantle.us-east-1.api.aws/v1/responses
HTTP_STATUS=400
"message": "The model 'openai.gpt-5.6-luna' does not support the '/v1/responses' API",
With /openai/v1, HTTP 200 was returned.
REQUEST_URL=https://bedrock-mantle.us-east-1.api.aws/openai/v1/responses
HTTP_STATUS=200
Verification environment
The verification was performed on 2026-10-25 in us-east-1. The base URL was https://bedrock-mantle.us-east-1.api.aws/openai/v1 and the model was openai.gpt-5.6-luna. I generated a short-term Bearer token from credentials that have the bedrock-websearch:ExternalWebAccess permission and used it to make the calls. external_web_access was set to true in the requests.
The script was run in an environment with openai==2.40.0 and aws-bedrock-token-generator==1.1.0 installed via pip, and the credentials were passed through environment variables.
Verification method
Questions and conditions
The effect on search and citations was checked with the question "Tell me about the DevelopersIO article that verified External Web Access for Amazon Bedrock Web Search." I ran three conditions, three times each: no filter, allowed_domains with dev.classmethod.jp, and blocked_domains with dev.classmethod.jp.
The effect on page retrieval (Fetch) was checked with the question "Open https://example.com/ and tell me what is written there, verbatim." Fetch is recorded as open_page in the response's web_search_call. I ran three conditions, two times each: no filter, allowed_domains with dev.classmethod.jp, and blocked_domains with example.com.
Script
I used a script that calls the Responses API once and outputs the HTTP status and response body as-is.
ws_call.py
"""Responses API を 1 回呼び、HTTP ステータスと応答本文(JSON)をそのまま出力する。
認証情報は環境変数(AWS_ACCESS_KEY_ID など)で受け取り、短期 Bearer トークンを生成する。
SDK の例外で握りつぶさず、エラー時も HTTP ステータスと本文の原文を出す。
"""
import argparse
import json
import sys
import httpx
from aws_bedrock_token_generator import provide_token
p = argparse.ArgumentParser()
p.add_argument("--base-url", required=True)
p.add_argument("--model", required=True)
p.add_argument("--question", required=True)
p.add_argument("--tools", default="[]", help="tools 配列の JSON")
p.add_argument("--region", default="us-east-1")
a = p.parse_args()
token = provide_token(region=a.region)
body = {"model": a.model, "input": a.question, "store": False}
tools = json.loads(a.tools)
if tools:
body["tools"] = tools
print("REQUEST_URL=" + a.base_url.rstrip("/") + "/responses")
print("REQUEST_BODY=" + json.dumps(body, ensure_ascii=False))
r = httpx.post(
a.base_url.rstrip("/") + "/responses",
headers={"Authorization": "Bearer " + token, "Content-Type": "application/json"},
json=body,
timeout=300,
)
print("HTTP_STATUS=%d" % r.status_code)
try:
print(json.dumps(r.json(), ensure_ascii=False, indent=2))
except ValueError:
print(r.text)
sys.exit(0 if r.status_code < 400 else 1)
It is run as follows. This is an example with blocked_domains.
python ws_call.py \
--base-url https://bedrock-mantle.us-east-1.api.aws/openai/v1 \
--model openai.gpt-5.6-luna \
--question "DevelopersIO の Amazon Bedrock Web Search の External Web Access を検証した記事を教えて" \
--tools '[{"type":"web_search","external_web_access":true,"filters":{"blocked_domains":["dev.classmethod.jp"]}}]'
Extracting the logs
The output consists of the three lines REQUEST_URL, REQUEST_BODY, and HTTP_STATUS, followed by JSON. I saved that JSON part as response.json and extracted the search queries, open_page URLs, and cited URLs with jq.
jq -r '(.output[] | select(.type=="web_search_call") | .action | "\(.type)\t\(.query // .url)"), ([.output[] | select(.type=="message") | .content[].annotations[].url] | unique[] | "cited\t\(.)")' response.json
Measurement results
Searching specified domains
This is the tally for the three conditions. Cited runs are counted by the domain of the cited URL, and the web_search_call count equals the number of search and open_page lines in the jq output combined.
| Condition | Runs citing dev.classmethod.jp | Domains appearing in citations (across 3 runs) | web_search_call count (runs 1–3) |
|---|---|---|---|
| No filter | 3/3 | dev.classmethod.jp | 2, 1, 2 |
| allowed_domains: dev.classmethod.jp | 3/3 | dev.classmethod.jp | 2, 2, 1 |
| blocked_domains: dev.classmethod.jp | 0/3 | b.hatena.ne.jp, zenn.dev | 11, 9, 10 |
The output below is from the first run of each condition. With no filter, it was as follows.
search site:dev.classmethod.jp Amazon Bedrock Web Search External Web Access 検証
open_page https://dev.classmethod.jp/articles/bedrock-web-search-external-web-access/
cited https://dev.classmethod.jp/articles/bedrock-web-search-external-web-access/
For this question, even without specifying a filter, the model searched with site:dev.classmethod.jp attached and cited one DevelopersIO article.
The first-run output with allowed_domains specified was the same three lines as with no filter. In all three runs, the search had site:dev.classmethod.jp attached and the citation was the same single article as with no filter. For this question, the search was already directed at dev.classmethod.jp even without a filter.
With blocked_domains specified, it was as follows.
search site:dev.classmethod.jp Amazon Bedrock Web Search External Web Access 検証
search DevelopersIO Amazon Bedrock Web Search 外部ウェブアクセス
search site:dev.classmethod.jp/articles/ "Web Search" "Bedrock" "External"
search DevelopersIO Amazon Bedrock Web Search 検証 外部アクセス
search "Amazon Bedrock Web Search の external_web_access が有効化されたので"
search site:dev.classmethod.jp/articles/ "GPT-5.6 Luna"
open_page https://b.hatena.ne.jp/entry/s/dev.classmethod.jp/articles/dedicated-ips-managed-feature/
open_page https://dev.classmethod.jp/search/?q=external_web_access
search "Amazon Bedrock Web Search の external_web_access" -hatena
open_page https://b.hatena.ne.jp/q/amazon%20bedrock%20web%20search%20external_web_access
search dev.classmethod.jp/articles/ "Amazon Bedrock Web Search の external_web_access が有効化されたので"
cited https://b.hatena.ne.jp/entry/s/dev.classmethod.jp/articles/dedicated-ips-managed-feature/
cited https://zenn.dev/aws_japan/articles/bedrock-web-search-external-access
When dev.classmethod.jp was specified in blocked_domains, dev.classmethod.jp was dropped from the citations in all three runs. The model repeated its searches, rephrasing the queries, including searches with site:dev.classmethod.jp attached. web_search_call increased from 1–2 with no filter to 9–11.
In all three runs, open_page calls addressed to dev.classmethod.jp were recorded. In the second run, the answer stated, "I could not retrieve the direct URL of DevelopersIO itself."
b.hatena.ne.jp URLs containing dev.classmethod.jp in their path appeared in citations even under the condition with blocked_domains specified.
Page retrieval
These are the results for the three conditions.
| Condition | Runs | Answer |
|---|---|---|
| No filter | 2 | Both times it returned the page content verbatim (Example Domain / This domain is for use in illustrative examples in documents. …) |
| allowed_domains: dev.classmethod.jp | 2 | Both times it answered that it could not open the page |
| blocked_domains: example.com | 2 | Both times it answered that it could not open the page |
In every condition, the web_search_call status was completed, the action type was open_page, and the url was https://example.com/. This differs from the record seen in Previous Article 2, where an external Fetch without permission was failed (with url being null). Under these three conditions, I could not tell from the API response's status whether retrieval succeeded, so you need to judge from the body of the answer.
Summary
The Web Search domain filters that were already available in OpenAI's Responses API are now also available on Bedrock through the Mantle endpoint.
If you have a mechanism that guides users to information within specific public sites, or a workload with sites you want to exclude, and you had been coping through prompt adjustments because Bedrock had no domain filters, try this update.

