Skip to content
Screenshot API · Use case

Screenshot a website from another country, as locals see it

To screenshot a website from another country, the request has to come from there. Prices, availability, legal notices and even the language change with the visitor’s location, so ad verification, price monitoring, localization QA and compliance checks all need the regional version of a page. proxy.location pins the exit country of the built-in proxy with a two-letter code.

The problem

Geo-targeted pages serve your screenshot the wrong region

Localization is decided server-side from the IP address, sometimes combined with the Accept-Language header. A screenshot taken from a datacenter in the United States shows the US store, the US price and the US cookie notice, whatever your users elsewhere get.

The workarounds are fragile. Appending a country parameter to the URL works only on sites that expose one, and spoofing Accept-Language changes the language but not the region. A VPN on a laptop does not scale past a handful of manual checks, and buying country-specific proxies means vetting providers, rotating exits and paying per country.

With proxy.location the request exits from a proxy in the country you choose, so the target serves that region’s version. Forward Accept-Language with the headers parameter and the page renders in the local language too. Both are Pro options, and they compose with everything else the Screenshot API does.

How it works

How to take a geolocated screenshot of a website

Two parameters cover most localization logic: the exit country for IP-based targeting and Accept-Language for language negotiation. The proxy guide shows both next to the other proxy patterns.

1 · Capture from a country
import createClient from 'microlink.io'

const microlink = createClient({
  apiKey: process.env.MICROLINK_API_KEY
})

const { url } = await microlink.screenshot('https://example.com/pricing', {
  proxy: { location: 'fr' }
})

The request is routed through a proxy in France, so the page serves its French variant: local prices, stock and legal copy. Codes are ISO 3166-1 alpha-2 and case-insensitive.

2 · Match the language as well
import createClient from 'microlink.io'

const microlink = createClient({
  apiKey: process.env.MICROLINK_API_KEY
})

const { url } = await microlink.screenshot('https://example.com', {
  proxy: { location: 'jp' },
  headers: { 'x-api-header-accept-language': 'ja-JP' }
})

The SDK sends headers as real HTTP request headers, and any header prefixed with x-api-header- is forwarded to the target with the prefix stripped. Sites that negotiate language from Accept-Language render in Japanese instead of falling back to English.

3 · The same request as a URL
curl 'https://pro.microlink.io/?url=https%3A%2F%2Fexample.com%2Fpricing&screenshot=true&meta=false&proxy.location=fr' \
  -H 'x-api-key: $MICROLINK_API_KEY'

proxy.location is a Pro option, so the URL targets pro.microlink.io. Unknown country codes are rejected with the EINVALQUERY error instead of silently falling back to the default.

4 · Verify the exit country first
import createClient from 'microlink.io'

const microlink = createClient({
  apiKey: process.env.MICROLINK_API_KEY
})

const { url } = await microlink.screenshot(
  'https://geolocation.microlink.io',
  { proxy: { location: 'fr' } }
)

geolocation.microlink.io returns the origin IP and country seen by the server. Capturing it with the same proxy.location confirms the route before you spend requests on real targets.

Parameters used
  • proxy.location ISO 3166-1 alpha-2 country code, case-insensitive. Default us. Exclusive with proxy.url. Pro plans.
  • headers Non-sensitive request headers such as Accept-Language, forwarded to the target. Pro plans.
  • device Combine with a mobile preset to capture the local mobile experience.
  • adblock On by default. Set it to false to keep regional consent banners in the capture.
  • cacheKey Appends a custom identifier to the cache key when variants need extra separation. Pro plans.

Requests with different proxy.location values are cached separately, because the cache key includes every recognized query parameter. One capture per country is rendered, and every repeat within the cache lifetime is a hit.

Why it works

Why a screenshot from another country needs a real exit IP

Spoofing headers is not enough for IP-based localization, and buying country proxies yourself is a full-time chore.

01 · IP-based targeting
The target decides the region from where the request comes.
Geo-targeting reads the IP, not the user agent. A proxy exit in the chosen country is the only way to be served that region’s content, and proxy.location gives you that exit in one option, with no provider to vet.

The same option localizes other products: see region-specific metadata for the titles, prices and descriptions a country gets.

02 · Language is separate
Accept-Language completes the picture.
Many sites choose the region from the IP and the language from the header. Setting both keeps the capture consistent with what a native visitor sees, currency and copy included.

Values in the headers query parameter are public. Keep cookies and tokens in x-api-header-* request headers, as described in screenshots behind a login.

03 · Verifiable
geolocation.microlink.io shows the country the target sees.
Before capturing a thousand pages, capture the geolocation endpoint with the same proxy.location. It echoes the exit IP and country, so a misconfigured code is caught in one request.

When not to: if the page localizes only from the browser language, a forwarded Accept-Language header is enough and needs no country. If the site blocks automation altogether, start with the built-in proxy recipe.

FAQ

Which countries can I take a screenshot from?

Countries on every continent, identified by their ISO 3166-1 alpha-2 code, with us as the default. The value is case-insensitive, and the proxy.location reference lists every supported code.

How do I screenshot a website from another country without a VPN?

Pass proxy.location with the country code, for example de for Germany, on a Pro key. The request exits from a proxy in that country, so the site serves its regional version with no VPN, no browser extension and no manual step.

Can I combine proxy.location with my own proxy for screenshots?

No. location and proxy.url are exclusive. If you already pay for a country-specific proxy, pass its URL as proxy.url instead and Microlink routes every sub-request of the page through it.

Does the exit country change the language of the screenshot?

Only when the site derives language from the IP. Sites that negotiate language from the browser also need Accept-Language, which you can pass through the headers parameter or as an x-api-header-accept-language request header.

Are geolocated screenshots cached separately per country?

Yes. The cache key includes every recognized query parameter, so two requests with different proxy.location values are cached separately. Use cacheKey when you need extra separation, for example per customer.
Related use cases

Solve the next problem with the same API

Screenshot blocked websites

When a site blocks headless browsers, one option routes the capture through a managed, rotating proxy pool.

Screenshots without cookie banners or ads

Ads, trackers and consent popups are blocked before the page renders, and one option dismisses first-party banners.

Mobile screenshots at any viewport

Emulate an iPhone, a Pixel, an iPad or any custom viewport and capture the page exactly as those visitors see it.

Screenshots behind a login

Forward a session cookie or a bearer token as a request header and capture pages only your users can see.

Region-specific metadata

Fetch titles, descriptions and prices as a visitor from a given country and language sees them.

Markdown from bot-protected pages

Convert pages behind Cloudflare, DataDome or Akamai: one option routes the request through the built-in proxy.

Ready to capture local versions?

Prices, stock and copy as your customers in each country see them. Get a Pro key and pin the request to any supported country.