Structured data extraction from any URL — tables, forms, lists as JSON. No API key needed.
Project description
SchemaSnap
HTML → typed tables, forms, lists as JSON. 30ms, no key, no browser.
Born from shadow-web's SchemaSnap module. A parse primitive — not a scraper, not a crawler. Feed it HTML, get structured data.
curl -X POST https://schemasnap-464919960073.us-central1.run.app/v1/compress \
-H "Content-Type: application/json" \
-d '{"html":"<table><thead><tr><th>Product</th><th>Price</th><th>Stock</th></tr></thead><tbody><tr><td>Widget</td><td>$19.99</td><td>150</td></tr></tbody></table>"}'
{"tables":[{"columns":["Product","Price","Stock"],
"types":["string","currency","integer"],
"rows":[["Widget","$19.99","150"]]}]}
Live API
| Endpoint | Rate limit | Auth |
|---|---|---|
POST /v1/compress — HTML → structured JSON |
500 req/day per IP | None |
GET /v1/health |
Unlimited | None |
Base URL: https://schemasnap-464919960073.us-central1.run.app
Quick install
pip install schemasnap
# For MCP (Cursor, Claude Desktop)
pip install "schemasnap[mcp]"
# For URL extraction (requires Playwright)
pip install "schemasnap[browser]"
playwright install chromium
Usage
Python SDK
from schemasnap import extract_from_html, parse_page
# From HTML string (no browser, 30ms)
result = extract_from_html(open("page.html").read())
print(result.tables) # [{columns, types, rows, total_rows}]
print(result.forms) # [{action, method, fields}]
print(result.lists) # [{type, items, total}]
print(result.token_budget) # {raw_bytes, compressed_bytes, compression_ratio}
MCP (Cursor, Claude Desktop)
pip install "schemasnap[mcp]"
Add to Cursor Settings → MCP:
{
"mcpServers": {
"schemasnap": {
"command": "schemasnap-mcp"
}
}
}
Tool: compress_html(html, max_rows_per_table=50, url="") → typed tables, forms, lists, actions.
curl (no Python needed)
curl -X POST https://schemasnap-464919960073.us-central1.run.app/v1/compress \
-H "Content-Type: application/json" \
-d '{"html": "<table>...your html...</table>"}'
Benchmarks
| Page | Raw | Compressed | Savings | Latency |
|---|---|---|---|---|
| Wikipedia GDP | 641 KB | 215 KB | 66% | 256ms |
| W3Schools Tables | 212 KB | 87 KB | 59% | 34ms |
| Hacker News | 35 KB | 24 KB | 32% | 23ms |
Measured on Cloud Run (us-central1), July 2026. Cold start ~250ms.
Features
- Tables → columns, types (
string|integer|number|currency|percentage|date|email|url), rows — from<table>, ARIArole=table|grid, Tailwind grids, or.rowpseudo-tables - Forms → action, method, fields with
name,type,label,required,placeholder,pattern,minlength, selectoptions - Lists → type (
unordered|ordered|select), items, total - Semantic groups → "Login Form", "Navigation", "Checkout", "Search" auto-detected
- Deterministic — same input → same output. No LLM guess, $0 per call
Competitive positioning
SchemaSnap is a parse primitive, not a scraper:
Firecrawl / Jina = URL → content (crawl + render)
Crawl4AI = URL → markdown (self-host crawl)
pandas read_html() = HTML → strings (dev tool)
SchemaSnap = HTML → typed structure (agent utility)
Composable: Firecrawl fetch → SchemaSnap parse. Or curl → SchemaSnap parse.
Honest limits: HTML only (no JS render), layout tables skipped, no crawl, no proxy rotation.
Relationship to shadow-web
SchemaSnap started as schema_snap.py inside shadow-web — a broader agent-facing web interaction suite. This standalone version:
- Adds MCP server (
compress_htmltool) for Cursor / Claude Desktop - Inlines semantic grouping (no external dependency)
- Fixes tree mutation bug during tag removal
- Adds deterministic type inference (8 types)
- Hardened for public API (SSRF guard, rate limiting, oversize protection)
License
MIT
#web-scraping #data-extraction #ai-agents #html-parser #json-api #python #llm-tools
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file schemasnap-0.1.7.tar.gz.
File metadata
- Download URL: schemasnap-0.1.7.tar.gz
- Upload date:
- Size: 27.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe331e5ad6eeb9085dbcfad616dd4c6761445f21c76976619030fc11f37acdb5
|
|
| MD5 |
c6906aa2a840f5d894f21db28b44983c
|
|
| BLAKE2b-256 |
181921f72d31e347a1e8033002872f09bf8d63bdb6ad49e0c885d58ae70af49f
|
File details
Details for the file schemasnap-0.1.7-py3-none-any.whl.
File metadata
- Download URL: schemasnap-0.1.7-py3-none-any.whl
- Upload date:
- Size: 21.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94f37bc9b18b5ce2a1753996339175ffdedd82b0a9f44e682ab9ac5065424cce
|
|
| MD5 |
f1c4ff1ddf050e5841706092561a0339
|
|
| BLAKE2b-256 |
50266bc32591d64b8c65ae82c91619005010aae5bd9000ea3adb8141c23be197
|