invoke_web_search¶
Operation¶
invoke_web_search
¶
invoke_web_search(request: InvokeWebSearchInput | InvokeWebSearchInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[InvokeWebSearchInputDict]) -> InvokeWebSearchOutput
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.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
InvokeWebSearchInput | InvokeWebSearchInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[InvokeWebSearchInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
InvokeWebSearchOutput
|
An instance of |
invoke_web_search
async
¶
invoke_web_search(request: InvokeWebSearchInput | InvokeWebSearchInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[InvokeWebSearchInputDict]) -> InvokeWebSearchOutput
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.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
InvokeWebSearchInput | InvokeWebSearchInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[InvokeWebSearchInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
InvokeWebSearchOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
InvokeWebSearchInputDict
¶
Bases: TypedDict
Dictionary form of InvokeWebSearchInput.
Attributes¶
filters
instance-attribute
¶
filters: WebSearchFilters | WebSearchFiltersDict | None
The filters to apply to the search results.
InvokeWebSearchInput
dataclass
¶
Bases: _SerdeShape
Request for the InvokeWebSearch operation.
Attributes¶
filters
class-attribute
instance-attribute
¶
filters: WebSearchFilters | None = ...
The filters to apply to the search results.
max_results
class-attribute
instance-attribute
¶
max_results: int | None = ...
The maximum number of results to return. Defaults to 25.
Output¶
InvokeWebSearchOutput
dataclass
¶
Bases: _SerdeShape
Response for the InvokeWebSearch operation.