ScraperFlyAI-ready Web Data API

rendering

Web Page Screenshot and PDF API for visual proof

ScraperFly helps teams capture public pages as reviewable visual artifacts: screenshots for browser-state proof, PDFs for document-style archives, and rendering or routing controls when the target page needs them.

Visual proof

Capture the page state your team can review, share, and archive

Some public web workflows need more than parsed text. A support team may need to prove what a customer saw. A QA team may need a rendered page state. A compliance workflow may need a portable file. A product pipeline may need a visual record next to the machine-readable response.

ScraperFly lets developers capture screenshots and PDFs from the same request model used for HTML, text, Markdown, JSON metadata, rendering, routing, headers, sessions, and downloadable artifacts. Start with the page, choose the visual output, and add heavier controls only when the target proves they improve the captured result.

screenshotPDFrendered statedownloadable file
Team reviewing screenshot and PDF capture artifacts from a public web page

What is a web page screenshot and PDF API?

A web page screenshot and PDF API fetches a public URL, optionally renders it in a browser, and returns a visual file instead of only returning source markup or cleaned text. The output can be a screenshot that shows the rendered viewport, or a PDF that preserves a document-style representation of the captured page.

This kind of API is useful when the workflow needs evidence of appearance, layout, rendered content, page state, archive quality, or human review. It does not replace every parsing workflow. HTML, text, Markdown, and JSON metadata are usually better when machines need to extract or compare content. Screenshots and PDFs are better when people, audit trails, approvals, or QA processes need a file they can inspect.

Practical takeaway: use screenshot or PDF output when visual evidence changes the decision, and keep text-based formats for workflows that only need machine-readable content.

When should teams choose a screenshot?

Choose a screenshot when the exact rendered page state matters. Screenshots are strong for visual QA, page appearance checks, support evidence, monitoring snapshots, layout review, ads and landing-page validation, consent banner inspection, or confirming that JavaScript-loaded sections actually appeared in the browser. They give teams a quick visual record of what the page looked like at capture time.

A screenshot is not always the most efficient parser input. It is harder to query than HTML, text, Markdown, or JSON metadata. For machine-only extraction, capture structured response data first. For workflows where a human needs to see the result, screenshots add value because they preserve layout, visible modules, missing assets, overlays, and browser-rendered state that plain text may hide.

Visual need Screenshot is useful when Use another format when
Rendered state The page changes after JavaScript, lazy loading, or route hydration. Source HTML already contains every field your parser needs.
Layout QA The team needs to review visual modules, spacing, overlays, or missing assets. The workflow only compares text fields or metadata values.
Support evidence A file helps explain what was visible at a specific capture moment. The user-facing proof can be generated from stored structured data.
Monitoring sample Human review is needed for selected pages, anomalies, or escalations. Every page can be monitored through status, hashes, or extracted fields.
Visual audit Teams need a browser-like record for review, approval, or archive. The archive only needs cleaned text, Markdown, or source HTML.

When should teams choose a PDF?

Choose PDF output when the result needs to behave like a document. PDFs are useful for archives, approvals, compliance packets, customer handoff, internal review, invoices or policy pages captured from public sources, and workflows where the artifact may be stored, shared, attached, or reviewed outside the scraping system.

PDF capture is different from screenshot capture. A screenshot shows a visual viewport. A PDF is better when the page needs a portable document-style record. It can be easier to send through review workflows and easier to keep as a file artifact, but it is still heavier than lightweight text or metadata capture. Use it when the document output matters, not as a default parser input.

For a focused document workflow, the web page to PDF API page goes deeper. For screenshot-only use cases, the website screenshot API page is the narrower path. This page is the bridge for teams deciding between both visual outputs.

How does rendering affect screenshot and PDF output?

Rendering matters because screenshots and PDFs are visual outputs. If a public page depends on frontend JavaScript, the visual artifact may need browser execution before capture. Without rendering, the output could show an empty shell, placeholder content, missing product cards, unloaded route state, or a page that does not match what a user would see.

The practical workflow is to compare. Start with the lightest request. If the page is static and the visual output is complete, keep the request simple. If JavaScript builds the useful page state, enable rendering. If late content appears after browser load, use wait timing carefully. If the target response changes by region, header, session, or delivery path, add only the control that changes the captured result.

For browser-specific decisions, use the JavaScript rendering API guide. The core rule is the same: rendering should solve a demonstrated visual gap, not become a default tax on every capture.

How should developers choose between HTML, text, screenshot, and PDF?

The best output is the one your downstream workflow can use immediately. If the application parses fields, HTML or structured JSON context may be more useful than a file. If the content moves into an AI or review pipeline, Markdown or clean text may be cleaner. If the workflow needs proof of appearance, layout, rendered state, or a shareable artifact, screenshot or PDF output becomes the right choice.

Teams often overbuild visual capture because a file feels definitive. But if no person will review the file and no archive process needs it, visual output may add weight without improving the product. ScraperFly helps keep the decision explicit because screenshots, PDFs, HTML, text, Markdown, and JSON context can be tested as request profiles before production code is wired.

Output Best suited to Main advantage Trade-off
HTML Selectors, DOM structure, links, tables, metadata Preserves source structure for parsers Needs parsing and cleanup.
Text Search, lightweight analysis, simple content intake Compact and easy to process Removes most layout and DOM context.
Markdown AI ingestion, RAG, review, readable content workflows Keeps headings and links in readable form Not ideal for precise selector-based extraction.
JSON metadata Logging, routing decisions, response diagnostics Makes request context inspectable Does not replace target-specific extraction.
Screenshot Visual QA, support evidence, layout proof Shows what the rendered browser displayed Heavier and harder to query than text.
PDF Archives, approvals, portable records Creates a shareable document artifact Larger and less convenient for parsing.

What can go wrong with visual capture?

A visual file can be technically generated and still be the wrong artifact. The page might redirect to a login screen, load a consent overlay, show a regional variant, return a CAPTCHA, capture before lazy content appears, produce a blank browser state, or include a page width that does not match the expected viewport. These are not just file problems; they are request-profile problems.

ScraperFly gives teams a cleaner recovery path because the same API surface can adjust rendering, waits, headers, sessions, country targeting, premium routing, and output format. The useful question is not “Can we retry harder?” It is “Which piece of evidence shows what to change?” Status, final URL, response size, screenshot state, and rendered output all help the team decide the next request profile without blindly increasing cost.

How can teams keep visual capture cost predictable?

Visual artifacts are heavier than simple content responses, so they should be reserved for workflows where they create real value. Use screenshots for selected QA states, anomaly review, customer evidence, or visual monitoring samples. Use PDFs for archives, approvals, and document-style handoff. Keep large machine-only runs on HTML, text, Markdown, or JSON metadata when those formats answer the question more efficiently.

The best cost-control habit is classification. Separate pages that need source capture, pages that need rendered capture, pages that need visual files, and pages that need stronger delivery. Then apply those profiles consistently. The API Builder is the fastest way to test this before development, and the pricing page helps teams understand how output choice and request controls affect usage.

Practical takeaway: screenshots and PDFs are high-value outputs when they prove something text cannot, but they should stay tied to a clear review, archive, or QA need.

Screenshot and PDF API

Build a visual capture request before wiring browser infrastructure

Screenshots and PDFs turn rendered public pages into reviewable artifacts for QA, support, approvals, archives, and evidence workflows. ScraperFly keeps the capture path practical: test the URL, choose the file output, render when needed, and add heavier controls only when the page requires them.

IMG
Screenshot

Capture what the browser shows

Use screenshots for visual QA, rendered-state proof, support evidence, selected monitoring samples, and layout review.

format=screenshotrender
PDF
PDF

Preserve the page as a document artifact

Use PDF output for archives, approvals, compliance packets, customer handoff, and document-style review workflows.

format=pdfdownload
API
One workflow

Keep visual files tied to request evidence

Use the same URL testing, rendering, routing, header, session, and response-format decisions across content and file outputs.

waitcountryheaders

Controls that shape screenshot and PDF output

url

The public page being captured as a visual artifact.

format

Choose screenshot or PDF when visual proof is the desired output.

render

Run browser execution for pages that need JavaScript before capture.

wait

Let lazy content, overlays, or route state settle before the file is generated.

country

Capture the regional page state when geography changes content or redirects.

download

Return screenshot or PDF files as downloadable artifacts.

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"

Visual file fit

Confirm when the workflow needs a file instead of parsed text

Visual artifacts are strongest when layout, rendered state, proof, approvals, or archived records matter. Text, Markdown, JSON, and HTML remain lighter when the downstream system only needs machine-readable content.

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 screenshot or PDF capture

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.

Define the capture goal

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.

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.

Visual output cost

Use screenshots and PDFs where proof justifies the heavier capture

Visual file capture can save review and reporting work, but simple content extraction stays lighter. ScraperFly lets teams choose the output that matches the job instead of overbuilding every request.

01

Screenshot or PDF only when a file changes the workflow

Keep machine-only jobs on HTML, text, Markdown, or JSON context, and reserve visual files for review or proof.

02

Browser execution for pages that need it

Enable rendering when JavaScript changes the captured state, not just because screenshot or PDF output is available.

03

Let the page settle without guessing forever

Use waits for lazy content or route state, then keep the proven timing attached to that page type.

04

Escalate delivery only when evidence supports it

Use headers, sessions, country targeting, or premium routing when they change access, redirects, or the final visible page.

What makes screenshot and PDF capture 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 visual output 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.

Visual capture questions

Common questions about screenshot and PDF capture

Practical answers for teams deciding when visual files are worth using, how rendering changes capture quality, and how ScraperFly fits into QA, archive, support, and approval workflows.

Visual FAQ
OUTPUT

Choosing screenshot or PDF

The output should match the review or archive job.

When should I choose a screenshot?

Choose a screenshot when the team needs browser-state proof, layout QA, support evidence, selected monitoring samples, or a quick visual record of the rendered page.

When should I choose a PDF?

Choose PDF when the page needs to become a portable document for archive, approval, compliance review, customer handoff, or internal reporting.

RENDERING

Capturing the right page state

Rendering and wait controls help when the visual result depends on browser behavior.

Can ScraperFly capture JavaScript-rendered pages?

Yes. If frontend JavaScript changes the useful page state, ScraperFly can render the page before generating the screenshot or PDF.

What should I do if the screenshot is blank or incomplete?

Compare source and rendered output, inspect final URL and status, then adjust rendering, wait timing, headers, sessions, country targeting, or routing based on the evidence.

WORKFLOW

Where visual artifacts fit

Visual files complement content extraction; they do not replace every parser.

Are screenshots and PDFs good parser inputs?

Usually not. They are best for proof and review. Use HTML, text, Markdown, or JSON context when the workflow needs machine-readable content.

Does this replace a full monitoring platform?

No. ScraperFly captures the artifact and request evidence. Your application owns scheduling, diffing, alerting, storage, and business rules.

COST

Keeping capture practical

A clear capture profile keeps visual output useful without making every request heavy.

How can teams control screenshot and PDF costs?

Use visual output only when a file changes the decision, and add rendering, waits, regional routing, sessions, or premium delivery only when they improve the captured result.

Can I test the request before production?

Yes. Use API Builder to compare HTML, rendered output, screenshot, and PDF response shapes on real target pages before wiring the request into production.