Skip to content

URL to Markdown

One call that takes a URL and returns the page’s content as Markdown, with the title, author and publication date when the page declares them.

  • Your agent’s cue: the task needs what a web page says (documentation, an article, a changelog, a help center) as text it can read, quote or store.
  • You’ll reach for it when you paste a link into your agent and want it to work from the content, not from the menus, cookie banners and footers around it.

You are building a support assistant in Lovable for a product whose help center lives on another site. A backend function sends each help-center URL to MarkdownScribe and stores the Markdown it gets back; the assistant answers from those files. Help pages are full of short text that matters: keyboard shortcuts, bold option names, inline code. In clean mode those survive next to the paragraphs they belong to, so the assistant can answer “press Cmd+K” instead of “press +”.

You paste the link of a documentation site into your coding agent. Many of those sites are JavaScript apps: the HTML has no content until a browser runs the page. The agent makes one call; clean first looks for an official .md version of the page, then tries a plain fetch, and renders the page in a headless browser only when those fail. The Markdown comes back the same way in all three cases, and the response says which route was taken.

A nightly job converts a competitor’s pricing page to Markdown and commits it, so a diff shows what changed. The Markdown holds what the page shows before anyone interacts with it: on a page with a monthly/annual toggle you get the prices visible on load, not the ones behind a click; an icon that is an image with no text comes back as nothing. When the site answers with an error or refuses the request, the call returns fetch_failed with the reason, and the job can retry or alert instead of committing an empty file.

  • No browser to install or keep running. Pages that need JavaScript are rendered in a headless browser on our side. Your agent only makes an HTTP call.
  • You pay for the route the page needed. clean first looks for an official .md version of the page, then tries a plain fetch, and opens the browser only if those fail. The response says which route was taken and what it cost.
  • Failures you can branch on. A page that can’t be fetched, a page with no content and a page that is too slow come back as different error codes, each with a hint and a link to its page here.
Terminal window
curl https://api.markdownscribe.com/v1/url-to-md \
-H "X-API-Key: $MDSCRIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://commonmark.org/help/"}'
import { MarkdownScribeClient } from "@markdownscribe/sdk";
const client = new MarkdownScribeClient({ apiKey: process.env.MDSCRIBE_API_KEY! });
const result = await client.urlToMd({
url: "https://commonmark.org/help/",
});
Terminal window
mdscribe url https://commonmark.org/help/

Captured from the API on 2026-10-23. markdown is cut after the first lines here; the full value is about 1,800 characters.

{
"markdown": "**Markdown** is a simple way to format text that looks great on any device. It doesn’t do anything fancy like change the font size, color, or type — just the essentials, using keyboard symbols you already know.\n[Try Our 10 Minute Markdown Tutorial](https://commonmark.org/help/tutorial/) \n| Type | Or | … to Get | \n| --- | --- | --- | \n| *Italic* | _Italic_ | _Italic_ | \n| **Bold** | __Bold__ | **Bold** | …",
"mode": "clean",
"metadata": {
"title": "Markdown Reference",
"author": null,
"published_date": null,
"used_playwright": false,
"extraction_quality": "clean"
},
"meta": {
"request_id": "01M5MY6SCY0Y7SNSQEA14ZNAQ7",
"duration_ms": 571,
"credits": 3
}
}

metadata.extraction_quality tells you what you got:

Value Meaning
llms_md The site publishes its own .md version of the page, and that is what came back.
clean The main content, without navigation and footers.
raw_fallback The main-content pass found too little text, so you got the text of the whole page.
raw You asked for mode: "raw": the whole page as the browser rendered it.

3 to 8 credits per call. 3 for clean when an official .md file or a static fetch is enough; 8 when the page needed the headless browser. raw always uses the browser, so it always costs 8. Check metadata.used_playwright and the X-Credits-Charged header. Error responses are never charged.

  • Modes: clean (the default) returns the main content; raw returns the whole rendered page and always goes through the browser.
  • Public pages only: the URL must start with http:// or https:// and point to a public address. Pages on localhost or inside a private network cannot be reached from our servers.
  • Time limit: the call gives up after 35 seconds in total, counting every route it tries for the page.
  • Rate limit: URL to Markdown and Mermaid share a lower per-minute limit than the other operations, because both run a browser. See rate_limited.
Error When
invalid_request url is missing or not absolute, mode is not clean or raw, or the address is private (kind: private_address).
fetch_failed The site did not give us the page: it does not exist, answered with an error, refused the request or could not be reached. kind says which, and upstream_status carries the site’s status code when there is one.
extraction_empty clean found too little text to call it content. raw returns the page anyway.
timeout The page took longer than 35 seconds.
service_unavailable Our rendering service is down. Retry in a moment.
unauthorized, insufficient_credits, rate_limited The key, the balance or the per-minute limit, as on every operation.

Alternatives, and when MarkdownScribe is worth it

Section titled “Alternatives, and when MarkdownScribe is worth it”

Checked on 2026-10-23 against each tool’s own documentation.

  • Jina Reader. Put https://r.jina.ai/ in front of a URL and you get Markdown back, rendered in a headless browser. It works without a key at a low rate limit (jina.ai/reader). Use MarkdownScribe when the same agent also lints, formats or renders Mermaid: one key, one balance and one error format for all of it.
  • Firecrawl. POST https://api.firecrawl.dev/v2/scrape with formats: ["markdown"], 1 Firecrawl credit per page (docs.firecrawl.dev). It also crawls whole sites and extracts structured JSON, which MarkdownScribe does not. Use MarkdownScribe for the same reason as above, when the rest of your Markdown work runs through it.