Fetch localized metadata as a visitor in another country sees it
Localized metadata is what a visitor in a given country actually sees: the translated title, the local currency, the regional availability. A preview generated from a US datacenter shows the US version to everyone. Pin the Metadata API request to the visitor’s country and language and the response matches their view, which is what price monitors, travel and retail aggregators and international newsletters need.
Websites localize their metadata, extractors do not
Stores show local currency, publishers translate titles, and some pages redirect to a regional domain based on where the request comes from. An extractor with one exit country reports one version of the truth, and it is rarely the one your user in Berlin or Tokyo sees.
Setting Accept-Language alone does not fix it, because geo-targeting reads the origin IP rather than a header. Running your own servers or proxies in every market is the other option, and it turns a metadata call into infrastructure you maintain per country.
proxy.location routes the request through a proxy IP in the country you choose, headers adds the Accept-Language the site negotiates on, and a data rule captures a localized value such as the price. Each combination is cached separately.
How to fetch metadata from another country
Two request options localize the page, and a rule reads the value that differs. Both options are part of Pro plans, as the proxy guide explains.
import createClient from 'microlink.io'
const microlink = createClient({
apiKey: process.env.MICROLINK_API_KEY
})
const { title, description } = await microlink.metadata('https://example.com/product', {
proxy: { location: 'de' }
})The request exits from a German IP, so the site serves its German-region version and the normalized title and description come from that version.
import createClient from 'microlink.io'
const microlink = createClient({
apiKey: process.env.MICROLINK_API_KEY
})
const { title, price } = await microlink.metadata('https://example.com/product', {
proxy: { location: 'de' },
headers: { 'Accept-Language': 'de-DE' },
data: {
price: { selector: '.price', attr: 'text' }
}
})The language header completes the localization, and the rule captures the price text exactly as displayed, currency symbol included.
curl 'https://pro.microlink.io/?url=https%3A%2F%2Fexample.com%2Fproduct&proxy.location=de&headers.Accept-Language=de-DE' \
-H 'x-api-key: $MICROLINK_API_KEY'proxy.location and headers are Pro options, so the URL targets pro.microlink.io. Header values in the query string are public, so keep them to non-sensitive ones such as Accept-Language.
- proxy.location ISO 3166-1 alpha-2 country code, case-insensitive. Default us. Exclusive with proxy.url. Pro plans.
- headers Forwards Accept-Language and other non-sensitive headers to the target. Pro plans.
- data A rule for the localized value the normalized fields do not carry, such as the price.
- cacheKey Extra separation when the same URL must be cached per audience. Pro plans.
Verify the exit country first: request https://geolocation.microlink.io with the same proxy.location and it returns the IP and the country the target sees. An unknown country code is rejected with EINVALQUERY.
Why a price-by-country lookup needs a real exit IP
Sites decide the region from the IP. Only a request from that region gets that region’s metadata.
The same exit works for the visual side of the job: see screenshots from another country.
Keep secrets out of the headers parameter, because it travels in the query string. Cookies and tokens go in x-api-header-* request headers instead.
When not to: sites that localize only from the browser language need just the header, without a proxy. Check which signal the target uses before you route every request through a country.
FAQ
Can I get metadata as a visitor from a specific country would see it?
Which countries can a localized metadata request exit from?
Does proxy.location also translate the page metadata?
Are localized link previews cached separately per country?
How do I capture the local price next to the metadata?
Solve the next problem with the same API
Link previews for bot-protected sites
Custom fields alongside metadata
Screenshot a site from another country
Ready for localized metadata?
Titles, descriptions and prices as each market sees them. Get a Pro key and fetch your first regional version today.