Skip to content
API referenceExtract

Extract

Stable

Turn any page into clean, LLM-ready content. Strips navigation, ads, and chrome; keeps headings, lists, tables, and links. Returns markdown, plain text, or sanitized HTML — optionally chunked to a token budget for RAG. Costs 1 credit.

Endpoint

POSThttps://api.renderkit.tech/v1/extract

url or html

Send exactly one of url or html. Requests with neither — or both — are rejected with 400 INVALID_PARAMS. Unknown fields are silently stripped before they reach the engine.

Extract parameters

ParameterDescription
formatstringOutput format. markdown is the default and best for LLMs. Options: markdown, text, html. Defaults to markdown.
only_main_contentbooleanDrop headers, footers, nav, and sidebars; keep the article body. Defaults to true.
include_linksbooleanPreserve inline links in the output. Defaults to true.
include_imagesbooleanKeep images (with alt text). Inline data-URI images are rehosted to a CDN URL. Defaults to true.
exclude_selectorsarrayCSS selectors to remove before extraction (up to 50).
chunkhobby+booleanSplit output into token-bounded chunks on heading boundaries. Defaults to false.
chunk_max_tokensintegerMaximum tokens per chunk (256–8192). Defaults to 4096.
chunk_overlap_tokensintegerToken overlap between adjacent chunks (0–1024). Defaults to 128.
meta_titlebooleanInclude the page title in meta.
meta_descriptionbooleanInclude the meta description in meta.
meta_ogbooleanInclude Open Graph tags in meta.
meta_authorbooleanInclude the detected author in meta.
meta_published_datebooleanInclude the detected publish date in meta.

Common parameters

ParameterDescription
urlstringFully-qualified URL to render. Max 4096 chars. Provide this or html, not both.
htmlstringRaw HTML to render instead of fetching a URL. Up to 2 MB. Provide this or url.
wait_untilstringNavigation lifecycle event to wait for before rendering. Options: load, domcontentloaded, networkidle. Defaults to networkidle.
delayintegerExtra wait after the page is ready, in milliseconds (0–10000). Defaults to 0.
timeoutintegerHard navigation timeout in milliseconds (5000–60000). Clamped to your plan's maximum. Defaults to 30000.
wait_for_selectorstringBlock until this CSS selector appears in the DOM.
user_agentstringOverride the browser User-Agent string.
countrygrowth+stringRender from a US or GB IP so geo-restricted and region-walled pages load correctly. Options: us, gb.
cookieshobby+arrayCookies to set before navigation. Up to 50 entries.
headershobby+objectExtra HTTP request headers, e.g. an Authorization header for gated pages.
inject_csshobby+stringCSS injected into the page before rendering (max 100 KB).
inject_jsgrowth+stringJavaScript executed in the page before rendering (max 100 KB).
cachebooleanServe an identical prior render from cache when available. Cache hits are free. Defaults to true.
cache_ttlintegerCache lifetime in seconds (0–2592000, i.e. up to 30 days). Defaults to 3600.
cache_keystringOverride the automatic cache key to force-share or force-separate renders.
asynchobby+booleanQueue the render and return a job immediately instead of blocking. See Webhooks & async. Defaults to false.
webhook_urlhobby+stringHTTPS URL that receives a signed render.done / render.failed callback when an async render finishes.
webhook_secrethobby+stringSecret used to HMAC-sign the webhook payload (X-RenderKit-Signature).

Request

curl https://api.renderkit.tech/v1/extract \
  -H "x-api-key: $RK_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://paulgraham.com/greatwork.html",
    "format": "markdown",
    "chunk": true,
    "chunk_max_tokens": 512
  }'

Response

Extract returns content inline in content — there is no hosted artifact url. With chunk: true, meta.chunks carries the segmented array.

200 · application/json
{
  "success": true,
  "data": {
    "id": "rnd_5tw3k9d2",
    "type": "extract",
    "status": "done",
    "content": "# How to Do Great Work\n\nIf you collect…",
    "meta": {
      "title": "How to Do Great Work",
      "word_count": 12480,
      "format": "markdown",
      "chunks": ["# How to Do Great Work\n\nIf you collect…", "…"]
    },
    "render_ms": 1216,
    "credits_used": 1,
    "cached": false,
    "created_at": "2026-06-14T10:26:40.000Z",
    "completed_at": "2026-06-14T10:26:41.216Z"
  },
  "message": "Success"
}

RAG in one call

chunk: true plus chunk_max_tokens gives you embeddings-ready segments split on heading boundaries with configurable overlap — no parsing library required. Pipe meta.chunks straight into your vector store.