pydantic_ai.common_tools
duckduckgo_search_tool
duckduckgo_search_tool(
    duckduckgo_client: DDGS | None = None,
    max_results: int | None = None,
)
Creates a DuckDuckGo search tool.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                duckduckgo_client
             | 
            
                  DDGS | None
             | 
            
               The DuckDuckGo search client.  | 
            
                  None
             | 
          
                max_results
             | 
            
                  int | None
             | 
            
               The maximum number of results. If None, returns results only from the first response.  | 
            
                  None
             | 
          
Source code in pydantic_ai_slim/pydantic_ai/common_tools/duckduckgo.py
              63 64 65 66 67 68 69 70 71 72 73 74  |  | 
tavily_search_tool
tavily_search_tool(api_key: str)
Creates a Tavily search tool.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                api_key
             | 
            
                  str
             | 
            
               The Tavily API key. You can get one by signing up at https://app.tavily.com/home.  | 
            required | 
Source code in pydantic_ai_slim/pydantic_ai/common_tools/tavily.py
              69 70 71 72 73 74 75 76 77 78 79 80 81  |  |