URL to Markdown API for LLMs

The short answer

Convert any public URL — or a batch of up to 50 — into clean Markdown with a token count in one REST call. The free plan includes 3 conversions a day, and a failed fetch does not add to that daily count.

Need pages behind login walls or anti-bot checks? Switch to Web2MD MCP or Agent Bridge, which use your local browser session.

Best API to convert web pages to Markdown

No single API is best for every page. Web2MD's POST /api/v1/convert returns Markdown for one public URL, and POST /api/v1/batch accepts up to 50. A free account includes 3 conversions a day, and a failed fetch does not count. The API does not use your browser login. Limits for Jina Reader and Firecrawl were checked on 2026-11-23.

Those checked figures are in URL-to-Markdown APIs for RAG. The request this route accepts is the curl sample below.

Run it

One public URL. Requires Authorization: Bearer w2m_...

curl -X POST https://web2md.org/api/v1/convert \
  -H "Authorization: Bearer w2m_your_key" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/article"}'

Batch, up to 50 URLs. The handler walks the list in order and returns one JSON body.

curl -X POST https://web2md.org/api/v1/batch \
  -H "Authorization: Bearer w2m_your_key" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://example.com/a","https://example.com/b"]}'

POST /api/v1/convert — 200 body

includeMeta defaults to true, so markdown starts with YAML front matter. author, publishedDate, and description are omitted when the extractor does not find them. Token fields are heuristic estimates, not a model tokenizer.

{
  "success": true,
  "data": {
    "markdown": "<string>",
    "metadata": {
      "title": "<string>",
      "url": "<string>",
      "extractedAt": "<ISO-8601>",
      "wordCount": "<integer>",
      "tokenCount": "<integer>",
      "originalTokenCount": "<integer>",
      "readingTime": "<integer, minutes>",
      "author": "<string, optional>",
      "publishedDate": "<string, optional>",
      "description": "<string, optional>"
    }
  }
}

POST /api/v1/batch — 200 body

A failed URL is an item with success: false and error. It does not include originalTokenCount. includeMeta defaults to false on this route.

{
  "success": true,
  "data": {
    "results": [
      {
        "url": "<string>",
        "success": true,
        "markdown": "<string>",
        "metadata": {
          "title": "<string>",
          "wordCount": "<integer>",
          "tokenCount": "<integer>",
          "readingTime": "<integer, minutes>"
        }
      }
    ],
    "total": "<integer>",
    "succeeded": "<integer>",
    "failed": "<integer>"
  }
}

Auth failures return 401 { "error": "Invalid API key. Pass Authorization: Bearer w2m_..." }. A daily-cap refusal is 429 with code: "LIMIT_REACHED", plus used, limit, and upgrade.

Pricing and quotas

PlanPriceConversionsWhat the code does
Free$03 conversions / dayAPI keys are allowed (up to 5) and share this cap. Single-URL history keeps 5 rows.
Pro Monthly$9 / monthNo daily capRenewing subscription. Sets the account to Pro. History limit 100.
Pro Yearly$49.99 / yearNo daily capRenewing subscription. Same Pro cap as monthly.
30-Day Pro Pass$15 onceNo daily capOne-time. Sets Pro until the pass expires, then the account returns to Free.
Lifetime$149 onceNo daily capOne-time charge. Sets the account to Pro.
Credit pack$5 once50 conversionsDoes not change the plan. Added to the credit balance and spent only after the daily cap.

Rate limits sit beside the daily cap: 60 convert requests per minute per key, and 10 batch requests per minute per key. A failed fetch does not increment the daily conversion count. When the daily cap is already used, one credit is taken as the request is admitted, before the fetch, and it is not refunded if the fetch fails.

There is no per-1,000-page price in the checkout table.

How should I choose a URL-to-Markdown API for RAG?

Judge it on the pages you will actually index. For this API, the checks below are what the route does — not a benchmark score.

CheckWhat this API does
JavaScript renderingPOST /api/v1/convert does not run the page's JavaScript. It requests the URL's HTML (15 second timeout) or a site API: Reddit JSON, Fandom's MediaWiki API, YouTube's player data (no server-side transcript), Hacker News via Algolia, arXiv, the Stack Exchange API, and GitHub issue or pull-request JSON. A script-only shell that is none of those comes back as a fetch or extract error.
Tables and codeHTML tables are written as Markdown tables. Code is written as fenced blocks. When the snippet matches the detector, the fence gets a language tag. Headings, lists, and links are kept. includeImages and includeLinks both default to true.
Token counttokenCount estimates the cleaned Markdown. On the single-URL route, originalTokenCount estimates the raw HTML with the same counter (about 4 English characters per token, with separate ratios for Chinese and for code). Compare the two fields on your corpus. This page does not state a percentage saved.
FailuresBatch results report success per URL. The call does not stream. A failed URL does not increment the daily conversion count.

The online form for one public URL is website to Markdown. That form uses a different fetcher, which can retry a blocked or script-shell page through Jina Reader. This REST API does not.

Two ways to read a page

PageUseWhy
Public URLREST APIPOST /api/v1/convert or /api/v1/batch. The fetch runs on Web2MD's servers.
Login, paywall, or a browser checkWeb2MD MCP and Agent BridgeThe agent reads the page already open in your Chrome session. The package is npx web2md-mcp-server.

Why use a URL to Markdown API for LLM input?

Fetching HTML is the easy half. The hard half is deciding what on the page is the article and what is navigation, cookie banners, related-posts rails, and inline scripts — then keeping headings, lists, tables, and code blocks intact through the conversion. A generic HTML-to-Markdown library gives you Markdown-shaped noise.

POST /api/v1/convert fetches the URL on Web2MD''s servers. Reddit is attempted through Reddit''s JSON API, first with OAuth when it is configured, then the anonymous JSON endpoints. If that fails, the route returns an error instead of an empty thread. It does not use your browser session.

URL-to-Markdown use cases

  • SEO and content teams mining Reddit threads for what real people actually ask — then feeding the cleaned text to a model for clustering or summarising.
  • Ecommerce and sourcing teams pulling product and listing pages in bulk to compare specs, pricing, and copy.
  • RAG pipelines that need clean chunks. splitByTokens-style chunking is easier when the input is already structured Markdown rather than tag soup.
  • Agents and coding assistants that need to read a list of URLs as part of a task, without a human clicking through each one.

Markdown API — FAQ

best api to convert web pages to markdown

There is no single best API for every page. POST /api/v1/convert returns Markdown for one public URL. POST /api/v1/batch accepts up to 50 and rejects a longer list. Free accounts get 3 conversions a day, and a failed fetch does not count. The API does not use your browser login. Jina Reader and Firecrawl limits checked on 2026-11-23 are in the comparison linked on this page.

api to convert any url into clean markdown for llm input

POST https://web2md.org/api/v1/convert with header Authorization: Bearer w2m_... and JSON body {"url":"https://example.com/article"}. A 200 response is an object with success true and data.markdown plus data.metadata, including tokenCount. The route fetches on Web2MD's servers, does not run the page's JavaScript, and does not send your browser cookies.

best api to convert web pages to markdown in united states

Callers in the United States use the same POST /api/v1/convert and POST /api/v1/batch endpoints. This site does not publish a separate US product or a US office address. Free accounts get 3 conversions a day. A batch accepts up to 50 public URLs.

How should I choose a URL-to-Markdown API for RAG?

Check three things on your own pages. JavaScript: POST /api/v1/convert fetches HTML and does not run the page's scripts, so a client-rendered shell is not a full article. Tables and code: HTML tables become Markdown tables, and code becomes fenced blocks, with a language tag when the detector recognizes the snippet. Tokens: the single-URL response includes tokenCount for the cleaned Markdown and originalTokenCount for the raw HTML, both heuristic estimates, so you can compare them yourself. This page does not publish a savings percentage.

How many URLs can one request take?

50. POST /api/v1/batch rejects a longer urls array instead of truncating it. Batch requests are limited to 10 per minute per API key. POST /api/v1/convert is limited to 60 requests per minute per key. URLs in a batch are handled one after another, and the response is one JSON object. One URL failing does not drop the others.

How does authentication work?

Send Authorization: Bearer w2m_... . A signed-in account on any plan can create up to 5 keys. The key uses that account's plan limit. Free is 3 conversions a day. Pro has no daily cap.

What about pages behind a login or anti-bot wall?

The REST API fetches from Web2MD's servers and does not use your browser cookies. Reddit is read through Reddit's JSON API when server OAuth is configured; if that fails, the route returns an error and points you at the extension. For a page that only exists in your logged-in Chrome session, use Web2MD MCP or Agent Bridge.

What does a conversion cost?

The free plan includes 3 conversions a day. A failed fetch does not increment that daily count. Pro Monthly is $9 and removes the daily cap. A $5 pack adds 50 conversions. If the daily cap is already used, admitting the request spends one of those credits before the fetch runs, and that credit is not returned when the fetch fails.

Full endpoint reference, response shape, and error codes are in the docs.

Prices and limits for Jina Reader, Firecrawl, Cloudflare Markdown for Agents, and this API, checked 2026-11-23: URL-to-Markdown APIs for RAG.