Repository navigation
Feat/youtube search tool - #8491
Malaika zahid (malaika75) wants to merge 22 commits into
Conversation
Limit max_results to 50 to comply with YouTube API limits.
Ensure max_results is at least 1 while capping at 50.
Removed duplicate import of YouTubeSearchTool.
Removed youtube-search-tool dependency from pyproject.toml.
Strix Security ReviewWarning This pull request has 229 commits after the last Strix review ( To fix before merging (1)
PR summary: Adds a new `YouTubeSearchTool` to `crewai-tools` that searches the YouTube Data API v3 using a `YOUTUBE_API_KEY` environment variable and returns structured video results, together with a new `youtube` install extra, package exports, documentation, and a manual test script. Review summaryReviewed all seven changed files: the new The implementation is otherwise sound: the outbound host is fixed by the discovery document and tool arguments cannot influence it, the search term is passed only as the URL-encoded Ruled out (3)
Fixed the findings? re-run the review, or tag Review 1 on this PR · Reviewed by Strix |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7dc18ef. Configure here.
|
Hi @crewAIInc/maintainers, all automated checks (Cursor, Strix Security) have passed, and this PR is properly linked to the open issue #8391. The code is ready for your final review. Thank you! |
Modify error handling to suppress exception context.

Related issue
Fixes #8391
Summary
This PR introduces the
YouTubeSearchToolto thecrewai-toolslibrary. It allows CrewAI agents to search for YouTube videos using the official YouTube Data API v3.The tool accepts a search query and max results, returning structured data including title, video ID, URL, description, and publish date. It uses
google-api-python-clientand handles authentication securely via theYOUTUBE_API_KEYenvironment variable.Verification
Additional context
None. The tool is fully self-contained and follows the existing tool structure in
crewai-tools.Note
Low Risk
Additive optional tool and dependency extra; no changes to core auth or existing tool behavior beyond new exports.
Overview
Adds
YouTubeSearchTool, a new optional CrewAI tool that searches YouTube by keyword through YouTube Data API v3 (distinct from the existing RAG-based channel/video search tools).Agents pass
search_queryand optionalmax_results(1–50); the tool returns structured hits (title,video_id, URL, description,published_at). Auth is viaYOUTUBE_API_KEY; Google client libraries load lazily and are gated behind a newcrewai-tools[youtube]extra inpyproject.toml.The tool is exported from the package public API, documented in a tool README, and accompanied by a manual local test script (
test_youtube_search_tool.py) that exercises live API calls and missing-key handling.Reviewed by Cursor Bugbot for commit 4d2beec. Bugbot is set up for automated code reviews on this repo. Configure here.