ScraperFlyAI-ready Web Data API

rendering

API to scrape React websites with rendered output

ScraperFly helps teams scrape public React websites by comparing source HTML with rendered output, then enabling browser execution only when client-side JavaScript creates the useful content. Return rendered HTML, text, Markdown, JSON metadata, screenshots, or PDFs without maintaining your own browser workers.

React rendering

Compare source HTML with rendered output before scraping the app

React websites can look complete in a browser while the first HTML response contains only a small app shell. ScraperFly helps teams prove that difference before they build parser logic, queue workers, or browser infrastructure around the wrong response.

Start with source HTML, inspect what the target actually returns, then enable browser rendering, waits, sessions, headers, country routing, or visual output only when the rendered React page gives your workflow better evidence.

raw shell checkrendered DOMformat choice
Developer comparing raw HTML and rendered output for a public React website scraping workflow

Why are React websites different to scrape?

React websites often separate the first server response from the page a user finally sees. The source HTML may contain a root element, script tags, route metadata, hydration data, or a small placeholder. The useful product cards, article sections, search results, prices, tables, reviews, filters, or profile content may appear only after JavaScript runs in the browser.

That does not mean every React page needs the heaviest scraping profile. Some React applications still expose useful metadata, embedded state, server-rendered content, or structured payloads in the initial response. Others need rendered HTML because the content is built client-side. The practical workflow is to compare both states before deciding how the page should be captured.

Practical takeaway: React scraping should begin with evidence, not assumptions about whether the page needs a browser.

What should you inspect before rendering a React page?

The first check is the source response. Look for the useful content, not just a successful status code. A 200 response can still be an empty shell if the page expects the browser to fetch data, hydrate components, and build the final DOM. Inspect the body, response size, script payloads, metadata, final URL, and whether the target fields appear in the HTML your parser receives.

If source HTML already contains the fields you need, keep the request simple. If source HTML misses the useful content, compare rendered output. If rendered output changes the DOM in a meaningful way, rendering is justified. If rendered output is still empty, the issue may be timing, routing, blocked resources, a bad route, unavailable public content, or a page that requires a different workflow.

React signal What it means Best next step
Source HTML contains target content The page can likely be captured without browser rendering Use a lightweight HTML request and build the parser from source evidence.
Source HTML is mostly a root element and scripts The page probably builds useful content in the browser Test rendered HTML before writing extraction logic.
Rendered DOM contains the target fields JavaScript execution changes the scrape result Use rendering for this page type and log why it is needed.
Rendered page is still incomplete The issue may be timing, request context, routing, or target behavior Inspect wait timing, status, final URL, response size, and visual proof.
Visual page differs by region or state The route may depend on location, cookies, headers, or session continuity Add context deliberately instead of making every request heavier.

When should ScraperFly render a React website?

Enable rendering when the useful public content appears after client-side JavaScript runs. Common examples include React product grids, search results, dashboards with public data, route-based article pages, lazy sections, review widgets, price blocks, filters, and pages where the first HTML response contains placeholders rather than the final content.

Rendering should be precise. Do not turn it on because the site uses React; turn it on because the raw response does not contain what the workflow needs and the rendered response does. This keeps simple pages fast and affordable while still giving browser-built pages the environment they need.

For broader browser capture decisions, use the JavaScript rendering API guide and the headless browser scraping API page. For source-first targets, compare the HTML scraping API approach before making rendering the default.

Which output format works best after React rendering?

Rendered HTML is the best choice when your parser needs the final DOM, selectors, attributes, links, tables, product cards, or route content. Text and Markdown are better when the React page should feed search, summaries, AI context, documentation review, or RAG ingestion without layout noise. JSON metadata is useful for logging request evidence. Screenshots and PDFs are useful when a human needs to verify what the rendered page looked like.

This choice should happen before building converters. A React scrape that feeds a parser may need rendered HTML. A React scrape that feeds an LLM may be better as Markdown. A monitoring workflow may need metadata plus a screenshot. A compliance or QA workflow may need a PDF. ScraperFly lets the request return the shape the downstream system can use immediately.

React workflow Output to test Why it helps When to avoid it
DOM parsing Rendered HTML Returns the page after React builds useful markup When source HTML already contains the target fields.
Content ingestion Text or Markdown Removes much of the layout noise before search or AI processing When exact selectors or DOM relationships matter.
Diagnostics JSON metadata Shows status, final URL, content type, response size, and request context When the workflow expects extracted target fields by itself.
Visual QA Screenshot Confirms what the rendered public page looked like When the workflow only needs machine-readable text.
Archive or approval PDF Creates a portable record for review When the content needs frequent automated parsing.

How should waits, sessions, headers, and routing be handled?

React pages can fail for reasons that look similar from the outside. A page may need extra wait time because data loads after initial render. It may need headers because the public route expects language or content context. It may need sessions because related requests rely on shared cookies or state. It may need country routing because content changes by region, currency, or availability. It may need stronger delivery when the simple path repeatedly returns unusable output.

The right answer is not to enable everything. Add one control at a time and compare the result. If a wait fixes missing content, record the timing reason. If sessions change the response, keep them only for that related flow. If region changes the page, keep country routing tied to the target. A React scraping workflow is easiest to operate when every enabled control has a visible reason.

Use sessions for stateful public flows, custom headers for legitimate request context, and routing controls when delivery path changes the result.

What failures are common when scraping React websites?

The most common failure is treating an empty source response as a target block when it is really just a normal React shell. Another common failure is rendering too quickly and capturing the page before client-side data finishes loading. Teams also run into route redirects, content that changes by region, oversized responses, missing public data, unsupported output choices, and workflows that expect the API to extract application state automatically.

Good error handling keeps those cases separate. Compare source HTML, rendered HTML, screenshot state, final URL, status, response size, and wait timing. Fix malformed inputs and unsupported options instead of retrying them. Retry temporary failures with bounded backoff. Escalate routing only when repeated evidence shows the simple path is not enough.

The error-handling block below gives a broader failure framework. For React pages, the key is to distinguish "the browser has not built the page yet" from "the target returned a bad page" and from "the request profile is wrong."

How can React scraping stay affordable?

Rendering is powerful, but browser work is heavier than a simple HTML request. Cost stays predictable when teams classify targets before scaling: raw HTML pages, rendered React pages, pages that need waits, regional routes, session-dependent flows, visual QA captures, and PDF archives. Each class should have its own request profile instead of inheriting one expensive default.

This is where ScraperFly's path is practical. Start free, test real React pages, keep simple captures light, and use heavier controls only where they change the response. A one-off project can stay flexible with credits, while recurring rendered workloads can move to a monthly plan once the profile is proven.

Review pricing after sampling real targets, not before. The useful estimate is based on how many pages truly need rendering, waits, visual output, sessions, or stronger delivery.

Where should a team start?

Start in the API Builder with one public React URL. Request source HTML first. If the useful content is missing, enable rendering and compare the result. Then choose the response format your workflow can use: rendered HTML for parsers, text or Markdown for readable content, JSON metadata for diagnostics, screenshot or PDF for visual proof.

Once the request profile is proven, move it into cURL, Python, Node.js, a backend queue, a monitoring job, or an agent workflow. Keep the profile explicit so future failures can be diagnosed from evidence rather than guesswork.

React scraping

Identify when a React page needs browser rendering instead of raw HTML

React sites often send a thin HTML shell first, then build useful content in the browser. ScraperFly helps teams confirm whether the data exists in source HTML, rendered DOM, network-backed state, metadata, or visual page output before choosing the 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.

Checks before scraping React websites

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.

How React behavior changes scraping setup

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.

React request builder

Build a React scraping request that starts simple and renders only when needed

Test the target with a light request first. If React renders the content client-side, add browser execution, waits, sessions, headers, country routing, premium delivery, or visual capture based on evidence from real responses.

HTML
Fast check

Inspect raw HTML before paying for rendering

Some React pages still expose useful data in source markup, metadata, script payloads, or API-backed page state.

format=htmlrender=false
JS
Rendered DOM

Use browser rendering when the app builds content client-side

Rendering helps capture product cards, listings, articles, route states, and interactive content that source HTML does not contain.

render=truewaits
QA
Proof

Compare HTML, Markdown, JSON, screenshots, and PDFs

Different React workflows need different evidence: readable content, structured metadata, visual proof, or raw markup for custom parsing.

markdownjsonscreenshot

Controls that matter for React scraping

url

The React route or public page being captured.

render

Browser execution when content appears after client-side JavaScript.

wait

Timing control for pages that load data after initial render.

format

The response shape your parser or workflow expects.

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"

Error handling

Turn scraping failures into fixes

Every web data workflow eventually meets a bad response: a missing URL, an invalid key, an empty HTML shell, a target 403, a rate limit, a render timeout, a broken PDF capture, or a JSON payload that does not contain the fields your product expected. ScraperFly is built to make those moments diagnosable. You inspect the HTTP status, the stable error code, the request profile, and the returned artifact, then choose the cheapest useful next move: fix the request, add credits, slow down, retry with backoff, enable rendering, change country, use premium routing, preserve headers, or validate the output before scaling.

Stable error shapeRetry decisionsCost-aware escalationOutput validation
Developer reviewing code and API request parameters on a laptop

01 / Request setup and access

Fix request mistakes first

Some failures are not target problems at all. They happen before ScraperFly can make a meaningful delivery attempt: a missing or malformed URL, an unsupported output format, an incompatible visual file type, a missing API key, an invalid key, or a key that has been paused or disabled. These errors are configuration signals, not retry signals: stop the workflow, point the developer to the exact field that needs correction, and keep credits focused on real target tests instead of repeated bad inputs.

missing_urlinvalid_urlunsupported_formatinvalid_api_key
  • Validate the URL and encoding before sending a batch.
  • Use supported outputs: HTML, text, Markdown, JSON, screenshot, or PDF.
  • Match screenshot file types to image output and PDF file type to PDF output.
  • Treat missing or invalid API keys as configuration work, not retry work.
Business dashboard with charts, documents and usage planning on a desk

02 / Credits, limits and concurrency

Separate limits from failures

A workload can fail because the account has no usable credits, the monthly plan limit has been reached, or concurrency is too aggressive for the current plan and target mix. ScraperFly makes those limits visible as operating signals, not mysterious scrape failures. That keeps the buying decision practical: start free, test the target, buy pay-as-you-go credits for uneven jobs, move to monthly credits when volume becomes predictable, and use backoff when request pressure is the real issue.

usage_limit_reachedrate_limitedcreditsbackoff
  • Use account status to check remaining credits before large runs.
  • Retry rate limits with backoff instead of immediately increasing pressure.
  • Keep one-off projects on pay-as-you-go when volume is uneven.
  • Move predictable recurring work to monthly credits when the pattern is proven.
Server room representing delivery paths, routing and network infrastructure

03 / Target delivery and network

Find delivery failures first

Many scraping platforms collapse delivery issues into a vague request failure. In production, that is not enough. The team needs to know whether the request timed out, the upstream target returned a temporary server error, the connection failed, the response was too large, redirects went somewhere unexpected, or the page came back as tiny HTML with no useful content. ScraperFly turns those failures into delivery evidence: try the light profile first, compare status and response size, then decide whether the next request needs backoff, another route, premium proxy, country targeting, or a narrower capture.

timeout5xxredirectsresponse_too_large
  • Retry temporary network and upstream failures with a controlled backoff policy.
  • Compare final URL, status, content type and response size across samples.
  • Escalate routing only when the response proves the simple path is unstable.
  • Treat oversized responses as a scope problem before scaling the same profile.
Digital security screen representing anti-bot and protected access signals

04 / Anti-bot, geo and access blocks

Read blocks before escalation

A target 403, 401, 429, CAPTCHA screen, WAF challenge, login wall, consent loop, or region-specific mismatch is not just an error; it is a clue about what the site expects from the visitor. Competitors often push teams toward a heavier default profile, but that can burn budget without proving the fix. ScraperFly's better path is evidence-based escalation: preserve realistic headers when context matters, use sessions when continuity changes the response, enable rendering when the useful content is browser-built, and choose premium or country routing when reputation or geography changes the result.

403429CAPTCHAcountry mismatch
  • Use premium routing when IP reputation is the proven bottleneck.
  • Use country targeting when language, currency, inventory or search results change by market.
  • Use headers, cookies and sessions when visitor state changes the response.
  • Reduce concurrency and add backoff when repeated requests trigger target throttling.
Developer preparing code and output artifacts on a laptop

05 / Rendering and output quality

Ship usable artifacts

A 200 status is not the same thing as a usable scrape. The raw HTML can be an empty app shell, Markdown can miss the main article, JSON can lack expected metadata, text can include noise, screenshots can be blank, and PDF or image output can fail if the browser step times out. ScraperFly is valuable because the same API request can move from raw HTML to rendered DOM, clean text, Markdown, JSON, screenshot or PDF, then be checked against the artifact your product actually needs. That reduces glue code, failed imports, and expensive batch runs that only discover bad output after the fact.

render_timeoutbrowser_render_failedJSON fieldsPDF/image output
  • Enable rendering when raw HTML is only a shell and the useful content appears after JavaScript.
  • Validate text, Markdown and JSON against expected fields before batching.
  • Use screenshot or PDF output when visual proof or audit evidence matters.
  • Treat blank or partial artifacts as quality failures even when HTTP status is successful.
ScraperFly fit

Cleaner error recovery

ScraperFly helps teams decide what to fix, what to retry, and what to escalate without turning every scrape into the most expensive request profile.

Stable error shape

Use HTTP status and error code together so application logic can choose between fixing input, refreshing credentials, slowing down, retrying, or escalating delivery.

Retry only when it helps

Network failures, rate limits, and temporary server errors can use backoff. Invalid URLs, unsupported formats, and bad keys should be corrected once.

Cost-aware escalation

Start with the light request profile, then add rendering, premium routing, country, sessions, headers, waits, or visual capture only when the failure proves it.

Validate output before scale

Confirm the real artifact your product needs: HTML, text, Markdown, JSON, screenshot, or PDF, before copying the same profile across a large URL set.

Rendering cost

Keep React scraping affordable by proving rendering is necessary

Browser rendering is powerful, but it is not always required. ScraperFly lets teams start with lightweight capture and reserve heavier controls for pages where client-side rendering actually 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 React scraping 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 control React scraping cost

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.

React questions

Common questions about scraping React websites

Practical answers for teams deciding when React pages need rendering, how to choose output formats, and how to avoid making every request heavier than necessary.

React FAQ
Rendering

Raw HTML vs rendered DOM

React pages should be tested before rendering becomes the default.

Why are React websites harder to scrape?

Many React sites send a small HTML shell first and build meaningful content in the browser with JavaScript.

Should every React page be rendered?

No. Test raw HTML first and enable rendering when source evidence shows the useful content is missing.

Output

Choosing response formats

The rendered page can be returned in different shapes.

Which formats work after rendering?

Rendered HTML, text, Markdown, JSON metadata, screenshots, and PDFs can be used depending on the workflow.

Is rendered HTML always the best output?

No. Use rendered HTML for DOM parsing, Markdown or text for readable content, and visual files when humans need proof.

Controls

Waits, sessions, and routing

React failures often need better evidence, not blind retries.

When should I add wait timing?

Add wait timing when the rendered page captures before client-side data finishes loading. Keep the wait tied to a specific page type.

Can sessions or headers matter for React pages?

Yes. Use sessions for related requests with shared state and headers when legitimate request context changes the public response.

Limits

Scope and expectations

ScraperFly captures public page output; your app still owns extraction logic.

Does ScraperFly extract React state automatically?

No. ScraperFly captures public page output and response formats. App state extraction, field mapping, and normalization remain downstream.

How do I keep React scraping costs predictable?

Classify page types and reserve rendering, waits, visual files, sessions, and stronger routing for targets that prove they need them.