ScraperFlyAI-ready Web Data API

rendering

Rendered HTML API for JavaScript-built public pages

Fetch public pages after browser-side JavaScript has built the useful DOM. ScraperFly helps developers compare raw source HTML with rendered HTML, return parser-ready markup, and keep rendering as an evidence-based request control instead of a default cost for every URL.

Rendered HTML capture

Capture the DOM after JavaScript finishes the page

Some public pages return useful content in the first HTML response. Others send a thin shell and build the article, product list, table, route, or search result only after browser-side JavaScript runs. Rendered HTML is for that second case: when the parser needs the final DOM, not just the source markup.

ScraperFly lets teams compare raw HTML with browser-rendered HTML, then enable rendering only for targets that prove they need it. You keep simple pages fast and affordable, while still having a clean upgrade path for JavaScript-built public content.

raw vs renderedDOM completeparser-ready markup
Developers comparing source HTML with rendered HTML after browser execution completes the DOM

What is a rendered HTML API?

A rendered HTML API fetches a public page, runs browser-side JavaScript, waits for the page state to settle, and returns the resulting HTML markup. Instead of parsing the original source response, your application receives the DOM after the frontend has had a chance to create the useful content.

This is different from a screenshot or PDF. A screenshot proves what the page looked like. A PDF gives a portable visual record. Rendered HTML keeps the page as markup, so parsers can still inspect headings, links, tables, attributes, product cards, article bodies, pagination, embedded data, and repeated DOM patterns.

Practical takeaway: use rendered HTML when JavaScript changes the markup your parser needs, not when a simple source request already returns complete content.

When should a page use rendered HTML instead of raw HTML?

The decision should come from evidence. Start with raw HTML, inspect what comes back, and compare it with a rendered capture. If the source response already contains the useful article body, table, product data, links, or metadata, keep the request light. If the source response is missing the content, contains empty route containers, or only exposes placeholders, rendered HTML is the better input.

Target behaviorWhat raw HTML showsBetter request
Static public pageComplete text, links, and metadata appear in the first response.Use raw HTML, text, or Markdown without browser rendering.
Client-rendered pageThe response contains an app shell, route container, or empty content area.Use rendered HTML so the parser sees the completed DOM.
Delayed contentImportant cards or tables appear only after async requests finish.Use rendering with a measured wait rather than blind retries.
Layout proof neededThe parser needs markup, but reviewers also need visual evidence.Use rendered HTML for parsing and screenshots or PDFs only for selected proof records.
Regional or stateful contentThe visible result changes by language, location, cookies, or prior state.Test headers, country routing, or sessions before making rendering the default.

What can teams extract from rendered HTML?

Rendered HTML is still HTML. That makes it useful when downstream code needs selectors, attributes, structural relationships, canonical links, pagination, product cards, loaded comments, hydrated article bodies, or any page section that appears after frontend execution. It gives your parser the final markup without forcing a human to read a screenshot.

The API does not remove the need for target-specific rules. Your application still decides which fields matter, how records are validated, how duplicates are handled, and where extracted data goes. ScraperFly handles the capture side: browser execution, request options, response formats, metadata, and delivery controls.

Parser needRendered HTML helps becauseUseful companion output
Product or listing cardsThe final DOM contains repeated elements the source response may not include.JSON metadata for status and final URL.
Article body captureHydrated content can be parsed as markup after the browser runs.Text or Markdown for readable review.
Search or category pagesRendered sections expose links, filters, pagination, and visible ordering.Screenshot for occasional QA proof.
Monitoring workflowsThe parser can compare completed markup instead of empty shells.Metadata and response size for change diagnostics.
AI or RAG ingestionRendered HTML can be converted into cleaner text or Markdown after dynamic content appears.Markdown for model-ready context.

For broader format decisions, compare the web scraping API response formats. If your workflow needs the full browser execution path, review the JavaScript rendering API page too.

How should teams test rendered HTML before production?

Pick a few representative public URLs and test them in the API Builder. Compare raw source HTML, rendered HTML, response size, final URL, content type, and wait timing. The goal is not to turn rendering on everywhere. The goal is to identify which target groups need it and which can stay on a cheaper, faster request profile.

When a rendered request is empty, do not immediately rewrite the parser. First check whether the page redirected, returned a consent or blocked state, needed a longer wait, changed by country or language, or returned a response that is too large for the intended capture. Good debugging separates capture problems from parser problems.

Practical takeaway: rendered HTML should be validated against real target pages before it becomes part of a recurring workflow.

How does rendered HTML affect cost and reliability?

Browser work is heavier than a basic fetch. That is exactly why ScraperFly treats rendering as a deliberate request control. A simple public page should not pay the same operational cost as a JavaScript-heavy page that needs browser execution, waits, screenshots, files, country routing, or premium delivery.

Use free credits to test raw and rendered results. Keep simple captures on source HTML, text, or Markdown. Add rendering only where it improves completeness. Use pay-as-you-go credits while targets and volume are still uncertain, then move predictable recurring rendered workloads to monthly credits once the pattern is proven. The pricing page and credit cost calculator help map request weight to real target behavior.

Where does rendered HTML fit in the ScraperFly workflow?

Rendered HTML sits between basic HTML capture and fully visual output. Start with the HTML scraping API when source markup is complete. Move to rendered HTML when JavaScript creates the useful DOM. Choose text or Markdown when the downstream consumer needs readable content instead of selectors. Add screenshots or PDFs when the workflow needs proof of appearance.

This lets teams keep the first request simple, make escalation evidence-based, and give parsers the markup they actually need. The result is less custom browser infrastructure, fewer blind retries, and a cleaner path from target testing to production capture.

Rendered target fit

Confirm that JavaScript changes the DOM before making rendering the default

Rendered HTML is strongest when source markup is incomplete and browser execution creates the content your parser needs. Check raw HTML, final URL, response size, visible state, and wait timing before scaling a rendered request profile.

Raw HTML response mapped to visible page data
01

Raw HTML availability

Check whether the fields you need are already present in the first HTML response.

Best first test for simple pages, articles, docs, listings, and product details.

Before and after JavaScript rendering comparison
02

JavaScript dependency

Compare raw HTML with the rendered DOM or screenshot before turning on browser rendering.

Use rendering when raw HTML is only a shell and scripts create the useful content.

Cookies, consent, session and access context for scraping
03

State & access context

Identify whether cookies, consent, login boundaries, pagination, or the same visitor state affect the response.

Use sessions and headers when continuity changes the data you receive.

Regional content variations across countries and routes
04

Geo/content variation

Test whether country, language, currency, inventory, SERP, ads, or route reputation changes the result.

Use geo or premium routing only when the target proves the response varies by route.

Rendered HTML questions worth answering early

Where is the target field?

Find whether the field exists in raw HTML, rendered DOM, an API call, structured data, a file, or a later interaction state.

What changes the response?

Sample a few URLs and compare status, final URL, content length, redirects, empty states, and visible result differences.

What context is required?

Mark any dependency on consent, locale, cookies, headers, authentication boundary, pagination, filters, or previous requests.

What does failure look like?

Define the signals for blocked, partial, stale, redirected, empty, timed-out, or region-mismatched responses before scaling.

Signals to compare before enabling rendering

Fetch mode

Raw HTML availability decides whether the first request can stay simple or needs rendering, waits, screenshots, or extraction.

Request context

State requirements decide whether to add headers, cookies, sessions, consent handling, or a stable visitor profile.

Routing choice

Geo and reputation findings decide whether standard routing is enough or a country/premium route is justified.

Validation rules

Known failure states become checks for retries, escalation, QA review, and deciding when a lighter profile is still complete.

Rendered HTML builder

Build a request that returns browser-rendered markup only when the target needs it

Use the API Builder to compare source HTML with rendered HTML, choose wait behavior, and copy a canonical request that gives your parser the completed DOM without overloading simple targets.

Markup
Markup

Raw and rendered HTML

Start with source HTML, then enable rendering when browser execution changes the useful DOM.

Timing
Timing

Wait for useful page state

Use wait controls when cards, articles, tables, or route content appear after delayed client-side work.

Output choice
Output choice

Convert after rendering when useful

Return rendered HTML for parsers, or choose text, Markdown, screenshots, or PDFs when the downstream consumer needs them.

Request controls for rendered HTML capture

url

The public JavaScript-built page to capture.

render

Run browser execution when source HTML is incomplete.

render_wait

Wait for delayed content before capture when evidence shows timing matters.

format

Return rendered HTML or another output format after browser execution.

country

Use country routing when public content changes by location.

download

Return visual files when screenshot or PDF proof is required.

cURL example

Generate Markdown with the same request shape you can move into production

curl "https://scraperfly.com/api/v1?url=https%3A%2F%2Fexample.com&format=markdown" \
  -H "apikey: YOUR_API_KEY"

Rendered cost control

Keep rendering affordable by using it only where it improves completeness

Browser execution is heavier than a basic HTML fetch, so it should earn its place in the request profile. ScraperFly helps teams start with lightweight capture, test rendering on real targets, and reserve heavier controls for pages where the rendered DOM changes the result.

A lightweight HTML request returning a simple response
01

Basic fetch

Use a basic fetch when public HTML already contains the fields you need.

Lightest request profile; keep it when the response is complete.

JavaScript rendering producing a complete DOM
02

Rendering

Use rendering when raw HTML is a shell and JavaScript completes the page.

Heavier profile; use it only when browser output changes the result.

Several requests preserving cookies and visitor state
03

Stateful session

Use sessions when cookies, consent, locale, or pagination change the response.

Heavier state profile; preserve it only when continuity matters.

Request routing through geo and higher quality routes
04

Premium routing & geo

Use premium routing or geo only when origin, country, reputation, or regional content changes the result.

Heaviest routing profile; apply it only to targets that prove they need it.

What makes rendered requests heavier

More infrastructure work

Browser rendering, routing choices, and longer waits mean the platform has to do more than return a simple response.

More target uncertainty

Redirects, empty states, rate limits, and challenge pages often require stronger delivery options or retries.

More state to preserve

Cookies, sessions, consent, and multi-page flows add moving parts that a plain stateless fetch does not have.

More evidence to return

Screenshots, PDFs, rendered output, and richer response artifacts are useful, but they are heavier than plain HTML.

How to keep rendered HTML predictable

Sample before scale

Test a small URL set first and group targets by the lightest profile that returns complete data.

Do not render by default

Inspect raw HTML before turning on rendering. Many public pages already contain the data you need.

Escalate by evidence

Move up only when the response shows missing content, state dependency, geo variance, or routing problems.

Measure useful results

Optimize around valid records delivered, not raw request volume. A lighter profile is best only when it stays complete.

Rendered HTML FAQ

Common questions about rendered HTML capture

Practical answers for teams deciding when to render public pages, how to compare raw and rendered markup, and how to choose the right output after browser execution.

Rendered FAQ

Rendered HTML use cases

For teams parsing JavaScript-built public pages without maintaining browser infrastructure.

What does rendered HTML mean?

Rendered HTML is the markup after browser-side JavaScript runs and builds the final DOM for the public page.

When is raw HTML enough?

Raw HTML is enough when the first response already contains the useful text, links, tables, cards, or metadata your workflow needs.

Raw vs rendered checks

Compare evidence before changing request profiles.

How do I know rendering is needed?

Compare source HTML with rendered HTML and inspect status, final URL, response size, content type, visible state, and wait timing.

Should I use a render wait?

Use wait timing when useful content appears after delayed client-side requests. Keep it target-specific rather than global.

Formats after rendering

Rendering can feed different downstream consumers.

Can I get Markdown after rendering?

Yes. Render the page when needed, then choose Markdown if readable headings, links, and sections are better for review or AI ingestion.

When should I use screenshots instead?

Use screenshots when a human needs visual proof of page appearance. Use rendered HTML when a parser needs markup.

Request weight

Keep browser execution attached to proven targets.

Does rendered HTML cost more than raw HTML?

Rendered capture is heavier because it runs browser work. Start with raw HTML and enable rendering only when it improves the response.

Can I mix raw and rendered requests?

Yes. Keep simple sources on lightweight capture and use rendered HTML only for target groups that need browser execution.