Person typing on a laptop, illustrating a developer calling the Amazon Bedrock AgentCore Web Search API from code
Photo by Benjamin Dada on Unsplash · source · credits

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

Comparison of the AgentCore Web Search API and the Gateway MCP connector
Based on AWS's announcement and Classmethod's summary of the docs. Illustration, not a screenshot.

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"))

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

AgentCore Web Search API cost: $0.007 per query, $7 per 1,000, $70 per 10,000
Our arithmetic at AWS's $7 per 1,000 queries price. Illustration, not a screenshot.

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

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.

About the author

Suraj Kumar builds and edits AIUseFlow, a directory of AI tools for vibe coders, agent builders and creators. Guides like this one walk through a practical workflow with cited sources — not a news wire rewrite. How we rank tools.

Get the weekly stack

Rank movers and new AI tools for builders, once a week. Free, no spam, unsubscribe anytime.