Open
Description
Hi OpenAI team,
I’d like to request an enhancement for the WebSearchTool
in the openai-agents-python
SDK. Currently, the tool performs unrestricted web searches, but it would be very helpful to have more control over the search scope.
Proposed Feature
Add optional parameters to WebSearchTool
to:
- Restrict search results to specific domains (
include_domains
list). - Exclude specific domains (
exclude_domains
list).
This would enable use cases such as:
- Searching only within trusted sources (e.g.,
nytimes.com
,wikipedia.org
). - Excluding low-quality or irrelevant sites.
- Focusing on a specific website or a group of websites when building specialized agents.
Possible API Design
WebSearchTool(
include_domains=["example.com", "anotherdomain.org"],
exclude_domains=["spam.com"]
)