ScraperFlyAI-ready Web Data API

proxies

Scraping API with country targeting for regional evidence

Many public pages change by country: availability, language, pricing context, redirects, cookie banners, and visible content can all vary by region. ScraperFly lets teams request regional delivery when that evidence matters, while keeping country targeting separate from generic proxy rotation, rendering, sessions, and unnecessary escalation.

Regional evidence

Fetch the market version the workflow actually needs

Country targeting helps teams see how a public page behaves from a selected regional context. The same URL can return different prices, availability, language hints, policy notices, redirects, cookie banners, product lists, search results, or visual layout depending on where the request appears to come from.

ScraperFly makes that regional signal part of a clear request profile. Start with a normal capture, compare it with a country-targeted sample, then keep the country parameter only when it changes the response in a way your product needs.

country contextregional comparisonresponse evidence
Team comparing regional public page responses with country targeting controls

What is country targeting in a scraping API?

Country targeting is a request control that routes a public page capture through a selected country context. It is useful when the page response depends on regional delivery, local availability, market rules, language defaults, redirect behavior, or visible page content. Instead of assuming one default location represents every user, a team can capture evidence from the market it actually needs to evaluate.

The key is to treat country as one signal, not the whole scraping strategy. A country parameter can influence what a target returns, but so can language headers, User-Agent, cookies, sessions, JavaScript rendering, consent state, and the target's own routing logic. Country targeting is strongest when it is tested next to a baseline response and kept as a documented part of the workflow only when it changes the result.

Practical takeaway: use country targeting to prove regional page behavior, not as a default upgrade for every public URL.

When does regional context change the page?

Regional variation is common in e-commerce, travel, marketplaces, real estate, search results, jobs, local services, media, public datasets, and compliance-heavy sites. A product page may show different stock, shipping messages, taxes, or currency context. A listing page may reorder results. A publisher may show different banners or navigation. A SaaS pricing page may change legal copy. A travel page may show availability that depends on market and language.

Those changes affect more than display. They can break parsers, change categorization, alter monitoring alerts, or make analytics compare two different page variants as if they were the same. Country targeting gives teams a controlled way to test whether the region is part of the data model.

For many simple pages, regional context changes nothing useful. In those cases, the practical choice is to keep the scrape light. ScraperFly's value is not forcing every request into a heavy route; it is letting developers add country targeting when the response proves that region matters.

How is country targeting different from rotating proxies?

Country targeting and rotating proxies often get mixed together, but they answer different questions. Country targeting asks, “what does this public page return from a selected country context?” Rotating proxies are a broader delivery pattern that may rotate network identity for reliability or distribution. A workflow can need one, both, or neither.

If the goal is market comparison, the country signal must be explicit and repeatable. Random rotation can make evidence harder to trust because the response may change between samples. If the goal is delivery reliability, broader proxy behavior may matter more than a specific regional view. ScraperFly works best when teams describe the intent first, then choose the request controls that match it.

Use the rotating proxy scraping API guide for rotation strategy and the premium proxy scraping API guide when the target requires stronger routing. Country targeting belongs where regional response evidence is the main problem.

What should teams compare across countries?

A country-aware workflow should compare the page as a response, not just as a screenshot or a status code. Start with a small list of representative URLs. Fetch each URL from the default context, then from the selected country context. Compare the response signals that matter to the downstream product before changing the parser or scaling the job.

Response signalWhat it can revealWhat to do next
Final URL and redirectsThe target may route visitors into a country path, market subdomain, consent flow, or fallback page.Store final URL with the sample and compare redirect behavior before parsing.
Status and response sizeA market may return a valid page, a block, a smaller fallback, or an empty shell.Compare status, size, content type, and body evidence across countries.
Language, currency, and labelsThe page may change visible copy, product labels, units, or currency context.Separate country behavior from Accept-Language and parser assumptions.
Availability and local noticesStock, shipping, legal copy, and policy banners may be market-specific.Capture fields that prove the market view your product needs.
Rendered outputRegional content may appear only after frontend JavaScript runs.Compare source HTML with rendered HTML, text, Markdown, screenshots, or PDFs.

How do country, language, headers, and sessions work together?

Country targeting is one part of request context. Accept-Language tells the target which language preference the client sends. User-Agent can affect device or browser-specific layout. Cookies and sessions can preserve consent, selected store, currency preference, or language state across related requests. Rendering can execute JavaScript that reads those signals and builds the final page.

The clean workflow is to test these controls separately before combining them. If country changes availability but not copy, add country context and keep language simple. If language changes text but the country does not matter, use Accept-Language header scraping instead of heavier regional routing. If a site changes layout by client, compare the User-Agent header. If a selected region or consent choice must persist across pages, use a session-aware scraping workflow.

Practical takeaway: keep each request signal visible so regional differences do not turn into guesswork.

Which output formats help prove regional differences?

HTML is best when a parser needs DOM structure, links, tables, metadata, schema, attributes, or embedded fields. Text and Markdown make visible regional copy easier to review, classify, summarize, or compare. JSON-oriented metadata helps logs and monitoring systems track final URL, status, content type, response size, and request options. Screenshots and PDFs are useful when a human needs visual proof of a regional page state.

Visual evidence can be especially helpful for country-targeted captures because many regional differences are visible rather than structural: banners, local notices, product availability labels, currency presentation, or page modules that appear only in one market. Use screenshots or PDFs when that proof matters, then keep machine parsing on the smallest output that serves the product.

For output decisions, compare options in the web scraping API response formats guide. When JavaScript changes the regional page after load, test with the JavaScript rendering API.

How should teams choose country targeting without wasting credits?

Country targeting can be economical when it replaces uncertainty. It becomes wasteful when teams apply it to every URL without proving that the response changes by region. Start with a baseline, test a few countries that matter to the product, and record which fields changed. If a page is identical across samples, keep it on the lighter request profile.

Workflow choiceUse it whenCost-control action
Default requestThe public page returns the same useful content across countries.Keep the workflow light and avoid regional routing.
Country targetingPrices, availability, redirects, copy, or notices differ by country.Apply country context only to URLs and markets that need it.
Country plus renderingRegional content appears after frontend JavaScript runs.Enable browser execution only after source HTML proves it is needed.
Country plus sessionsConsent, store, language, or currency choices need continuity.Scope sessions to related workflows instead of isolated captures.
Country plus visual outputReview, monitoring, compliance, or QA needs proof of page appearance.Generate screenshots or PDFs for records that require visual evidence.

Review ScraperFly pricing and the web scraping API credit cost calculator when comparing light and heavier request profiles. The cheapest reliable workflow is the one that captures the regional evidence your product actually uses.

Where should developers start?

Start in the API Builder with one public URL and a normal request. Capture the response, then add the country context and compare the output. If the final URL, visible content, response size, language, availability, or rendered page changes in a useful way, document that profile. If the response does not change, leave country targeting out of the production path.

For production, keep the request profile explicit: target URL pattern, selected countries, output format, rendering decision, session behavior, language header if used, and the response signals that prove the profile works. That gives developers and data teams a repeatable regional capture process instead of a fragile set of one-off proxy guesses.

Country targeting

Request the regional version of a page when location changes the content

Prices, availability, language defaults, compliance notices, redirects, and product catalogs can change by country. ScraperFly helps teams test regional behavior through a controlled API workflow instead of guessing from one default location.

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.

Regional fit

Check whether the target actually varies by country before scaling regional capture

Country targeting is most useful when the page returns different content, status, final URL, language, currency, stock, local notices, or access behavior by region. Compare samples first so routing becomes evidence, not habit.

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 country-targeted scraping

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 country behavior changes the request

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.

Regional request builder

Build country-aware scraping requests with clear output and routing choices

Choose the target URL, country context, output format, rendering behavior, and routing profile in one request shape. Compare samples before regional scraping becomes a production job.

GEO
Country

Capture the version users see in a selected market

Country targeting helps with regional prices, stock, language defaults, redirects, legal notices, and localized content.

countrymarket
CMP
Comparison

Compare response evidence across regions

Final URL, status, content type, response size, and output format make regional differences easier to trust.

statusfinal URLsamples
OUT
Output

Return the format that matches the regional workflow

HTML, text, Markdown, metadata, screenshots, and PDFs can all support different country-specific checks.

htmlmetadatascreenshot

Controls that shape country-targeted scraping

url

The public page being tested by region.

country

The target market or geography for the request.

format

The response shape used for regional comparison.

render

Browser execution when localized content appears after JavaScript.

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"

Regional cost

Use country targeting where it changes the result, not on every request

Regional routing is valuable when market differences matter. For pages that do not vary by location, lighter profiles keep scraping cheaper and simpler. Add rendering, sessions, screenshots, PDFs, or stronger routing only when regional samples prove they are useful.

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 country-targeted 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 regional scraping 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.

Country FAQ

Common questions about country-targeted scraping

Regional scraping works best when teams compare evidence, keep controls separate, and scale only the country-specific profiles that change the response.

Regional answers

Regional response context

Use country targeting when a selected market changes what the public page returns.

What can change by country?

Prices, availability, language defaults, redirects, legal notices, search results, banners, and visual page modules can all vary by market.

Should country be the default?

No. Keep simple pages on a simple profile and add country context when samples show the response changes.

Country versus proxy rotation

Country targeting is a market signal; rotation is a broader delivery behavior.

Is country targeting proxy rotation?

No. Country targeting chooses a regional context. Rotation changes delivery identity and may not preserve a specific market view.

When do I need stronger routing?

Use stronger routing when normal delivery does not return a usable regional response and the evidence justifies escalation.

Regional proof

Choose output based on whether machines or people need to compare the result.

Which format should I use?

Use HTML for parser structure, text or Markdown for readable comparison, metadata for diagnostics, and screenshots or PDFs for visual proof.

Can I combine country with rendering?

Yes. Use rendering when the regional content appears after browser-side JavaScript runs.

Cost control

Regional workflows stay practical when the heavier profile is limited to pages that need it.

How do I test before scaling?

Compare a baseline and country-targeted capture across representative URLs before applying regional routing to a larger batch.

What should logs store?

Store country context, final URL, status, response size, output format, rendering state, and the fields that changed by region.