proxyPRO
Type:
<string> | <object>
It sets the proxy HTTP server for resolving any internal sub-requests over the target url.
We provide an automatic proxy resolution included for any pro plan to handle IP blocking, CAPTCHAs, banners, or any other scraping shield protection.
Our automatic proxy resolution is well-tested against Top 500 most popular worldwide websites.
Additionally, you can provide your own proxy server:
- CLI
- JavaScript
- Shell
- Python
- Ruby
const mql = require('@microlink/mql')
const { status, data } = await mql('https://geolocation.microlink.io', { apiKey: 'MyApiToken', proxy: 'https://myproxy:603f60f5@superproxy.cool:8001' })
mql.render(data)
The proxy server string provided should be
WHATWG URL
.You can ensure proxy is properly used checking
x-fetch-mode
header on response, whose value should be prefixed by 'proxy-*'.HTTP/2 200 content-type: application/json; charset=utf-8 x-response-time: 1.7s x-pricing-plan: pro x-fetch-mode: prerender-proxy x-cache-ttl: 86400000 x-request-id: iad:2eb66538-0a16-4c56-b613-511d99507c9f x-cache-status: BYPASS cache-control: public, must-revalidate, max-age=0 x-fetch-time: 0ms