url

Render a URL in a real headless browser (JavaScript...

Render a URL in a real headless browser (JavaScript executed) and return its article content with the clutter stripped — same cleaning + output formats as /api/url/clean, but for client-rendered / SPA pages whose content only appears after JS runs (where a raw HTTP fetch returns an empty shell). format: markdown (default), text, both (JSON envelope), html (self-contained reader page, raw text/html), or pdf (typeset reading doc, raw application/pdf). Optional waitUntil (load|domcontentloaded|networkidle0|networkidle2, default networkidle2) and timeoutMs (1000-15000, default 12000) control how long to let JS settle. Use /api/url/clean instead for server-rendered pages — it is faster and cheaper; only reach for render when JS rendering is required. Billing: payment settles before this endpoint runs (paid upstream), so an error after settlement IS charged — the error response then carries the payment receipt (PAYMENT-RESPONSE) and X-2s-Charged: true.

get/api/url/render

Request

  • Base URL: https://2s.io
  • URL: https://2s.io/api/url/render
  • Auth: API key in header PAYMENT-SIGNATURE

Query parameters

urlstring uri required

URL to process.

format'markdown' | 'text' | 'both' | 'html' | 'pdf'

Format.

waitUntil'load' | 'domcontentloaded' | 'networkidle0' | 'networkidle2'

Wait until.

timeoutMsinteger

Timeout ms.

trial1

Try before you buy. Set to 1 for one free real call per endpoint per hour — no wallet or payment needed — to verify the endpoint before paying. Equivalent to sending the "X-2s-Trial: 1" request header. Listed only on operations that offer a trial; the others always answer 402.

Response

OK

Changes

No recorded changes to this operation across all 1 revision of this API.