ScraperFlyAI-ready Web Data API

proxies

Rotating Proxy Scraping API for resilient public fetches

ScraperFly helps teams fetch public pages with a practical routing path: start with a light request, inspect real response evidence, then add premium routing, country targeting, sessions, headers, or rendering only when they improve the result.

Proxy routing

Choose stronger delivery only when the target proves it matters

Proxy rotation is valuable when public targets respond differently by route, reputation, region, session continuity, or request pressure. It is also easy to overuse. If every scrape starts with the heaviest route, teams pay more before they know whether the target actually needed that path.

ScraperFly gives teams a practical routing workflow: start with a light request, inspect the response evidence, then add premium routing, country targeting, sessions, headers, rendering, waits, screenshots, or PDFs only where they improve the result. The goal is not more proxy movement. The goal is a cleaner public page capture with fewer blind retries and more predictable cost.

simple firstrouting evidencecontrolled escalation
Developer testing proxy routing controls and response evidence in a web scraping API builder

What is a rotating proxy scraping API?

A rotating proxy scraping API fetches public web pages through a managed request layer that can change delivery routes when the target response requires it. Instead of wiring a raw proxy pool into every scraper, the application sends a target URL and request options to one API. The API returns the response in a usable format, while response metadata helps the team understand what happened.

For ScraperFly, proxy routing is one part of a wider capture workflow. A request can stay simple for public pages that return clean HTML. It can add premium routing for harder targets, country targeting when regional context matters, sessions when continuity changes the response, and browser rendering when JavaScript builds the useful page state.

Practical takeaway: use rotating proxy behavior as a measured routing control, not as a default replacement for understanding the target.

When do scraping jobs actually need proxy rotation?

Proxy rotation helps when the delivery path changes the public response. That can happen when a target throttles repeated requests, returns different content by region, behaves differently under a stable session, or responds better through a stronger route. Rotation can also help spread request pressure across a workflow when the target is sensitive to repeated access from one route.

But proxy rotation does not fix every scraping problem. A malformed URL, missing API key, unsupported output format, empty JavaScript shell, too-short render wait, oversized response, redirect loop, or parser bug will not become a good scrape just because the request moves through another route. Those problems need diagnosis, not more rotation.

Response evidenceLikely meaningBetter next action
Clean 200 response with useful HTMLThe light path is already enoughKeep the simple request profile.
Repeated 403 or challenge pageThe target may resist the current routeTest stronger routing after confirming the request is valid.
429 or throttling patternRequest pressure may be too highUse backoff, reduce concurrency, then consider route changes.
Different content by countryThe public page varies by regionUse country targeting for regional samples.
Empty shell but rendered page has contentJavaScript builds the useful stateUse rendering before blaming the proxy route.
Redirects to unexpected pagesTarget rules, locale, consent, or route state may differCompare final URL, headers, cookies, country, and session behavior.

How is proxy routing different from premium routing?

Proxy routing is the broad delivery idea: the request can move through managed network paths instead of relying on one direct route. Premium routing is a stronger escalation option for public targets that do not respond well to the simple path. Country targeting is a regional delivery control. Sessions keep continuity across related requests. Headers and cookies carry legitimate request context. Rendering executes browser JavaScript.

These controls often work together, but they solve different problems. Premium routing is not the same as country targeting. A session is not the same as rotation. Rendering is not a proxy fix. Good scraping architecture keeps those choices visible so a team can explain why a request profile exists.

ControlUse it whenDo not use it as
Simple requestThe target returns useful content without stronger deliveryA sign that the workflow is incomplete.
Premium routingSimple delivery repeatedly fails after the request is validatedThe first step for every public page.
Country targetingThe response changes by region, language, currency, or availabilityA generic anti-blocking switch.
SessionsRelated requests depend on shared state or continuityA replacement for routing evidence.
Headers and cookiesThe public response depends on accepted request contextA way to promise private access.
JavaScript renderingThe useful content appears after browser executionA proxy strategy.

What response evidence should guide proxy routing?

The best routing decisions come from response evidence, not from guesswork. Status code, final URL, response size, content type, response body, redirect path, timeout behavior, route country, session state, and screenshot output can all show whether the target needs stronger delivery or a different request profile.

A single failed request rarely proves much. A small sample across route types is more useful: one light request, one request with the needed headers, one rendered request if the page is JavaScript-heavy, one country-targeted request if region matters, and one premium route only if the simpler tests do not return a usable response. That sequence keeps debugging clear.

Use the API Builder to test the request shape before moving it into production. If the page needs browser execution, compare the result with the JavaScript rendering API path before treating the issue as purely proxy-related.

How does ScraperFly reduce proxy infrastructure work?

A raw proxy setup can give a team network access, but it does not usually solve the rest of the scraping workflow. The team still has to maintain request construction, output formats, rendering, retries, headers, cookies, screenshots, PDFs, logging, response diagnostics, billing rules, and operational recovery. That is a lot of glue around every target.

ScraperFly packages the capture layer as an API workflow. Developers can request HTML, clean text, Markdown, JSON metadata, screenshots, or PDFs; add rendering when the page needs browser execution; add sessions or headers when continuity or request context matters; and add routing strength only when response evidence supports it. The team can focus on deciding what data matters instead of rebuilding capture infrastructure for every job.

How can proxy scraping stay cost-predictable?

Cost control starts by matching request weight to the target. A simple public page should not carry the same profile as a rendered browser request with premium routing, session continuity, visual output, and retries. The right process is to classify targets, keep easy pages light, and reserve stronger routing for pages that prove they need it.

ScraperFly's billing path supports that kind of testing. Start with free credits, buy credits for uneven projects, and move to monthly credits when recurring demand becomes predictable. The team can estimate cost from real samples instead of buying a broad proxy setup before the workload is understood.

Review pricing after sampling representative targets. For stateful workflows, compare with web scraping API sessions. For request context, see custom headers for scraping API requests. For regional pages, use country targeting; for harder targets, use premium routing only where the evidence supports it.

Where should a team start?

Start with one real public target URL and the lightest request profile. Check the status, final URL, response size, content type, and body. If the response is useful, keep that profile. If the response is blocked, empty, regional, unstable, or incomplete, change one control at a time and record what improved the result.

That approach makes rotating proxy scraping more practical. The team can explain why a target uses a simple route, a country route, a premium route, a session, rendering, or visual output. It also makes production recovery easier because the next action follows the evidence already captured by the request.

Rotating proxies

Rotate delivery paths when the target proves one route is not enough

Some targets tolerate simple requests. Others start returning blocks, throttles, regional variants, or unstable responses when volume increases. ScraperFly helps teams begin with the light path, read the response evidence, and use stronger routing only for targets that need it.

A simple HTTP request returning a clean HTML response
01

Plain HTML request

Use this first for public pages that already include the required data in the initial HTML.

A page changing from an empty HTML shell to a rendered DOM after JavaScript runs
02

JavaScript rendering

Enable rendering when the server returns a shell, but the useful page content appears only after JavaScript executes.

Headers, cookies and session state preserved across two requests
03

Headers, cookies & sessions

Use visitor-state controls when the target expects continuity between requests or returns different content after consent, locale, or navigation state is set.

A request routed through a selected country and higher reputation proxy path
04

Premium proxy & geo

Escalate routing when the response depends on request origin, IP reputation, or target geography.

A browser automation flow with search, filters, scrolling and data capture steps
05

Browser flow

Use a full browser flow when the data is behind interaction rather than a single request: search boxes, filters, scrolling, tabs, or multi-step navigation.

Escalate when:

01

Plain HTML request

the raw response contains the fields you need, status codes are stable, and page size/content do not collapse after repeated checks.

  • Product details, article text, documentation, or listings are visible in the HTML response.
  • The final URL, status, and content length stay consistent across a small sample.
  • No consent wall, visitor state, or client-side API call is required for the target fields.
02

JavaScript rendering

the raw HTML is mostly placeholders, the rendered DOM contains the target fields, or key data arrives through client-side requests.

  • Raw HTML has app containers, loading skeletons, or empty product grids.
  • Browser inspection shows the fields after scripts finish.
  • Screenshots look correct while the HTML response alone is incomplete.
03

Headers, cookies & sessions

pagination, reviews, filters, or consent flows depend on the same visitor context across multiple requests.

  • The first request sets cookies that change later responses.
  • Locale, consent, currency, cart, or filter state must be preserved.
  • The page redirects or empties out when requests look stateless.
04

Premium proxy & geo

the same URL behaves differently by region, returns 403/429 from one route, or shows location-specific pricing, availability, SERP, ads, or catalog data.

  • Datacenter-like traffic receives blocks while a higher-reputation route works.
  • Country, language, currency, inventory, or search results change by geo.
  • Repeated requests trigger rate limits or challenge pages on specific routes.
05

Browser flow

the target data appears only after user-like navigation steps, or protected areas such as reviews, profiles, search result refinements, or special data panels behave differently from simple detail pages.

  • A click, scroll, search, or filter action is required before the fields appear.
  • Reviews, profiles, or dynamic result pages load in separate steps.
  • Simpler fetch/render attempts return partial content, challenge pages, or unstable states.

Stay lower & Credit impact:

01

Plain HTML request

Stay lower: the page already returns complete data. Adding rendering or premium routing here only adds latency and credit usage without improving the result.

Credit impact: lowest request profile because it avoids browser work and special routing.

02

JavaScript rendering

Stay lower: the fields are already present in raw HTML. A modern-looking site does not automatically mean JavaScript rendering is needed.

Credit impact: higher than plain HTML because browser work, wait time, and page resources are involved.

03

Headers, cookies & sessions

Stay lower: public content is stable without state. Do not invent sessions for pages that can be fetched cleanly as anonymous HTML.

Credit impact: usually moderate; the bigger cost is operational complexity and retry discipline.

04

Premium proxy & geo

Stay lower: the target is globally consistent and accepts normal routing. Premium and geo routing should be tied to evidence, not used as a default blanket setting.

Credit impact: can increase credit usage and latency, so apply it to the URL groups that actually need it.

05

Browser flow

Stay lower: a single HTML or rendered request already returns the target. Browser flows are the strongest tool in this ladder, not the default starting point.

Credit impact: highest request profile because it combines browser runtime, waits, navigation, and often heavier routing.

Escalate by evidence, not by habit

  • For most public websites, a plain HTML request or light JavaScript rendering is enough. Start there, inspect the response, and only then decide whether the next step is justified.
  • Anti-bot signals are usually visible in the response: unexpected 403 or 429 statuses, sudden redirects, tiny or empty HTML, challenge pages, CAPTCHA screens, login or consent loops, and content that disappears after repeated requests.
  • Large high-traffic targets such as Amazon, Google, LinkedIn, Instagram, TikTok, and major marketplaces often protect some surfaces aggressively. They may require rendering, sessions, careful routing, or a browser flow, and each target needs its own test profile.
  • Protection is not uniform even inside one site. Product/detail pages may open with a lighter profile, while reviews, profiles, search pages, price-sensitive views, availability panels, or account-adjacent data can require stronger escalation.
  • Geo and premium proxy settings affect both what you receive and how expensive the request profile becomes. Use them when country-specific content, IP reputation, or repeated blocks prove they matter.
  • The practical goal is not to turn on every ScraperFly control. The goal is to find the sufficient level that returns complete, repeatable data while keeping credit usage, latency, and failure modes under control.

Proxy fit

Check target behavior before making proxy rotation the default

Proxy strategy depends on status codes, response size, final URL, geography, rate limits, block pages, concurrency, session behavior, and how the target reacts across repeated samples.

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 rotating proxy usage

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 target resistance changes routing 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.

Proxy request builder

Build scraping requests that add routing strength only when response evidence justifies it

Start with a simple request, then add premium routing, country targeting, sessions, headers, or slower retry behavior when the target shows blocks, instability, or regional differences.

BASE
Simple path

Try the light route first

Many public pages scrape cleanly without heavier proxy controls, especially during early validation.

basiclow cost
ROUTE
Rotation

Escalate routing for resistant targets

Rotating delivery helps when repeated samples show blocks, throttling, regional variance, or unstable responses.

premiumcountryretry
LOG
Evidence

Use response signals to tune the next request

Status, final URL, response size, content type, and errors reveal whether routing or request pressure needs adjustment.

status5xx403

Controls that shape rotating proxy scraping

url

The public target page being fetched.

premium

Stronger routing for targets that resist simple delivery.

country

Regional routing when content varies by location.

session

Stateful delivery when continuity matters across requests.

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.

Routing cost

Keep proxy spend tied to targets that prove they need stronger delivery

Rotating and premium routes are useful for hard targets, but simple pages stay more affordable on lighter profiles. ScraperFly makes that choice visible before teams scale volume.

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 proxy 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 keep routing spend 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.

Proxy questions

Common questions about rotating proxy scraping

Practical answers for teams deciding when routing, premium delivery, country targeting, sessions, headers, and rendering actually improve public page capture.

Proxy FAQ
Routing

When proxy routes help

Use routing when the delivery path changes the public response.

Should I rotate every request?

No. Keep easy pages on the light path and rotate only when response evidence proves the target benefits from a different route.

What evidence matters most?

Status, final URL, response size, content type, body shape, redirects, timeouts, and repeated samples show whether routing changes the result.

Escalation

Premium and country routing

Stronger routes should solve specific target behavior, not become a default tax.

When do I use premium routing?

Use premium routing after a valid simple request repeatedly fails or returns unusable block behavior.

When do I use country targeting?

Use country targeting when the public page changes by region, language, currency, availability, redirects, or compliance context.

Context

Sessions, headers, and rendering

Not every delivery problem is a proxy problem.

Are sessions the same as proxy rotation?

No. Sessions keep state across related requests. Proxy routing changes the delivery path. They can work together, but they solve different problems.

Can rendering be needed too?

Yes. If JavaScript builds the useful page state, render the page before treating empty HTML as a routing failure.

Cost

Predictable proxy spend

The right route is the lightest route that produces useful evidence.

How do I avoid overpaying?

Classify target types, keep simple captures simple, and reserve premium routes, sessions, visual files, and rendering for pages that prove they need them.

Where should I test the request?

Use the API Builder with one real public URL, then copy the proven request profile into your app, cURL, Python, Node.js, or monitoring job.