Skip to content

BedrockAgentCoreClient.invoke_web_search

rboto-bedrock-agentcore==0.4.0 · Service index · Types

Model summary (excerpt): Searches the web and returns a ranked list of results. Each result includes a text extract from the page. You can filter the results by domain and by publication date. To use this operation, you must have the bedrock-agentcore:InvokeWebSearch permission on the resource arn:${Partition}:bedrock-agentcore:${Region}:aws:tool/web-search.v1 .

Install and imports

python -m pip install "rboto[bedrock-agentcore]==0.4.0"
from rboto import BedrockAgentCoreClient
from rboto_bedrock_agentcore.types import (
    InvokeWebSearchOutput,
    WebSearchFilters,
)

Signature

async def invoke_web_search(
    *,
    web_search_id: str,
    search_query: str,
    max_results: int | None = None,
    filters: WebSearchFilters | None = None,
) -> InvokeWebSearchOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
web_search_id Yes The identifier of the web search tool to invoke. The Amazon Web Services-managed web search tool is web-search.v1 .
search_query Yes The text to search for.
max_results No The maximum number of results to return. Defaults to 25.
filters No The filters to apply to the search results.

Output

InvokeWebSearchOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
results list[WebSearchResultOutput] Always present WebSearchResultOutput

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

InvokeWebSearchOutput, WebSearchFilters

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_bedrock_agentcore.exceptions:

AccessDeniedError, InternalServerError, ResourceNotFoundError, ServiceUnavailableError, ThrottlingError, ValidationError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model