url2text

url2text API

Read the main article text of any public web page as Markdown or plain text. Free, no key, no sign-up.

Extract a page

Put the page address, URL-encoded, after ?url= and ask for format=markdown:

curl "https://url2text.netlify.app/api/extract?url=https%3A%2F%2Fpaulgraham.com%2Fgreatwork.html&format=markdown"

Open this request in your browser

The answer is the article as Markdown, starting like this:

# How to Do Great Work

Source: https://paulgraham.com/greatwork.html

July 2023

If you collected lists of techniques for doing great work in a lot of different fields, what would the intersection look like? I decided to find out by making it.
…

format=text gives plain paragraphs instead. POST /api/extract with the JSON body { "url": "https://…", "format": "markdown" } works the same way. Without format the answer is JSON:

url
The page address after redirects
title
The article title
byline
The author line, or null
siteName
The site's host name, without www.
excerpt
A short summary, or null
lang
The language the page declares, or null
words
Length, in words or (Chinese, Japanese, Korean) characters
unit
words or characters
markdown
The article as Markdown: headings, lists, tables, links and code kept
text
The article as plain paragraphs; tables as tab-separated rows

WeChat Official Account articles (mp.weixin.qq.com), Chinese and Japanese pages in legacy encodings such as GBK and Shift_JIS, and SEC EDGAR filings, tables included, are read too.

Long pages in parts

With format, add offset (and optionally max_chars, at least 1,000) to get a long article in parts of about 20,000 tokens, each cut just after a paragraph or line break. A part that doesn't reach the end closes with [The article goes on: … For the next part, ask again with offset=N.], the last with [End of the article.]. An article that fits in one part comes back whole.

headings, tables, tableSpans and images (pictures, each with the paragraph oftext it comes before) describe text for display and can be ignored.

Errors

An error is a sentence you can show a person: the whole answer with format, otherwise { "error": "…" }. The status says what happened:

400
The link can't be read: not http or https, a private address, a bad address
413
The page is over 16 MB
415
The link is a file, not a web page
422
The page is missing, has no readable article, needs a login, refuses reading tools, or its site doesn't exist
429
More than 30 pages in a minute from one address
502504
The site failed or took more than 9 seconds
500
url2text itself failed

MCP server

https://url2text.netlify.app/api/mcp is a Model Context Protocol server over Streamable HTTP with one tool, extract_article (url, and optionally format: markdown or text, offset and max_chars). Its answers always come in parts, as above, so a long filing fits an agent's tool-output limit. No authentication. In an MCP client's configuration:

{ "mcpServers": { "url2text": { "type": "http", "url": "https://url2text.netlify.app/api/mcp" } } }

In a browser that supports WebMCP, the url2text home page offers the same tool to the agent driving it.

Limits

Machine-readable descriptions

This page and the home page also answer in Markdown to requests that send Accept: text/markdown.