AgentCore Web Search request and response
This page describes the fields of an InvokeWebSearch request, the rules that the API applies to them, and the response.
Request fields
You call the API on the Amazon Bedrock AgentCore data plane endpoint, for example bedrock-agentcore.us-east-1.amazonaws.com. The Amazon SDKs and the Amazon Command Line Interface (Amazon CLI) sign each request for you with Amazon Signature Version 4 (SigV4) for the service name bedrock-agentcore.
| Field | Type | Required | Description |
|---|---|---|---|
|
|
string |
Yes |
The identifier of the web search tool to invoke. The Amazon managed web search tool is |
|
|
string |
Yes |
The text to search for. The text must be 1–200 characters long. |
|
|
integer |
No |
The maximum number of results to return, from 1 to 25. If you don’t specify a value, the API returns up to 25 results. |
|
|
object |
No |
The filters that narrow the results. The object can contain |
|
|
array of strings |
No |
The domains to return results from. The API doesn’t return results from other domains. The list holds 1–100 domain names. |
|
|
array of strings |
No |
The domains that the API never returns results from. The list holds 1–100 domain names. |
|
|
timestamp |
No |
The start of the publication time range, inclusive. The API returns only results published at or after this time. For example, |
|
|
timestamp |
No |
The end of the publication time range, inclusive. The API returns only results published at or before this time. For example, |
The API applies the following rules to the request:
-
Domain names – Specify a domain name only, such as
example.net, without a scheme or a path. A root domain also matches its subdomains. For example,example.netalso matchesdocs.example.net. You can specifyinclude,exclude, or both. Each domain name can be up to 253 characters long. -
Publication times – Each value is a timestamp. The Amazon SDKs and the Amazon CLI send it as a date-time in Coordinated Universal Time (UTC), for example
2026-01-01T00:00:00Z. If you pass a date without a time, such as2026-01-01to the Amazon CLI, it means midnight UTC at the start of that day. To include a whole day inpublishedBefore, use the last second of that day, for example2026-01-31T23:59:59Z. You can specifypublishedAfter,publishedBefore, or both. IfpublishedAfteris later thanpublishedBefore, the request fails with aValidationException. -
Other fields – The request body can contain only
searchQuery,maxResults, andfilters. The API rejects a request that contains any other top-level field with aValidationException. -
Body size – The request body can be up to 32 KiB.
Response
The response contains a results array with the search results, in ranked order. The API doesn’t paginate. It returns up to maxResults results in a single response, and it can return fewer.
Each result contains the following fields:
| Field | Type | Always present | Description |
|---|---|---|---|
|
|
string |
Yes |
A text extract from the page. |
|
|
string |
No |
The title of the page. |
|
|
string |
No |
The URL of the page. |
|
|
timestamp |
No |
The time the page was published. The API omits this field when the publication time isn’t known. |
The following example shows a response body with one result:
{ "results": [ { "title": "Release highlights", "url": "https://docs.example.net/releases/highlights", "text": "The January release adds support for scheduled reports and improves search performance...", "publishedAt": "2026-01-15T17:00:00Z" } ] }
For the errors that the API returns, see Troubleshoot AgentCore Web Search.