
Amazon Bedrock AgentCore Web Search API: Call InvokeWebSearch From Code, Filters, Cost and Regions
Also available in Hindi: यह लेख हिंदी में पढ़ें
On 10 November 2026 AWS made the Web Search API on Amazon Bedrock AgentCore generally available. Web Search was already offered as an MCP tool through AgentCore Gateway; the new InvokeWebSearch API returns search results to your code with one call and no resources to create. That makes it useful for apps, custom agent loops and batch data jobs that just need fresh web results. Here is how to call it, what the filters do and what it costs.
API or Gateway: which to use
The docs, as summarised by Classmethod, give a simple rule: use the API when you want results in code, and the Gateway connector when an agent calls search as an MCP tool. The API is called with the AWS SDKs or CLI and authorised with IAM, while Gateway also supports JWT. With no count set, the API returns up to 25 results versus 10 through Gateway.
A minimal call
Classmethod's test used the boto3 bedrock-agentcore client (boto3 1.43.127 or newer) and needed the bedrock-agentcore:InvokeWebSearch IAM permission:
import boto3
client = boto3.client("bedrock-agentcore", region_name="ap-northeast-1")
r = client.invoke_web_search(webSearchId="web-search.v1",
searchQuery="AgentCore Web Search", maxResults=5)
for x in r["results"]:
print(x.get("title"), x.get("url"), x.get("publishedAt"))
searchQuerycan be up to 200 characters;maxResultsis 1 to 25.filters.domainFiltertakes up to 100 domains each to include and exclude.filters.publishedDateFilterlimits results by publication time.
Each result always has a text extract; AWS says title, URL and publication time appear when available, so read them with .get(). Classmethod got three results in 0.49 seconds in Tokyo, and a default search returned 20 results totalling about 12,000 characters, which is a lot to pass to an LLM. Set maxResults low. In their filtered test, many hits were tag and author pages, so check quality on your own queries.
Cost and regions
AWS bills $7 per 1,000 queries, the same as through Gateway, with no gateway charges. By our arithmetic that is $0.007 a query, or $70 for 10,000 queries. You can call it from a VPC through AWS PrivateLink and log requests as CloudTrail data events. Regions at launch are US East (N. Virginia and Ohio), US West (Oregon), Asia Pacific (Sydney and Tokyo) and Europe (Ireland). Mumbai is not on the list, so Indian teams should plan for the extra latency of Tokyo or Sydney.
For background, read how to build an AI agent, our MCP explainer and the report on AWS Infinity AI agent runtime.
Sources
- Amazon Bedrock AgentCore now offers a Web Search API, AWS What's New (10 Nov 2026)
- Amazon Bedrock AgentCore Web Search API has been released, DevelopersIO by Classmethod (10 Nov 2026)
FAQ
Do I need AgentCore Gateway for web search now?
No. InvokeWebSearch is a direct API with no resources to create. Gateway is still the option when an agent calls search as an MCP tool.
How much does the AgentCore Web Search API cost?
AWS lists $7 per 1,000 queries, with no gateway charges.
Is it available in Mumbai?
No. Launch regions are N. Virginia, Ohio, Oregon, Sydney, Tokyo and Ireland.
How many results can one call return?
Between 1 and 25, set with maxResults.