pub struct SearchRequest {
pub query: String,
pub num_results: Option<u32>,
pub search_type: Option<SearchType>,
pub contents: Option<ContentsOptions>,
pub include_domains: Option<Vec<String>>,
pub exclude_domains: Option<Vec<String>>,
pub start_published_date: Option<String>,
pub end_published_date: Option<String>,
pub livecrawl: Option<LivecrawlOption>,
pub category: Option<String>,
}Expand description
Request body for POST /search
Fields§
§query: StringThe search query (natural language)
num_results: Option<u32>Number of results to return (default: 10)
search_type: Option<SearchType>Type of search
contents: Option<ContentsOptions>What content to include in results
include_domains: Option<Vec<String>>Include domains filter
exclude_domains: Option<Vec<String>>Exclude domains filter
start_published_date: Option<String>Start date filter (ISO 8601)
end_published_date: Option<String>End date filter (ISO 8601)
livecrawl: Option<LivecrawlOption>Livecrawl option
category: Option<String>Category filter
Implementations§
Source§impl SearchRequest
impl SearchRequest
Sourcepub const fn with_num_results(self, n: u32) -> Self
pub const fn with_num_results(self, n: u32) -> Self
Set the number of results
Sourcepub const fn with_search_type(self, st: SearchType) -> Self
pub const fn with_search_type(self, st: SearchType) -> Self
Set the search type
Sourcepub fn with_contents(self, contents: ContentsOptions) -> Self
pub fn with_contents(self, contents: ContentsOptions) -> Self
Set the contents options
Trait Implementations§
Source§impl Clone for SearchRequest
impl Clone for SearchRequest
Source§fn clone(&self) -> SearchRequest
fn clone(&self) -> SearchRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SearchRequest
impl Debug for SearchRequest
Source§impl<'de> Deserialize<'de> for SearchRequest
impl<'de> Deserialize<'de> for SearchRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SearchRequest
impl RefUnwindSafe for SearchRequest
impl Send for SearchRequest
impl Sync for SearchRequest
impl Unpin for SearchRequest
impl UnsafeUnpin for SearchRequest
impl UnwindSafe for SearchRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more