Skip to content

Enable optional content extraction, scrapping in WebSearchTool #1848

@priyanshuTelus

Description

@priyanshuTelus

Hi Team,

Thanks for the great work on the Agents SDK — it's been fantastic to work with.

Currently, WebSearchTool returns only metadata: title, snippet, and URL. It does not extract or fetch content from the linked pages. This limits its usefulness for real-time, information-rich tasks like:

  • Wildfire or weather updates
  • Traffic incidents or road closures
  • Government alerts or advisories

In these cases, the links are helpful, but agents still need a secondary scraper to retrieve usable data.

  • Proposed Solution
    Add an optional parameter to fetch and extract main page content:
    WebSearchTool(fetch_page_content=True, content_limit=5000)

Support for basic article extraction (e.g. Readability) and optional JS rendering (e.g. via Playwright) would significantly enhance the tool’s utility.

  • Enables content-aware agents out-of-the-box.
  • Reduces need for external scraping tools.
  • Unlocks more real-time use cases.

Thanks for considering this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions