HTML API: The HTML a server actually sends

The document a public URL returns before any JavaScript runs, the markup crawlers read; or, with render: true, the DOM a browser builds from it.

  • Redirects followed, and every hop checked
  • Charset detected and decoded to UTF-8
  • Bot walls reported as errors, never charged

1 credit per call, $0.001 at the base rate. 100 free credits to start.

Rust Programming Language

https://rust-lang.org/

HTTP 200
<title>Rust Programming Language</title><meta name="viewport" content="width=device-width,initial-scale=1.0"><meta name="description" content="A language empowering everyone to build reliable and efficient software."><!-- Twitter card -->
hreflang links
11
Encoding
UTF-8
Redirected
Yes
Real response, captured 21 Oct 2026200 OK

What is the HTML API?

The HTML API fetches a public URL and returns its HTML exactly as the server sent it, before any JavaScript runs, decoded from the page’s own charset; with render: true it returns the DOM after a real browser ran the page’s scripts. Redirects are followed and reported, private-network targets are refused, challenge pages come back as errors, and pages over 5 MiB are cut and flagged. One credit per page.

  • Reviewed 21 Oct 2026
  • Examples are real API responses

At a glance

Endpoint
POST /html
Authentication
Bearer API key
Price
1 credit · $0.001
Free to start
100 credits on sign-up
Response
JSON, no envelope
of HTML per page, at most
5 MiB
redirect hops followed
10
as served, or rendered by a browser
2 modes

How the HTML API works

  1. 1

    POST a URL

    POST /html with {"url": …}, plus "render": true for the rendered DOM; private, local and credential-bearing URLs are refused first.

  2. 2

    Fetch hop by hop

    Redirects are followed one at a time, up to 10, and every host is checked before it is fetched.

  3. 3

    Decoded HTML

    content holds the document in UTF-8; encoding names the charset it was served in.

HTML API use cases

What teams build with the HTML API, and the behaviour you can write code against.

What you can build

  • SEO and GEO audits

    Check titles, meta descriptions, canonicals, hreflang and JSON-LD as they ship in the server response, the version crawlers that skip JavaScript read.

  • Rendering checks

    Fetch a page with and without render: true and diff the two to find the content that only exists after JavaScript runs.

  • Markup for your own parser

    Feed the exact document to Cheerio, BeautifulSoup or lxml for extraction rules a Markdown conversion would flatten.

What you can count on

  • Exactly what the server sent

    By default no headless browser, no JavaScript and no cookies: the document as served, before anything changes it.

  • Rendered on request

    render: true returns the DOM a real browser builds, serialized as DevTools copies it, with no URLs rewritten and nothing injected.

  • Charset handled

    GBK, Shift_JIS and windows-1252 pages are decoded the way a browser picks the encoding, and output.encoding says which one was used.

  • Bot walls are not results

    A challenge or block page comes back as unprocessable (422) and is not charged, instead of being returned as the site’s HTML.

HTML API examples

Signed out, real responses captured from the API. Signed in, a live request on your own key, metered like any other call.

Open in the playground

Showing real example responses. Sign in to run live requests; new accounts start with 100 free credits.

POST/api/v1/html{"url":"https://www.rust-lang.org/"}
200 OK1 creditExampleExample response
Rendered

Example response: real capture, 21 Oct 2026; content shortened to its first 3,455 of 18,452 characters, through </head>.

Rust Programming Language
rust-lang.org
HTTP 200

Redirected from www.rust-lang.org to rust-lang.org.

Document

Size
3 KB
Encoding
UTF-8
Lines
64
Scripts
3
JSON-LD blocks
0
hreflang links
11

Head

Title
Rust Programming Language
Meta description
A language empowering everyone to build reliable and efficient software.
Canonical
—

Source

rust-lang.org.htmlas served · text/html
<!doctype html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <title>
            Rust Programming Language
        </title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <meta name="description" content="A language empowering everyone to build reliable and efficient software.">

    <!-- Twitter card -->
    <meta name="twitter:card" content="summary">
    <meta name="twitter:site" content="@rustlang">
    <meta name="twitter:creator" content="@rustlang">
    <meta name="twitter:title" content="">
    <meta name="twitter:description" content="A language empowering everyone to build reliable and efficient software.">
    <meta name="twitter:image" content="https://www.rust-lang.org/static/images/rust-social.jpg">

    <!-- Facebook OpenGraph -->
    <meta property="og:title" content="" />
    <meta property="og:description" content="A language empowering everyone to build reliable and efficient software.">
    <meta property="og:image" content="https://www.rust-lang.org/static/images/rust-social-wide.jpg" />
    <meta property="og:type" content="website" />
    <meta property="og:locale" content="en_US" />

    <!-- styles -->
    <link rel="stylesheet" href="/static/styles/a11y-dark.css"/>
    <link rel="stylesheet" href="/static/styles/vendor_10880690442070639967.css"/>
    <link rel="stylesheet" href="/static/styles/fonts_8049871103083011125.css"/>
    <link rel="stylesheet" href="/static/styles/app_17774143076088586802.css"/>

    <!-- favicon -->
    <link rel="apple-touch-icon" sizes="180x180" href="/static/images/apple-touch-icon.png?v=ngJW8jGAmR">
    <link rel="icon" sizes="16x16" type="image/png" href="/static/images/favicon-16x16.png">
    <link rel="icon" sizes="32x32" type="image/png" href="/static/images/favicon-32x32.png">
    <link rel="icon" type="image/svg+xml" href="/static/images/favicon.svg">
    <link rel="manifest" href="/static/images/site.webmanifest?v=ngJW8jGAmR">
    <link rel="mask-icon" href="/static/images/safari-pinned-tab.svg?v=ngJW8jGAmR" color="#000000">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="msapplication-config" content="/static/images/browserconfig.xml?v=ngJW8jGAmR">
    <meta name="theme-color" content="#ffffff">

        <!-- locales -->
<link rel="alternate" href="https://www.rust-lang.org/en-US" hreflang="en-US">
<link rel="alternate" href="https://www.rust-lang.org/es" hreflang="es">
<link rel="alternate" href="https://www.rust-lang.org/fr" hreflang="fr">
<link rel="alternate" href="https://www.rust-lang.org/it" hreflang="it">
<link rel="alternate" href="https://www.rust-lang.org/ja" hreflang="ja">
<link rel="alternate" href="https://www.rust-lang.org/pt-BR" hreflang="pt-BR">
<link rel="alternate" href="https://www.rust-lang.org/ru" hreflang="ru">
<link rel="alternate" href="https://www.rust-lang.org/tr" hreflang="tr">
<link rel="alternate" href="https://www.rust-lang.org/zh-CN" hreflang="zh-CN">
<link rel="alternate" href="https://www.rust-lang.org/zh-TW" hreflang="zh-TW">
<link rel="alternate" href="https://www.rust-lang.org/" hreflang="x-default">

    <script type="text/javascript">
      window.RUST_BASE_URL = "";
    </script>

    <!-- Custom Highlight pack with: Rust, Markdown, TOML, Bash, JSON, YAML,
         and plaintext. -->
    <script src="/static/scripts/highlight.pack.js" defer></script>
    <script src="/static/scripts/init.js" defer></script>
  </head>
JSONapplication/json
{  "source": {    "requested_url": "https://www.rust-lang.org/",    "resolved_url": "https://rust-lang.org/",    "http_status": 200  },  "output": {    "format": "html",    "mime_type": "text/html; charset=utf-8",    "rendered": false,    "encoding": "utf-8",    "content": "<!doctype html>\n<html lang=\"en-US\">\n  <head>\n    <meta charset=\"utf-8\">\n    <title>\n            Rust Programming Language\n        </title>\n    <meta name=\"viewport\" content=\"width=device-width,initial-scale=1.0\">\n    <meta name=\"description\" content=\"A language empowering everyone to build reliable and efficient software.\">\n\n    <!-- Twitter card -->\n    <meta name=\"twitter:card\" content=\"summary\">\n    <meta name=\"twitter:site\" content=\"@rustlang\">\n    <meta name=\"twitter:creator\" content=\"@rustlang\">\n    <meta name=\"twitter:title\" content=\"\">\n    <meta name=\"twitter:description\" content=\"A language empowering everyone to build reliable and efficient software.\">\n    <meta name=\"twitter:image\" content=\"https://www.rust-lang.org/static/images/rust-social.jpg\">\n\n    <!-- Facebook OpenGraph -->\n    <meta property=\"og:title\" content=\"\" />\n    <meta property=\"og:description\" content=\"A language empowering everyone to build reliable and efficient software.\">\n    <meta property=\"og:image\" content=\"https://www.rust-lang.org/static/images/rust-social-wide.jpg\" />\n    <meta property=\"og:type\" content=\"website\" />\n    <meta property=\"og:locale\" content=\"en_US\" />\n\n    <!-- styles -->\n    <link rel=\"stylesheet\" href=\"/static/styles/a11y-dark.css\"/>\n    <link rel=\"stylesheet\" href=\"/static/styles/vendor_10880690442070639967.css\"/>\n    <link rel=\"stylesheet\" href=\"/static/styles/fonts_8049871103083011125.css\"/>\n    <link rel=\"stylesheet\" href=\"/static/styles/app_17774143076088586802.css\"/>\n\n    <!-- favicon -->\n    <link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"/static/images/apple-touch-icon.png?v=ngJW8jGAmR\">\n    <link rel=\"icon\" sizes=\"16x16\" type=\"image/png\" href=\"/static/images/favicon-16x16.png\">\n    <link rel=\"icon\" sizes=\"32x32\" type=\"image/png\" href=\"/static/images/favicon-32x32.png\">\n    <link rel=\"icon\" type=\"image/svg+xml\" href=\"/static/images/favicon.svg\">\n    <link rel=\"manifest\" href=\"/static/images/site.webmanifest?v=ngJW8jGAmR\">\n    <link rel=\"mask-icon\" href=\"/static/images/safari-pinned-tab.svg?v=ngJW8jGAmR\" color=\"#000000\">\n    <meta name=\"msapplication-TileColor\" content=\"#ffffff\">\n    <meta name=\"msapplication-config\" content=\"/static/images/browserconfig.xml?v=ngJW8jGAmR\">\n    <meta name=\"theme-color\" content=\"#ffffff\">\n\n        <!-- locales -->\n<link rel=\"alternate\" href=\"https://www.rust-lang.org/en-US\" hreflang=\"en-US\">\n<link rel=\"alternate\" href=\"https://www.rust-lang.org/es\" hreflang=\"es\">\n<link rel=\"alternate\" href=\"https://www.rust-lang.org/fr\" hreflang=\"fr\">\n<link rel=\"alternate\" href=\"https://www.rust-lang.org/it\" hreflang=\"it\">\n<link rel=\"alternate\" href=\"https://www.rust-lang.org/ja\" hreflang=\"ja\">\n<link rel=\"alternate\" href=\"https://www.rust-lang.org/pt-BR\" hreflang=\"pt-BR\">\n<link rel=\"alternate\" href=\"https://www.rust-lang.org/ru\" hreflang=\"ru\">\n<link rel=\"alternate\" href=\"https://www.rust-lang.org/tr\" hreflang=\"tr\">\n<link rel=\"alternate\" href=\"https://www.rust-lang.org/zh-CN\" hreflang=\"zh-CN\">\n<link rel=\"alternate\" href=\"https://www.rust-lang.org/zh-TW\" hreflang=\"zh-TW\">\n<link rel=\"alternate\" href=\"https://www.rust-lang.org/\" hreflang=\"x-default\">\n\n    <script type=\"text/javascript\">\n      window.RUST_BASE_URL = \"\";\n    </script>\n\n    <!-- Custom Highlight pack with: Rust, Markdown, TOML, Bash, JSON, YAML,\n         and plaintext. -->\n    <script src=\"/static/scripts/highlight.pack.js\" defer></script>\n    <script src=\"/static/scripts/init.js\" defer></script>\n  </head>",    "truncated": false  },  "warnings": []}

HTML API reference

The same contract as the API reference: parameters, response fields, and the request in five languages.

POST/api/v1/html
Run in playground

Request body

  • urlstring

    A public HTTP/HTTPS URL. Private, local, and credential-bearing URLs are rejected.

  • renderboolean

    Optional, default false. true returns the DOM after a real browser ran the page’s scripts, instead of the bytes the server sent. Slower: typically 5–15 seconds.

Response

  • sourceobject
  • outputobject
  • warningsstring[]

    Non-fatal notes, such as a charset that could not be decoded.

Errors: invalid_request (400), insufficient_credits (402), unprocessable (422), upstream_error (502), upstream_timeout (504). See error codes.

curl -X POST "https://tabapi.com/api/v1/html" \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.rust-lang.org/"}'
Response200 · application/json
{
  "source": {
    "requested_url": "https://www.rust-lang.org/",
    "resolved_url": "https://rust-lang.org/",
    "http_status": 200
  },
  "output": {
    "format": "html",
    "mime_type": "text/html; charset=utf-8",
    "rendered": false,
    "encoding": "utf-8",
    "content": "<!doctype html>\n<html lang=\"en-US\">\n  <head>\n    <meta charset=\"utf-8\">\n    <title>\n            Rust Programming Language\n        </title>\n    <meta name=\"viewport\" content=\"width=device-width,initial-scale=1.0\">\n    <meta name=\"description\" content=\"A language empowering everyone to build reliable and efficient software.\">",
    "truncated": false
  },
  "warnings": []
}

HTML API pricing

Buy credits once, from $10: $1 buys 1,000 credits, every endpoint draws on the same balance, and credits never expire.

All pricing
Per call
1 credit
$0.001 at the base rate.
Volume bonus
Up to +10%
More credits on bigger packs: +2% from $200, +5% from $500, +10% from $1,000.
Free to start
100 credits
On sign-up, no card required: 100 calls.
Failed calls
0 credits
Errors are never charged.

Use HTML API from your agent

Your agent can call it as the fetchHtml tool on the TabAPI MCP server, or over HTTP with the agent skill. Same key, same price: 1 credit per call.

HTML API FAQ

Short answers. The docs have the long ones.

Still have a question?

Email us and we will help you get the first call working.

support@tabapi.com

Get a free HTML API key

Create a key, send one header, get JSON back.

curl -X POST "https://tabapi.com/api/v1/html" -H "Authorization: Bearer $TABAPI_KEY" -d '{"url":"https://www.rust-lang.org/"}'