A minimal template showing how to use Plasmate from Rust. Fetch web pages and get back a structured Semantic Object Model (SOM) instead of raw HTML.
Install Plasmate:
cargo install plasmate# Clone this template
gh repo create my-scraper --template plasmate-labs/quickstart-rust --clone
cd my-scraper
# Run it
cargo run -- https://news.ycombinator.comThe example calls Plasmate as a CLI subprocess and parses the JSON SOM output:
use std::process::Command;
let output = Command::new("plasmate")
.args(["fetch", "https://example.com"])
.output()
.expect("Failed to run plasmate");
let som: serde_json::Value =
serde_json::from_slice(&output.stdout)
.expect("Failed to parse SOM");
println!("Title: {}", som["title"]);
println!("Regions: {}", som["regions"].as_array().map_or(0, |r| r.len()));The SOM gives you structured access to page content — headings, links, images, and text organized by semantic regions (navigation, main content, sidebars, etc.).
├── Cargo.toml # Dependencies
├── src/
│ └── main.rs # Fetch and display SOM content
└── .github/
└── workflows/
└── test.yml # CI workflow
MIT
| Engine | plasmate - The browser engine for agents |
| MCP | plasmate-mcp - Claude Code, Cursor, Windsurf |
| Extension | plasmate-extension - Chrome cookie export |
| SDKs | Python / Node.js / Go / Rust |
| Frameworks | LangChain / CrewAI / AutoGen / Smolagents |
| Tools | Scrapy / Audit / A11y / GitHub Action |
| Resources | Awesome Plasmate / Notebooks / Benchmarks |
| Docs | docs.plasmate.app |
| W3C | Web Content Browser for AI Agents |