HTML Content JSONL¶
The content tool converts visible body content from one HTML page into JSONL. It is intended for lightweight text extraction where preserving the order of headings, paragraphs, and links matters more than reproducing the full DOM.
Supported sources¶
extract_content_records and scrape content accept:
a local HTML file path
an HTTP or HTTPS URL
Body-only extraction¶
Only content between <body> and </body> is considered. Metadata-like
elements are ignored, including:
scriptstyletemplatenoscript
Output model¶
The parser emits one JSON object per selected element:
h1throughh6records use the heading tag as the keyprecords usepas the keyarecords useaas the key and includehrefwhen presentli,td,th,blockquote,figcaption,dt,dd,caption,label, andbuttonrecords use the element tag as the key
Example output:
{"h1": "Title"}
{"p": "Hello docs."}
{"a": "docs", "href": "/docs"}
{"li": "First item"}
{"td": "Cell value"}
{"button": "Submit"}
Output filename¶
When no output path is supplied, scrape-smith writes to a safe filename based on the source:
page.html -> page-content.jsonl
If that filename already exists, a numeric suffix is added, such as
page-content-2.jsonl.