ScraperFlyAI-ready Web Data API

main

How ScraperFly works

ScraperFly turns public page capture into a controlled API workflow: send a target URL, inspect what comes back, add only the request controls that matter, and return the result in the format your product can use.

ScraperFly is built around a practical scraping workflow, not around forcing every page into the heaviest possible request. A team starts with a target URL and a simple capture profile, checks the response evidence, then decides whether the page really needs browser rendering, sessions, custom headers, country routing, premium delivery, screenshots, PDFs, or another output format.

That matters because public pages behave differently. Some return useful HTML immediately. Some load important content through JavaScript. Some depend on language, cookies, region, or request context. Some fail because the URL, key, format, or account state is wrong. ScraperFly keeps those choices visible so developers can fix the right problem instead of retrying blindly.

The result is a cleaner path from first test to production: validate the target, keep simple pages affordable, escalate hard pages with evidence, and ship data into parsers, monitoring systems, AI pipelines, archives, or QA workflows without maintaining the whole scraping infrastructure yourself.

Step 1

Send the target URL and choose the first output

Every ScraperFly workflow starts with the public page you want to fetch. For the first test, the best request is usually the lightest one that can prove the page: a target URL, an output format, and only the controls you already know are necessary.

If the source HTML contains the useful content, there is no reason to begin with a browser session. If the product needs readable text, Markdown, JSON metadata, a screenshot, or a PDF, choose that output deliberately. The API Builder is useful here because it shows the request shape before you wire it into code, Postman, cURL, a backend job, or an agent workflow.

  • Start with the target URL and the smallest useful response format.
  • Use source HTML first when the markup already contains the data.
  • Add rendering, waits, headers, sessions, or routing only after the response proves they help.
  • Keep the tested request profile as the production baseline.

Step 2

Inspect the response before changing the request

A failed or incomplete scrape should not immediately become a heavier scrape. First, inspect what actually happened. The status code, final URL, content type, response size, source HTML, rendered output, and visual evidence can tell you whether the page is empty, blocked, redirected, delayed, too large, or simply missing the data your parser expected.

This evidence-based step is where ScraperFly is strongest. Instead of treating every issue as a generic scraping failure, the workflow separates configuration mistakes, target behavior, rendering needs, access blocks, network problems, and output-format decisions.

SignalWhat it helps you decide
HTTP statusWhether the request reached the target, hit a block, or received an upstream error.
Final URLWhether redirects changed the page, region, login state, or intended target.
Response sizeWhether the page is empty, unusually small, unexpectedly large, or close to normal.
Source vs rendered HTMLWhether JavaScript execution changes the useful content.
Screenshot or PDFWhether the visual page matches what the workflow expects.

Step 3

Use browser rendering when it changes the captured page

JavaScript rendering is valuable when the source HTML is only a shell and the browser creates the useful content after page scripts run. ScraperFly can execute the page in a browser and return rendered HTML, text, Markdown, JSON metadata, screenshots, or PDFs from the rendered state.

The important rule is simple: rendering should solve a proven content gap. If the source HTML already contains the data, keeping the request simple usually improves speed, cost, and operational clarity. If the page needs rendering, the same API path can add it without changing the whole integration model.

  • Use rendering for JavaScript-built product data, article content, search results, dashboards, or SPA pages.
  • Compare raw and rendered output before making browser execution the default.
  • Add wait timing only when the useful content appears late after initial render.
  • Return the rendered result in the format your downstream workflow actually needs.

Step 4

Preserve request context when the target expects it

Some public pages behave differently depending on legitimate request context. A language header can affect localized content. Cookies can preserve consent or preferences. Sessions can keep related requests consistent. Country routing can show the page as it appears in a specific region.

ScraperFly keeps those controls explicit. That makes the request easier to debug because every added option has a reason. It also prevents the common mistake of turning all targets into the same expensive profile when only a few pages need extra context.

ControlUse it when
HeadersThe target expects accepted language, content type, user-agent, referer, or similar request context.
CookiesThe workflow needs preferences, consent state, or target-provided state.
SessionsSeveral related requests must keep cookies or routing context consistent.
Country routingThe public content changes by location, availability, currency, language, or regulation.

Step 5

Escalate delivery with evidence, not guesswork

Hard targets may return 403 responses, 429 rate limits, challenge pages, redirects, temporary 5xx errors, tiny HTML shells, or pages that differ by network profile. ScraperFly helps teams treat those signals as evidence for the next request decision.

Instead of retrying the same broken profile or immediately switching every request to premium delivery, use the response evidence to decide what changed: the target may need backoff, rendering, a session, headers, a country-specific view, or stronger routing. That keeps costs aligned with the actual difficulty of the target.

  • Retry temporary network and upstream failures with controlled backoff.
  • Use premium or country routing when access evidence points to delivery path issues.
  • Treat invalid URLs, unsupported formats, and authentication problems as configuration fixes, not retry work.
  • Escalate only the targets that prove they need a stronger profile.

Step 6

Return the response in the format your product can use

A scrape is not finished when a page is fetched. The response still has to fit the system that consumes it. ScraperFly can keep the response close to the source page, convert it into cleaner content, or capture visual artifacts when proof matters.

Choosing the right output format reduces glue code. Parsers may need HTML. AI and RAG pipelines often prefer Markdown or clean text. Monitoring and debugging benefit from metadata. QA, compliance, and archiving may need screenshots or PDFs.

Workflow needUseful ScraperFly output
DOM parsing, selectors, links, tables, attributesRaw or rendered HTML
Search, classification, indexing, lightweight analysisClean text
AI prompts, RAG ingestion, content reviewMarkdown
Logging, diagnostics, routing decisionsJSON metadata
Visual QA, monitoring, approvals, archivesScreenshot or PDF

Step 7

Move the proven request into production

Once the request profile is proven, the same shape can move into production code. Developers can use the generated request in a backend service, worker, scheduled job, monitoring system, agent, or data pipeline. The production profile should stay as small as the target allows and only include controls that have already shown value.

From there, logs and status checks help teams monitor how requests behave over time. If a target changes, the workflow stays diagnosable: inspect the response, compare evidence, adjust the profile, and keep the production path clear.

  • Copy a tested request shape from the API Builder, cURL, or Postman workflow.
  • Keep simple targets on simple profiles to protect speed and credits.
  • Monitor failures by type so retries and escalations stay controlled.
  • Review output format choices before building converters around the wrong response.

Why it works

A cleaner path from first test to reliable web data

ScraperFly is useful because it keeps the scraping decision path practical. You can start free, test real targets, buy credits when project work needs them, and move to monthly credits only when recurring demand is clear. The API does not force every page into the same heavy workflow.

For teams, that means less infrastructure to maintain and fewer blind decisions. The request tells you what happened, the controls let you respond deliberately, and the output formats help your product use the captured page without building every converter, browser worker, proxy layer, and retry system from scratch.

Workflow questions

Common questions about how ScraperFly works

Practical answers for teams testing public URLs, choosing request controls, inspecting response evidence, and moving a proven ScraperFly request into production.

Workflow FAQ
Start

First request

Start light, inspect the target, and only add controls when the response proves they matter.

What do I send to ScraperFly first?

Send the public target URL and choose the smallest useful output format. For many pages, a basic HTML request is enough for the first test.

Should I start with browser rendering?

Usually no. Start with source HTML, then enable rendering only when JavaScript execution changes the useful captured content.

Evidence

Reading the response

Response evidence helps separate target behavior from configuration, delivery, and output-format decisions.

What should I inspect after a test request?

Check status, final URL, content type, response size, source HTML, rendered output, and visual files when screenshots or PDFs are enabled.

How do I know rendering helped?

Compare the source response with the rendered response. Rendering is justified when the browser state contains useful content missing from raw HTML.

Controls

Choosing request options

Controls should solve observed problems, not become a hidden default for every page.

When should I use sessions or headers?

Use sessions when related requests need shared state. Use headers when the target expects legitimate context such as language, content type, user-agent, or referer.

When should I use stronger routing?

Use premium or country routing after status, region, redirect, or access evidence shows that the default delivery path is not returning a usable public page.

Production

Moving the request live

A proven request profile should stay small, explainable, and easy to monitor once it moves into code.

Can I test before writing integration code?

Yes. Use API Builder, cURL, or Postman to validate URL, format, rendering, routing, and output choices before wiring the request into production.

What should production keep from the test?

Keep the smallest request profile that returned complete data, then monitor failures by type so retries and escalations stay controlled.