A Fawx WASM skill that fetches and extracts readable content from URLs, converting HTML to clean text or markdown.
- Fetches web pages via HTTP GET
- Lightweight HTML-to-markdown/text conversion (no heavy parsing dependencies)
- Strips
<script>,<style>,<nav>,<footer>,<header>blocks - Converts headings, links, lists, bold/italic to markdown
- HTML entity decoding (named + numeric)
- Configurable output length and extract mode
- Minimal WASM binary size
{
"url": "https://example.com",
"max_chars": 5000,
"extract_mode": "markdown"
}| Field | Type | Default | Description |
|---|---|---|---|
url |
string | required | URL to fetch (http:// or https://) |
max_chars |
number | 5000 | Maximum characters in output |
extract_mode |
string | "markdown" | "markdown" or "text" |
Success:
{
"content": "# Page Title\n\nExtracted content...",
"url": "https://example.com",
"chars": 1234
}Error:
{
"error": "HTTP request failed: connection refused"
}# Native tests
cargo test
# WASM target
cargo build --target wasm32-unknown-unknown --releasename = "web_fetch"
version = "1.0.0"
api_version = "host_api_v1"
capabilities = ["network"]
entry_point = "run"MIT