TOOLS

URL to Markdown API

Fetch URL as Markdown downloads a web page and converts it to Markdown that is ready for an LLM prompt, a search index or a note-taking tool. In its default article mode it runs Mozilla’s Readability extractor to keep the main content and discard navigation and boilerplate, and it falls back to converting the whole document when Readability strips too much of the page; full mode converts the whole body with navigation, footer and forms removed. Tables, lists and code blocks come through as GitHub-flavoured Markdown. includeLinks keeps the inline links and returns the extracted link list, includeImages keeps image references, which are dropped by default because they cost tokens, and maxChars cuts the output at a paragraph boundary and sets a truncated flag. The page is fetched over plain HTTP with browser-like headers, and when the origin serves a bot wall the request is retried once through a datacenter or residential proxy; fetchedWith reports which route produced the body. No browser runs, so a page that builds its content with client-side JavaScript fails with a classified error rather than returning empty Markdown. Alongside the markdown you get the title, byline, language, excerpt, finalUrl, httpStatus, the extractor that ran and the character count. Private, loopback and link-local destinations are refused. The exact price and cache lifetime are on this page’s FAQ, generated from the same catalog the calls run against.

What data you get

Fetch URL as Markdown

lang
objectrequired — Language tag from <html lang> (e.g. "en"); null if absent.
links
array — Absolute http(s) links found in the extracted content, capped at 500. Present only when includeLinks is true; reflects the extracted document, which may be longer than a truncated markdown body.
links[].href
stringrequired
links[].text
stringrequired
title
stringrequired — Page/article title, or an empty string if none was found.
byline
objectrequired — Author line, when Readability or a meta tag exposes one; null otherwise.
excerpt
objectrequired — Short summary from Readability or the meta description; null if absent.
finalUrl
stringrequired — URL actually fetched, after following redirects.
markdown
stringrequired — The converted document. Prefixed with the page title as an H1 when the extracted content does not already start with a heading.
charCount
integerrequired — Length of the returned markdown.
extractor
enumrequired — Which stage produced the markdown. In article mode this reads "full-dom" when Readability failed the content-density check.
fetchedAt
stringrequired — ISO-8601 timestamp of the fetch.
truncated
booleanrequired — True when the markdown was cut to fit maxChars.
httpStatus
integerrequired — HTTP status of the response that produced the markdown.
fetchedWith
enumrequired — Transport that produced the returned body: direct = straight from the worker; datacenter/residential = the proxy-pool tier used for the retry.

Calling Fetch URL as Markdown

A schema-derived request and response shape — not a captured production call, since upAPI has none to publish. Every field is real, from the operation’s own published schema.

bash
curl -X POST https://api.upapi.io/fetch-markdown.post \
  -H "X-Api-Key: $UPAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://en.wikipedia.org/wiki/Markdown",
  "mode": "article",
  "maxChars": 100000,
  "timeoutMs": 20000,
  "includeLinks": true,
  "includeImages": false
}'
json — example response shape
{
  "lang": "en",
  "links": [
    {
      "href": "example",
      "text": "Hello, world"
    }
  ],
  "title": "Alan Turing",
  "byline": {},
  "excerpt": {},
  "finalUrl": "example",
  "markdown": "example",
  "charCount": 1,
  "extractor": "readability",
  "fetchedAt": "example",
  "truncated": false,
  "httpStatus": 1,
  "fetchedWith": "direct"
}

Pricing

Every unit draws from one pooled monthly quota shared across the whole catalog. What a unit costs on each plan is on the pricing page, linked below.

Questions people actually ask

How do I convert a URL to Markdown with an API?

Send the url to Fetch URL as Markdown. The response holds the converted document in the markdown field, prefixed with the page title as a heading when the extracted content does not already start with one, plus the title, byline, language and excerpt as separate fields.

What is the difference between article mode and full mode?

Article mode uses Mozilla Readability to keep the main content and drop navigation, and it is checked against the whole page: when Readability strips too much, the extractor field reads full-dom to tell you it fell back. Full mode converts the whole body with navigation, footer and forms removed.

Does it work on JavaScript-rendered single-page apps?

No. The fetch is plain HTTP and no browser runs, so a page whose content only appears after client-side JavaScript fails with a classified error instead of returning empty Markdown. For those pages, use the screenshot or HTML to PDF operations, which render in a real browser.

Can I keep links and images in the Markdown?

Links are kept by default and returned as a separate list as well; set includeLinks to false to unwrap them to plain text. Images are dropped by default to save tokens; set includeImages to true to keep them.

How much does this cost?

Every operation in this cluster costs 3 weighted units per call, drawn from your plan’s pooled monthly quota — see upapi.io/pricing for what a unit costs on each tier.

How fresh is the data — is it cached?

every cached operation here returns a response held for 5 minutes. A repeat call inside a cached window returns the cached response and is billed nothing.

Related

Start with the free plan

One key and one pooled monthly quota cover Fetch URL as Markdown and every other API in the catalog. See what a unit costs on each plan, or run the operation first.