pub struct SearchRequest { /* private fields */ }
Expand description
Request object for the search API more info
Implementations§
Source§impl SearchRequest
impl SearchRequest
Sourcepub fn search_depth<S>(self, search_depth: S) -> Self
pub fn search_depth<S>(self, search_depth: S) -> Self
The depth of the search (“basic” or “advanced”). Default is basic for quick results and advanced for indepth high quality results but longer response time.
Sourcepub fn include_answer(self, include_answer: bool) -> Self
pub fn include_answer(self, include_answer: bool) -> Self
Include answers in the search results. Default is False.
Sourcepub fn include_images(self, include_images: bool) -> Self
pub fn include_images(self, include_images: bool) -> Self
Include a list of query related images in the response. Default is False.
Sourcepub fn include_raw_content(self, include_raw_content: bool) -> Self
pub fn include_raw_content(self, include_raw_content: bool) -> Self
Include raw content in the search results. Default is False.
Sourcepub fn max_results(self, max_results: i32) -> Self
pub fn max_results(self, max_results: i32) -> Self
The number of maximum search results to return. Default is 5.
Sourcepub fn include_domains<I, S>(self, include_domains: I) -> Self
pub fn include_domains<I, S>(self, include_domains: I) -> Self
A list of domains to specifically include in the search results. Default is None, which includes all domains.
Sourcepub fn exclude_domains<I, S>(self, exclude_domains: I) -> Self
pub fn exclude_domains<I, S>(self, exclude_domains: I) -> Self
A list of domains to specifically exclude from the search results. Default is None, which doesn’t exclude any domains.
Sourcepub fn topic<S>(self, topic: S) -> Self
pub fn topic<S>(self, topic: S) -> Self
Set the category of the search (“general” or “news”). Default is “general”.
Sourcepub fn days(self, days: i32) -> Self
pub fn days(self, days: i32) -> Self
Set the number of days back from the current date to include in search results. Only available when using the “news” search topic. Default is 3.
Sourcepub fn include_image_descriptions(self, include_descriptions: bool) -> Self
pub fn include_image_descriptions(self, include_descriptions: bool) -> Self
When include_images is set to True, this option adds descriptive text for each image. Default is False.