Fetch geo-restricted pages from the country they are meant for
To fetch a website from another country, the request has to leave from an IP in that country; a header or a VPN on your laptop does not help a server-side job. Streaming catalogs, regional news, government portals, local marketplaces and country-only launches all answer foreign traffic with a block page, a redirect or a trimmed version. One request option moves the exit to the country you name, on every Microlink product.
Geo-restricted content serves your servers a different page, or none
Geo-restrictions read the IP, not your intent. A crawler in a US datacenter asking for a page reserved for Japan gets “not available in your region”, a redirect to the international homepage, or the same URL with half the content missing. The request succeeds, so a pipeline that only checks the status code stores the wrong page.
The workarounds cost more than the fetch. A VPN covers one country at a time and does not belong in a server fleet. Buying a proxy per market means one contract, one credential and one integration per country, plus a way to prove each exit actually sits where the vendor says. Setting Accept-Language changes the language you ask for, not the country you appear to come from.
proxy.location takes a two-letter ISO country code and routes the request through a proxy IP in that country. 181 codes are supported, the default is us, and it works the same for HTML, Markdown, screenshots, PDFs and data extraction. geolocation.microlink.io shows which IP and country the target sees, so you can check the route before trusting the content.
How to fetch a geo-blocked website from another country
Check the exit once, then fetch the real target with the same country code. Both calls need a Pro key. The geolocation section of the proxy guide shows the same verification with the interactive editor.
import createClient from 'microlink.io'
const microlink = createClient({
apiKey: process.env.MICROLINK_API_KEY
})
const seen = await microlink.text('https://geolocation.microlink.io', {
proxy: { location: 'jp' }
})geolocation.microlink.io reports the IP address and country of whoever requests it. Through proxy.location jp, the text it returns should name Japan, which proves the route before you spend requests on the real target.
import createClient from 'microlink.io'
const microlink = createClient({
apiKey: process.env.MICROLINK_API_KEY
})
const markdown = await microlink.markdown('https://example.jp/catalog', {
proxy: { location: 'jp' },
headers: { 'x-api-header-accept-language': 'ja-JP' }
})The page is requested from a Japanese IP and converted to Markdown. The x-api-header- prefix forwards Accept-Language to the site, for pages that negotiate language as well as region.
curl 'https://pro.microlink.io/?url=https%3A%2F%2Fexample.jp%2Fcatalog&data.markdown.attr=markdown&proxy.location=jp&meta=false' \
-H 'x-api-key: $MICROLINK_API_KEY'proxy.location is a Pro option, so the URL goes to the Pro endpoint with your x-api-key header. An unknown country code is rejected with EINVALQUERY instead of silently falling back.
- proxy.location ISO 3166-1 alpha-2 code, case-insensitive, 181 countries. Default us. Pro plans.
- proxy.url Your own proxy instead of a country pin. Exclusive with proxy.location.
- headers Forwards Accept-Language or other headers the site negotiates on. Pro plans.
- ttl Keeps each country’s copy cached from 1 minute to 31 days. Pro plans.
The cache key includes every recognized query parameter, as the cache reference explains, so each country gets its own cached copy of the same URL. For a visual record of the regional version, screenshot the site from another country with the same option.
Why a country parameter beats a VPN or a proxy per market
Geo-restricted content is a routing problem with a verification problem attached. Keeping both in one API means one integration covers every market.
For prices specifically, scraping prices by country turns the same option into a comparison table.
The response header x-fetch-mode ends in -proxy when the proxy route was used, as the proxy parameter reference shows.
When not to: a region lock enforced by a login, a subscription or a licence is not an IP problem, and a proxy is not the answer. Only fetch regional content you are permitted to access; the pricing page lists which plans include the proxy.
FAQ
How do I fetch a website from another country with an API?
Which countries can a geo-restricted request come from?
How do I check which country a proxied request exits from?
Can I access geo-blocked content through my own proxy instead?
Does the cache mix up pages fetched from different countries?
Solve the next problem with the same API
Scrape prices by country
Bring your own proxy
Rotating proxy alternative
Screenshot a site from another country
Region-specific metadata
PDFs of bot-protected pages
Ready to fetch from any market?
Two letters per request, 181 countries, one integration. Verify the exit, then fetch the page as locals see it.