Skip to content

fawxai/web-fetch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fawx-skill-web-fetch

A Fawx WASM skill that fetches and extracts readable content from URLs, converting HTML to clean text or markdown.

Features

  • 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

Input

{
  "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"

Output

Success:

{
  "content": "# Page Title\n\nExtracted content...",
  "url": "https://example.com",
  "chars": 1234
}

Error:

{
  "error": "HTTP request failed: connection refused"
}

Building

# Native tests
cargo test

# WASM target
cargo build --target wasm32-unknown-unknown --release

Manifest

name = "web_fetch"
version = "1.0.0"
api_version = "host_api_v1"
capabilities = ["network"]
entry_point = "run"

License

MIT

About

Fawx WASM skill: Fetch and extract readable content from URLs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages