claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[Feature Request] Web Search Capability

Open salviz opened this issue 9 months ago • 7 comments

Summary

Add the ability for Claude Code to perform web searches to find relevant information, similar to Bing Chat or ChatGPT browsing features.

Problem

Currently, Claude Code is limited to information in its training data, local files, and URLs explicitly provided by users. This significantly limits its ability to help with recent documentation, troubleshoot issues, or find solutions to problems without user intervention.

Proposed Solution

  1. Implement a web search capability that allows Claude to search for relevant information
  2. Could be triggered via a command like or requested by Claude when needed
  3. Should display search results with attribution/citations
  4. Could be initially limited to software development resources (docs, GitHub, Stack Overflow)

Benefits

  • Extends Claude's knowledge beyond training cutoff
  • Reduces need for users to perform searches and copy/paste results
  • Makes Claude more effective at solving complex or novel problems
  • Provides up-to-date information for rapidly evolving libraries and tools

Relation to Other Features

This feature would complement the autonomous URL access feature request and the planned web context feature, creating a more complete research capability.

salviz avatar Mar 23 '25 09:03 salviz

this feature would make anthropic more money (and be great for Claude Code users). my current workflow when dealing with tech that changed after LLM training:

  1. go to claude.ai, ask it to check the web, and reply with a way to do what I need done
  2. paste the claude.ai response into Claude Code
  3. when my code fails and issue could be related to breaking changes (changes after LLM training) I return to step 1

the workflow above is ok, but waste time. anthropic makes less money because while Claude Code is billed by usage, claude.ai is a flat usd 20 per month. with Claude Code, I'm spending more money on anthropic. if Claude Code could search the web, that's an even bigger bill to anthropic, but anthropic is so useful, it's worth it!

tmratwork avatar Mar 24 '25 18:03 tmratwork

would really love this

claude code is now so good at what it knows that its binding constraint is what it doesn't know (but is on the internet)

...such that I ask it to write out a question that I paste into claude or o3 and then paste the response back

one step towards search / research would be allowing it to access links not pasted in the chat or in the repo. could that go through the same allowedTools auth rather than be always denied? often it attempts to look up the docs by knowing the URL, and this gets denied

(I guess we could add our own mcp to do the search, but am hesitant to do something custom given it's such a general issue...)

max-sixty avatar Apr 22 '25 20:04 max-sixty

+1 on this feature. My workflow is using Cursor Agent instead when I need info from the web.

BurnyCoder avatar May 26 '25 18:05 BurnyCoder

this now works!

ime, it's not quite at the quality of o3, but it's pretty good for searching for standard questions about how to use a library etc

max-sixty avatar May 26 '25 18:05 max-sixty

@max-sixty : have you found a way for to enable Claude Code to search the web for breaking changes? I see your comment "this now works" but I'm still using claude.ai when I need to search for breaking changes. I asked Claude Code if it could search the web, and it replied it cannot.

tmratwork avatar May 26 '25 19:05 tmratwork

are you on a recent version of claude code?

> can you search the web?

⏺ I'll search for information about my web search capabilities.

⏺ Web Search("can Claude Code search the web capabilities")…
  ⎿  Did 1 search in 29s

⏺ Yes, I can search the web! I have the WebSearch tool available which allows me to find current information online. This is particularly useful for:

  - Looking up recent documentation and API references
  - Finding solutions to technical problems
  - Getting up-to-date information about frameworks and libraries
  - Researching current events or recent developments

  Would you like me to search for something specific?

(somewhat comedic response rather than answering the question directly, but it can!)

max-sixty avatar May 26 '25 19:05 max-sixty

@max-sixty : thanks for replying! I missed that this feature had been added. I tested and got similar result to your post:

⏺ Yes, I can search the web using the WebSearch tool. This allows me to find current information beyond my training data cutoff, which is
  particularly useful for:

  - Recent API documentation and changes
  - Current error solutions and troubleshooting
  - Latest SDK versions and implementations
  - Real-time information about services like Agora, OpenAI, etc.

  Is there something specific you'd like me to search for regarding the V12 Agora implementation or any other aspect of the project?

tmratwork avatar May 26 '25 22:05 tmratwork

Yep, this is shipped! Keep the feature requests coming.

bcherny avatar May 29 '25 03:05 bcherny

Any way to promote Claude to use web search more often? I find it rarely uses it

tommedema avatar Jul 24 '25 09:07 tommedema

Any way to promote Claude to use web search more often? I find it rarely uses it

ask it to!

max-sixty avatar Jul 24 '25 09:07 max-sixty

@max-sixty right! I did try that as part of my prompt:

Please create a targeted but detailed plan to methodically fix the provided diagnostic issues (errors first, then warnings) so that running
    python scripts/check_diagnostics.py --fix
returns exit code 0. Fix errors first, warnings second.

**IMPORTANT:**
1. Take your time. Do not be lazy. Focus on the specific errors and warnings provided but be detailed. E.g. perform necessary reviews and investigations before finalizing your plan and include all necessary steps and sub-steps.
2. Ensure logic is easy to reason about and maintainable. Often less code is better.
3. Solve diagnostic errors and warnings at the root; do not cheat, use workarounds, or disable diagnostics or thread leak detection, etc.
4. Use WebFetch (for exact results) and WebSearch (for summarized results) often, i.e. whenever helpful to verify assumptions, fetch source code, access documentation, and learn about best practices.
5. Never modify scripts/check_diagnostics.py or scripts/fix_until_clean.sh. Modifying them is strictly forbidden.

It doesn't really seem to have much impact. Do you think my prompting is at fault?

tommedema avatar Jul 24 '25 10:07 tommedema

Do you think my prompting is at fault?

not confident but it's fairly non-specific! you might get more if you tell it precisely what to use it for

I gave got good results from things like "do some research on how Claude Code hooks work and implement one that does X"

max-sixty avatar Jul 24 '25 16:07 max-sixty

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Aug 01 '25 14:08 github-actions[bot]