pub struct Client(/* private fields */);Expand description
Synchronous webscrape.ai API client. Cheap to Clone.
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(api_key: impl Into<String>) -> Result<Self>
pub fn new(api_key: impl Into<String>) -> Result<Self>
Construct a client with an explicit API key and default config.
Sourcepub fn from_env() -> Result<Self>
pub fn from_env() -> Result<Self>
Construct a client reading WEBSCRAPE_API_KEY from the environment.
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Start a ClientBuilder.
Sourcepub fn scrape(&self, request: ScrapeRequest) -> Result<Response<ScrapeData>>
pub fn scrape(&self, request: ScrapeRequest) -> Result<Response<ScrapeData>>
Fetch a URL as HTML, cleaned markdown, or links.
Sourcepub fn smartscraper(
&self,
request: SmartScraperRequest,
) -> Result<Response<SmartScraperData>>
pub fn smartscraper( &self, request: SmartScraperRequest, ) -> Result<Response<SmartScraperData>>
LLM structured extraction returning JSON.
Sourcepub fn smartbrowse(&self) -> SmartBrowse<'_>
pub fn smartbrowse(&self) -> SmartBrowse<'_>
Access the SmartBrowse namespace.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Freeze for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
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