Web to Markdown
Converts any website URL into a clean Markdown file via the Jina Reader API (r.jina.ai).
How It Works
Prepend https://r.jina.ai/ to the target URL and fetch with read_url_content. Jina handles JavaScript rendering, ad removal, and Markdown conversion server-side.
Steps
- Validate input. Ensure the user provided a valid URL (must start with
http://orhttps://). - Fetch Markdown. Call
read_url_contentwith URLhttps://r.jina.ai/<target URL>. - Extract content. The response contains metadata lines (
Title:,URL Source:,Published Time:) followed byMarkdown Content:. Extract the title from theTitle:line and the body from everything afterMarkdown Content:. - Format output. Assemble the final Markdown using the template below.
- Save file. Write to the output path (see Saving section).
Output Template
# [Title from Jina response]
**Source**: [original URL]
**Date**: [Published Time, or 'Unknown']
---
[Markdown body from Jina response]
Saving the Output
Unless the user specifies a path, save to: ./reports/Articles_YYYY_MM_DD/[slugified_title].md
Derive slugified_title from the page title: lowercase, replace spaces/special chars with underscores, truncate to 80 chars. Confirm the saved path to the user in one sentence.
Error Handling
- If Jina returns an error or empty content, report the failure and suggest the user try
content-cleanerskill as fallback (which uses directread_url_content+ manual cleaning). - If the URL is behind authentication or a paywall, Jina may return partial content. Note this to the user.