Installation
The official Rust SDK is maintained in the EvoCrawl monorepo at apps/rust-sdk. To install the EvoCrawl Rust SDK, add the dependency from crates.io:Requires Rust 1.70 or later.
Usage
- Get an API key from evocrawl.com
- Set the API key as an environment variable named
EVOCRAWL_API_KEY, or pass it directly toClient::new(...)
Scraping a URL
To scrape a single URL, use thescrape method.
JSON Extraction
Extract structured JSON usingscrape_with_schema:
ScrapeOptions directly:
Crawling a Website
To crawl a website and wait for completion, usecrawl.
Start a Crawl
Start a job without waiting usingstart_crawl.
Checking Crawl Status
Check crawl progress withget_crawl_status.
Cancelling a Crawl
Cancel a running crawl withcancel_crawl.
Checking Crawl Errors
Retrieve errors from a crawl job withget_crawl_errors.
Mapping a Website
Discover links on a site usingmap.
map_urls:
Searching the Web
Search with optional settings usingsearch.
Batch Scraping
Scrape multiple URLs in parallel usingbatch_scrape.
Agent
Run an AI-powered agent withagent.
Scrape-Bound Interactive Session
Use a scrape job ID to run follow-up browser code in the same context:interact(...)runs code or prompts in the scrape-bound browser session.stop_interaction(...)stops the interactive session when you are done.
Configuration
Client::new(...) and Client::new_selfhosted(...) create the client.
Environment Variable
Set theEVOCRAWL_API_KEY environment variable instead of passing the key directly:
Poll Intervals
Synchronous methods (crawl, batch_scrape, agent) poll until completion. You can customize the poll interval via the options struct:
Error Handling
The SDK uses theEvocrawlError enum, which implements Error, Debug, and Display. All methods return Result<T, EvocrawlError>.
Are you an AI agent that needs a EvoCrawl API key? See evocrawl.com/agent-onboarding/SKILL.md for automated onboarding instructions.

