Class WebSearchTool
- 
                    
                    - All Implemented Interfaces:
 
 public final class WebSearchToolSearch the Internet for sources related to the prompt. Learn more about the web search tool. 
- 
                
                    
                    - 
                                
                            
                                Nested Class SummaryNested Classes Modifier and Type Class Description public final classWebSearchTool.BuilderA builder for WebSearchTool. public final classWebSearchTool.TypeThe type of the web search tool. One of web_searchorweb_search_2025_08_26.public final classWebSearchTool.FiltersFilters for the search. public final classWebSearchTool.SearchContextSizeHigh level guidance for the amount of context window space to use for the search. One of low,medium, orhigh.mediumis the default.public final classWebSearchTool.UserLocationThe approximate location of the user. 
 - 
                                
                            
                                Method SummaryModifier and Type Method Description final WebSearchTool.Typetype()The type of the web search tool. final Optional<WebSearchTool.Filters>filters()Filters for the search. final Optional<WebSearchTool.SearchContextSize>searchContextSize()High level guidance for the amount of context window space to use for the search. final Optional<WebSearchTool.UserLocation>userLocation()The approximate location of the user. final JsonField<WebSearchTool.Type>_type()Returns the raw JSON value of type. final JsonField<WebSearchTool.Filters>_filters()Returns the raw JSON value of filters. final JsonField<WebSearchTool.SearchContextSize>_searchContextSize()Returns the raw JSON value of searchContextSize. final JsonField<WebSearchTool.UserLocation>_userLocation()Returns the raw JSON value of userLocation. final Map<String, JsonValue>_additionalProperties()final WebSearchTool.BuildertoBuilder()final WebSearchToolvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static WebSearchTool.Builderbuilder()Returns a mutable builder for constructing an instance of WebSearchTool. - 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        typefinal WebSearchTool.Type type() The type of the web search tool. One of web_searchorweb_search_2025_08_26.
 - 
                                        filtersfinal Optional<WebSearchTool.Filters> filters() Filters for the search. 
 - 
                                        searchContextSizefinal Optional<WebSearchTool.SearchContextSize> searchContextSize() High level guidance for the amount of context window space to use for the search. One of low,medium, orhigh.mediumis the default.
 - 
                                        userLocationfinal Optional<WebSearchTool.UserLocation> userLocation() The approximate location of the user. 
 - 
                                        _typefinal JsonField<WebSearchTool.Type> _type() Returns the raw JSON value of type. Unlike type, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _filtersfinal JsonField<WebSearchTool.Filters> _filters() Returns the raw JSON value of filters. Unlike filters, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _searchContextSizefinal JsonField<WebSearchTool.SearchContextSize> _searchContextSize() Returns the raw JSON value of searchContextSize. Unlike searchContextSize, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _userLocationfinal JsonField<WebSearchTool.UserLocation> _userLocation() Returns the raw JSON value of userLocation. Unlike userLocation, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _additionalPropertiesfinal Map<String, JsonValue> _additionalProperties() 
 - 
                                        toBuilderfinal WebSearchTool.Builder toBuilder() 
 - 
                                        validatefinal WebSearchTool validate() 
 - 
                                        builderfinal static WebSearchTool.Builder builder() Returns a mutable builder for constructing an instance of WebSearchTool. The following fields are required: .type()
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-