Proxies
Proxies & GEO targeting
Our residential proxy pool includes over 100 million IPs from 195 countries from over dozens of ISPs and should be sufficient for the vast majority of scraping jobs. A majority of proxy network is composed of Tier A+ model proxies.
BrowserCloud optimizes proxy usage by disabling the download of resources such as images, videos, CSS, fonts, etc. This behavior can be adjusted with a parameter (see more).
Proxy behavior is set by parameters proxy
and proxyCountry
curl --location 'https://chrome-v2.browsercloud.io/content?token=API_TOKEN&proxy=datacenter&proxyCountry=GB&url=https://api.myip.com'
BrowserCloud uses rotating proxies by default, which means every new request inside Chrome might have a new IP.
If you need to keep the same proxy IP during a session please add &proxySticky
parameter to the connection URL
Parameter | Available values | Description |
---|---|---|
proxy | 1) datacenter - datacenter proxy pool with 70mln of fast proxies 2) residential - premium proxy pool for a few particularly difficult to scrape sites 3) omit parameter to use direct connection from our servers | Proxy pool type |
proxyCountry | parameter works with proxy parameter1) two-letter country ISO code. Example: US , CA , GB , DE and more2) omit parameter or set ALL for global rotating | Proxy geo targeting |
proxySticky | add this parameter to use the same IP of the proxy for all requests during one session |
- Puppeteer
- Playwright
- REST APIs
browser = await puppeteer.connect({browserWSEndpoint:
'wss://chrome-v2.browsercloud.io?'+
'token=API_TOKEN'+
'&proxy=residential'+ //proxy type (optional): residential / datacenter
'&proxyCountry=US' //proxy country (optional)
});
browser = await playwright.chromium.connect(
'wss://chrome-v2.browsercloud.io/playwright?'+
'token=API_TOKEN'+
'&proxy=datacenter'+ //proxy type (optional): residential / datacenter
'&proxyCountry=US' //proxy country (optional);
);
curl 'https://chrome-v2.browsercloud.io/content?token=API_TOKEN&url=https://site.com&proxy=residential&proxyCountry=US'
Using your proxies
Use proxyURL
parameter instead of proxy
& proxyCountry
ProxyURL Format:
socks5://proxy_login:proxy_password@domain.com:port
Make sure you do URL encoding the address in &url=
and &proxyURL
parameters to avoid conflict with other parameters in GET request.
You can use services like https://www.urlencoder.org
- Puppeteer
- Playwright
- REST APIs
browser = await puppeteer.connect({browserWSEndpoint:
'wss://chrome-v2.browsercloud.io?'+
'token=API_TOKEN'+
'&proxyURL='+ encodeURIComponent('socks5://proxy_login:proxy_password@domain.com:5555')
});
browser = await playwright.chromium.connect(
'wss://chrome-v2.browsercloud.io/playwright?'+
'token=API_TOKEN'+
'&proxyURL='+ encodeURIComponent('socks5://proxy_login:proxy_password@domain.com:5555')
);
curl 'https://chrome-v2.browsercloud.io/content?token=API_TOKEN&url=https%3A%2F%2Fsite.com&proxyURL=http%3A%2F%2Fproxy_login%3Aproxy_password%40domain.com%3A5555'
Optimizing proxy usage
BrowserCloud optimizes proxy usage by disabling the download of resources such as images, videos, CSS, fonts, etc. This behavior can be adjusted with a parameter &blockRes=
By default browser instance blocks resources: image
, media
, stylesheet
, font
, manifest
, other
Parameter | Available values | Description |
---|---|---|
blockRes | 1) omit parameter to use default list of blocked resource types 2) image,media - comma separated list of resoures to be blocked 3) off - disable resource blocking ( used by default for APIs like /screenshot ) | List of blocked resource types |
- Puppeteer
- Playwright
- REST APIs
browser = await puppeteer.connect({browserWSEndpoint:
'wss://chrome-v2.browsercloud.io?'+
'token=API_TOKEN'+
'&proxy=residential'+ //proxy type (optional): residential / datacenter
'&proxyCountry=US'+ //proxy country (optional)
'&blockRes=image,media'
});
browser = await playwright.chromium.connect(
'wss://chrome-v2.browsercloud.io/playwright?'+
'token=API_TOKEN'+
'&proxy=residential'+ //proxy type (optional): residential / datacenter
'&proxyCountry=US'+ //proxy country (optional);
'&blockRes=image,media'
);
curl 'https://chrome-v2.browsercloud.io/content?token=API_TOKEN&url=https://site.com&proxy=residential&proxyCountry=US&blockRes=image,media'
Here’s a list of all the different resources type that can be set.
- document,
- stylesheet,
- image,
- media,
- font,
- script,
- texttrack,
- xhr,
- fetch,
- eventsource,
- websocket,
- manifest,
- other