ScreenshotNeo

BlogHow-to

How to Take Website Screenshots from Different Countries

Learn how to capture a website with Playwright using browser geolocation, locale, and timezone—and when you need a connection from the target country.

By the ScreenshotNeo team29 September 202610 min read

How to Take Website Screenshots from Different Countries

To take a website screenshot under another country’s conditions, first decide what “country” means for the behavior you’re checking. Use Playwright browser geolocation to test a page that asks for the visitor’s location, locale and timezone to test language and time presentation, and an authorized network connection whose IP egress is in the target country to test IP-based targeting. These are separate inputs; setting browser coordinates does not route traffic through that country.

This guide shows a repeatable Playwright workflow, explains the limits of each method, and includes cURL, Python, and Node.js examples for capturing a page with ScreenshotNeo. For the underlying Playwright options, see its emulation guide, test configuration reference, and visual comparison guide.

1. Identify which country signal you need to test

A website may personalize content based on several independent signals. Before capturing, write down the behavior you expect and the signal that should trigger it.

Browser coordinates and network egress are separate inputs; test the one the site actually uses.
Browser coordinates and network egress are separate inputs; test the one the site actually uses.
Signal What it can affect What a screenshot establishes
Browser geolocation Features that call the browser geolocation API, such as a location prompt or nearby results How the page renders when the browser reports specified coordinates and permission is granted
Locale Language negotiation and locale-sensitive formatting How the page renders with the browser configured for a locale
Timezone Browser-side date and time presentation How the page renders with a specified browser timezone
Network egress Content selected from the connection’s IP address, such as region-based access or offers How the page responds to traffic from the test connection’s egress, if that connection is actually in the target country
Viewport and device Responsive layout and device-specific presentation How the page lays out at the configured viewport and device profile

Playwright documents browser-context controls for geolocation, locale, timezone, viewport, and device characteristics. Those controls emulate browser settings; they do not establish that requests leave from the selected country. That distinction follows from the documented scope of the controls. If you do not know which signal the site uses, test each relevant one separately and label the results.

2. Set up a reproducible Playwright capture

The example below uses Node.js and Playwright. It creates a fresh context, grants geolocation permission, sets coordinates, locale, timezone, and viewport, then saves a full-page PNG. Change the coordinates and browser settings to match the test case. The example coordinates are in New York City; they are only a browser location setting, not a network route.

  1. Install Node.js, then create a project and install Playwright.
  2. Save the script as screenshot-country.js.
  3. Replace the URL and test settings, then run it with Node.
npm init -y
npm install playwright
npx playwright install chromium
const { chromium } = require('playwright');

(async () => {
  const browser = await chromium.launch({ headless: true });
  try {
    const context = await browser.newContext({
      geolocation: { latitude: 40.7128, longitude: -74.0060 },
      permissions: ['geolocation'],
      locale: 'en-US',
      timezoneId: 'America/New_York',
      viewport: { width: 1440, height: 900 },
      deviceScaleFactor: 1
    });
    const page = await context.newPage();
    await page.goto('https://example.com', {
      waitUntil: 'networkidle',
      timeout: 60000
    });
    await page.screenshot({ path: 'country-view.png', fullPage: true });
    await context.close();
  } finally {
    await browser.close();
  }
})().catch(error => {
  console.error(error);
  process.exitCode = 1;
});

Run the script with node screenshot-country.js. Use a real page that asks for location when testing the permission flow; a generic page may never call the geolocation API. Granting permission allows the page to receive the configured coordinates when it requests them.

3. Configure coordinates, locale, timezone, and device deliberately

Playwright’s browser context is the useful boundary for an isolated scenario. Keep each country or locale scenario in its own context so that permissions, cookies, and storage from one run do not bleed into another. You can also set relevant options at test or project scope in Playwright Test configuration.

Geolocation and permissions

Set latitude and longitude in the context’s geolocation option and grant the geolocation permission. A permission alone does not supply useful coordinates; coordinates without permission may not be available to a page that requests them. Test both the granted and denied flows if your product handles them differently.

Locale and timezone

Set locale to the language/locale under test, for example fr-FR, and timezoneId to a supported timezone identifier such as Europe/Paris. Locale may affect language preferences and formatting. Timezone affects the browser context; it does not change the timezone of the test runner. If your page also renders server-generated dates, inspect whether the server is using a separate signal.

Viewport, device, and scale

Choose the same viewport and device profile for every comparison. A desktop viewport and a mobile profile can trigger different page layouts regardless of location. Device scale can also affect screenshot pixel dimensions. Avoid changing these values between baseline and candidate captures unless responsive behavior is part of the test.

Repeatable page state

Use the same URL, account state, consent state, browser version, and capture timing for comparisons. Decide whether you need a signed-in or signed-out page and whether the site should start with a clean session. Reusing the same context can preserve cookies and local storage; a new context gives you an isolated browser session. There is no universal wait duration that guarantees every site is ready. Wait for a page-specific selector when a known element signals readiness, or choose a deliberate delay for a known animation or delayed widget.

4. Test IP-based country behavior with a country-origin connection

If a site chooses content from the request’s IP address, browser geolocation emulation is insufficient. Use an authorized test environment or connection whose network egress is in the target country, and verify the route independently. Playwright’s browser emulation documentation describes browser settings; it does not provide or validate a proxy, guarantee a particular provider’s coverage, or prove that a website will classify an IP as expected.

Keep the variables separate. First capture with your usual network and the target browser settings. Then change only the network egress while holding URL, browser, locale, timezone, viewport, session, and timing constant. If both browser coordinates and egress change at once, a changed page does not tell you which signal caused it.

Follow the site’s terms and your organization’s rules when choosing a test connection. Some sites use multiple signals, cached decisions, account country, or an explicit region selector. A successful request through a country egress is evidence of that test route’s result at that time; it is not a guarantee that every visitor in that country will see identical content.

5. Capture and compare screenshots consistently

For visual testing, save the screenshot with enough context to reproduce it. Playwright screenshot assertions can compare a capture with a baseline, but rendering can vary with operating system, browser version, hardware, power state, and headless mode. Keep the capture environment consistent and investigate diffs that may come from environment changes before treating them as product regressions.

Hold browser and session settings steady so country comparisons remain interpretable.
Hold browser and session settings steady so country comparisons remain interpretable.

For each image, record:

  • Exact URL and capture date/time in UTC.
  • Target country and whether it was represented by browser coordinates, locale/timezone, network egress, or a combination.
  • Coordinates and permission state when browser geolocation is involved.
  • Locale, timezone, viewport, device profile, and scale factor.
  • Browser and version, operating system, and headless or headed mode.
  • Session state, including authentication and consent, plus any readiness selector or wait condition.

These labels make later comparisons interpretable. Without them, two images that look different may simply represent different browser, network, or session conditions.

6. Choose the right capture method

Method Best for Limitation
Manual browser inspection One-off visual review and exploratory checks Harder to repeat unless settings and session are recorded
Playwright with browser emulation Automated checks for geolocation API, locale, timezone, and layout Does not by itself change network egress; host environment can affect rendering
Authorized country-origin test connection IP-based region behavior Requires a working, permitted route; the test must verify its actual egress
ScreenshotNeo Capturing pages through a screenshot API or an MCP client A screenshot API call alone does not establish that its network request originated in a particular country

ScreenshotNeo is a website screenshot API and MCP server from Yorker Media. It accepts a URL and returns PNG, JPEG, WebP, or PDF. Its parameter names also work with names used by other screenshot APIs, which can simplify switching. Use a separately verified country-origin connection when the test depends on IP-based targeting; do not infer network location from a screenshot alone.

7. Or skip the browser setup

For a straightforward page capture, ScreenshotNeo takes one GET request. Its screenshot options include viewport and device presets, full-page capture, wait conditions, and custom headers and cookies. Check the ScreenshotNeo API documentation for current request details. This basic request captures the example URL:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests

r = requests.get(
    "https://api.screenshotneo.com/v1/shot",
    params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
    timeout=90,
)
r.raise_for_status()
with open("shot.webp", "wb") as image:
    image.write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
const image = Buffer.from(await res.arrayBuffer());
await import('node:fs/promises').then(fs => fs.writeFile('shot.webp', image));

ScreenshotNeo accepts cookie and consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients. The free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots. These capture and billing features do not mean the request is routed through a target country.

Sign up for 1,000 free screenshots a month, with no card required.

8. Troubleshooting

Symptom Likely cause Fix
Page reports location unavailable Coordinates are missing, invalid, or geolocation permission was not granted Set latitude and longitude in the context and grant geolocation permission before navigation.
Page still shows the home-country offer The site targets by IP, account, cookie, or another server-side signal Test with an authorized target-country egress; isolate account and cookie state and record each condition.
Language does not change The site may use an explicit language choice, account preference, URL path, or server setting Check the site’s language selector and URL behavior. Configure locale, then verify which input actually controls the page.
Time or date is unexpected Browser timezone differs from runner timezone, or the page uses server-rendered time Set timezoneId on the browser context and inspect client-side versus server-side rendering.
Navigation times out at networkidle Long-lived analytics, polling, or streaming requests keep the network active Use a page-specific readiness selector or a suitable load condition, then wait explicitly for the content you need.
Screenshot differs across runs Browser, OS, hardware, headless mode, viewport, session, animation, or dynamic content changed Pin the environment and settings, stabilize the page state, and record the browser/runtime details.
Image is unexpectedly tall or clipped Full-page capture interacts with sticky elements, lazy loading, or page-specific scrolling behavior Confirm the desired scope, wait for lazy content, and compare full-page with viewport-only capture.
Country test works intermittently Network egress or site-side geolocation classification may vary, or a cached decision persists Verify the actual route each run, use a clean session where appropriate, and record timestamps and conditions.

9. Performance, reliability, and cost

Browser automation has setup and runtime costs: the browser must launch, the page must load, and a stable capture state must be reached. Reuse a browser process for a suite when appropriate, but create fresh contexts for isolated scenarios. Avoid waiting for every network request to finish if the page keeps background connections open; a meaningful selector can make runs faster and more deterministic.

Visual comparisons are most reliable when the browser version, operating system, viewport, scale, network conditions, session, and capture timing stay fixed. Dynamic ads, rotating content, timestamps, and animations can produce diffs unrelated to a code change. Where those elements are not the subject of the test, arrange a stable test state or exclude them from the comparison process.

For ScreenshotNeo, the listed plans are Free: 1,000 shots/month; Starter: $5 for 3,000; Growth: $15 for 15,000; Pro: $39 for 60,000; Scale: $99 for 250,000; and Business: $249 for 1,000,000. Yearly billing gives two months free, and every feature is on every plan. Only clean shots are billed; the response’s X-Page-Verdict and X-Billed headers identify the result. Use the usage API to monitor consumption and caching with a chosen TTL to reduce repeated work where freshness requirements allow. For automated workloads, async jobs with signed webhooks and bulk capture of up to 100 URLs per call are available.

10. Short FAQ

Can I make a browser screenshot look like it came from another country?

You can emulate browser geolocation, locale, and timezone. That alone does not make the network connection originate there.

Do coordinates always select the country version of a site?

No. Coordinates affect pages that use browser geolocation. A site can instead use IP address, account preferences, cookies, or a manual region choice.

What should I include when sharing a regional screenshot?

Include the URL, timestamp, browser and version, viewport/device, locale/timezone, session state, and whether location came from coordinates or verified network egress.

Can one screenshot prove what every visitor in that country sees?

No. It records one page state under documented test conditions. Other visitors may have different IPs, accounts, cookies, devices, or consent choices.