← LearnClaude API · Tools

How to Do Competitor Research with Claude Web Search

To do competitor research with Claude web search, add the web_search_20260209 tool to your API request and prompt Claude with specific competitor questions. Claude autonomously searches the live web, synthesizes results, and returns cited answers — no custom scraping code required.

To do competitor research with Claude web search, include the web_search_20260209 tool in your Anthropic API request and ask Claude about a competitor's funding, product launches, pricing, or executive changes. Claude autonomously decides when to search, executes queries on Anthropic's servers, and returns a synthesized answer with cited source URLs — all in a single API turn, with no client-side scraping infrastructure needed.

What Is the Claude Web Search Tool and Why Does It Matter for Competitive Intelligence?

The Claude web search tool is a server-side API feature that gives Claude autonomous access to live web content during inference. Unlike building your own search pipeline with a third-party API, this tool runs entirely on Anthropic's infrastructure. You declare it in the tools array of your API request, and Claude handles the rest: deciding when to search, issuing multiple queries if needed, filtering results, and returning a coherent answer with citations.

For competitive intelligence, this matters because competitor data goes stale fast. Funding rounds close, pricing pages update, executives change roles, and product features ship — often faster than any static training dataset can track. The web search tool solves this by retrieving live data at query time, grounding every answer in current sources rather than Claude's training knowledge cutoff.

The latest tool version, web_search_20260209, adds dynamic filtering: Claude writes and executes server-side code to pre-filter retrieved HTML before it enters the context window. This reduces token consumption and improves accuracy compared to the earlier web_search_20250305 version, which passed full HTML into context without pre-filtering.

How Do You Set Up the Web Search Tool for Competitor Research?

Before writing any code, confirm two things: your organization administrator has enabled web search at the organization level in the Anthropic Console, and you have a valid API key. Then follow these steps to build a working competitive research request.

  1. Enable web search in the Console. Log in to the Anthropic Console and ensure your organization admin has turned on the web search tool at the org level. Request-level settings can only narrow what the org policy permits — they cannot expand beyond it.
  2. Add the tool to your request. In your messages.create call, include a tools array with a single entry: {"type": "web_search_20260209", "name": "web_search"}. Use a supported model such as claude-sonnet-4-5-20250929.
  3. Write a specific competitor prompt. Vague prompts produce vague results. Ask for concrete, verifiable facts: recent funding rounds, new product features announced in the last 90 days, current pricing tiers, or recent executive hires.
  4. Optionally cap searches with max_uses. Set an integer limit to control how many searches Claude issues per request. This keeps per-request costs predictable, especially in batch pipelines researching many companies.
  5. Optionally restrict domains. Use allowed_domains to whitelist authoritative sources like techcrunch.com, crunchbase.com, or a competitor's own press release subdomain. Or use blocked_domains to exclude low-quality sources. Note: you cannot use both in the same request.
  6. Extract and render citations. Anthropic's usage policy requires that citation fields — url, title, and cited_text — be displayed to end users when surfacing web search results. Always render these in your UI or report output.

What Does a Competitor Research API Request Actually Look Like?

Here is a minimal working example targeting a competitor's recent product activity. It uses max_uses: 4 to allow enough searches for a multi-faceted question while keeping costs bounded:

import anthropic

client = anthropic.Anthropic()

response = client.messages.create(
    model="claude-sonnet-4-5-20250929",
    max_tokens=1024,
    tools=[{
        "type": "web_search_20260209",
        "name": "web_search",
        "max_uses": 4
    }],
    messages=[{
        "role": "user",
        "content": (
            "Research Notion's competitive position as of today. "
            "Cover: (1) any product launches or major feature updates in the last 90 days, "
            "(2) their current pricing tiers, "
            "(3) any recent funding or valuation news. "
            "Cite your sources."
        )
    }]
)

for block in response.content:
    print(block)

Claude will autonomously issue up to four searches, synthesize the results, and return a structured answer with citation objects containing the source URL, page title, and the specific text it drew from. You can parse those citation objects to build a sourced competitive brief automatically.

How Do You Scale This to Research Dozens of Competitors at Once?

The web search tool is designed to work inside agentic loops and batch pipelines. According to the Anthropic web search documentation, a business intelligence agent can enrich a list of companies with current funding rounds, product launches, and executive changes by combining the tool with batch processing — researching dozens of entities in a single pipeline, with each answer grounded in live sources.

A practical pattern looks like this:

  • Maintain a list of competitor names or domains in a data structure.
  • Loop over the list, sending one API request per competitor with a templated prompt.
  • Set max_uses to a consistent value (e.g., 3–5) so each request has a predictable cost ceiling.
  • Collect the text blocks and citation objects from each response into a structured output (JSON, CSV, or a database row).
  • Aggregate into a competitive landscape report, with all claims linked back to their live sources.

Because the tool runs server-side, your application never needs to handle intermediate tool-use round trips for the search itself. Claude issues multiple searches within a single turn and returns one final response — simplifying the client code considerably compared to building a custom function-calling pipeline.

When Should You Use Web Search vs. a Custom Search Pipeline?

Scenario Use Claude Web Search Tool Use Custom Search Function (e.g., SerpAPI, Bing)
You need live public web data with zero client-side infrastructure ✓ Best fit — no search API keys or scraping code needed Overkill unless you need custom ranking logic
You need full control over result ranking or post-processing Limited — Claude decides what to search and how to rank ✓ Best fit — you own the full pipeline
You're researching public competitor pages, press releases, news ✓ Best fit — discovery-oriented, freshness is the priority Works but adds complexity
You need to ingest a specific known URL in full Use web_fetch instead (complementary tool) Custom fetch or scrape
You're deploying on Amazon Bedrock or a non-Anthropic platform Not available — server tool is Anthropic API only ✓ Required — build your own function call
You have a private internal corpus (contracts, internal wikis) Not applicable — tool searches the public web only Use RAG with a vector database instead

What Are the Most Common Pitfalls When Using Web Search for Competitor Research?

Token bloat from unfiltered HTML

Always use tool version web_search_20260209 on a supported model. The older web_search_20250305 version passes full HTML into the context window without pre-filtering, which increases token costs and can degrade response quality on noisy pages. The newer version has Claude write and execute server-side code to extract only relevant content first.

Mixing allowed_domains and blocked_domains

You cannot use both allowed_domains and blocked_domains in the same tool definition. Pick one strategy: whitelist the sources you trust (e.g., ["techcrunch.com", "crunchbase.com"]) or blacklist the sources you want to exclude. Using both will produce a validation error.

Forgetting to render citations

Anthropic's usage policy requires that url, title, and cited_text fields from citation objects be displayed to end users when surfacing web search results. In a competitive research context, this is also just good practice — every claim in your competitive brief should be traceable to a live source your team can verify.

Using an unsupported model with the dynamic filtering version

The web_search_20260209 type works with Claude Opus 4.7, Claude Opus 4.6, Claude Sonnet 4.6, and Claude Mythos Preview. Using it with an unsupported model will cause an error. For other models, fall back to web_search_20250305.

Is the Claude Web Search Tool Worth It for Competitive Intelligence Workflows?

For teams that need current, cited competitive data without building and maintaining a custom scraping or search infrastructure, the answer is yes. The tool eliminates the need for separate search API keys, client-side round-trip handling, and HTML parsing logic. Claude issues multiple searches autonomously within a single API turn, synthesizes the results, and returns structured citations — making it straightforward to build a competitive research pipeline that produces sourced, up-to-date briefs at scale.

The main trade-off is control: you delegate search strategy to Claude rather than owning the ranking and retrieval logic yourself. For most competitive research use cases — tracking funding news, product launches, pricing changes, and executive moves — that trade-off is worth it. For workflows requiring deterministic retrieval over a fixed private corpus, a RAG pipeline remains the better fit. See the Anthropic tool use overview for a full picture of how web search fits alongside other tools in an agentic architecture.

Frequently asked questions

Does the Claude web search tool require a separate search API key?

No. The web search tool runs entirely on Anthropic's infrastructure as a server-side tool. You only need a valid Anthropic API key and org-level enablement in the Console — no third-party search API keys or scraping code required.

Can I restrict Claude to only search specific competitor or news sites?

Yes. Add an allowed_domains array to the tool definition with the domains you want Claude to search (e.g., techcrunch.com, crunchbase.com). Note that you cannot combine allowed_domains and blocked_domains in the same request.

How do I control costs when researching many competitors in a loop?

Set the max_uses parameter to an integer limit (e.g., 3–5) in the tool definition. This caps the number of searches Claude can issue per request, giving you a predictable cost ceiling for each competitor in your batch pipeline.

What's the difference between web_search_20260209 and web_search_20250305?

The newer web_search_20260209 version adds dynamic filtering: Claude writes and executes server-side code to pre-filter retrieved HTML before it enters the context window, reducing token consumption and improving accuracy. The older version passes full HTML into context without pre-filtering.

Do I have to show citations to users in my competitive research tool?

Yes. Anthropic's usage policy requires that the url, title, and cited_text fields from citation objects be displayed to end users when surfacing web search results. Always render these fields in your output or report.

Can I use the web search tool on Amazon Bedrock or other platforms?

No. The web search tool is a server-side tool available only through the Anthropic API. If you need live web search on another platform, you would need to build a custom function-calling tool with a third-party search API.

Go deeper

Web search tool (API) is one of 85 features in Claude Master — the independent, always-current manual with worked examples, the pitfalls, and the workflows that make Claude pay.

Get Claude Master — founding price

Independent product. Not affiliated with or endorsed by Anthropic. "Claude" is a trademark of Anthropic, used here only to describe the subject of this guide.

CLAUDEMASTER
An independent publication.
Independent product. Not affiliated with or endorsed by Anthropic. “Claude” is a trademark of Anthropic, used here only to describe the subject of this manual.
© 2026 Claude Master — All rights reserved.