Skip to main content

Proxies

Browserless offers a built-in residential proxy. To use it, add the proxy parameters to your REST API request query strings.

REST APIs

All of our REST-APIs function the same for proxying: simply add the proxy parameters you care about to the requests' query-string parameters, and you're all done. No need for credentials or otherwise.

Available proxy parameters:

  • proxy=residential - Enables residential proxy routing
  • proxyCountry=us - Routes through a specific country (ISO 3166 country codes)
  • proxyCity=chicago - Routes through a specific city within the selected country
  • proxySticky=true - Maintains the same proxy IP across the session
City-Level Proxying

City-level proxying requires a Scale plan (500k+ units). Plans under 500k units will receive a 401 error.

To get a list of available cities, use the following endpoints:

  • All supported cities: https://production-sfo.browserless.io/proxy/cities?token=YOUR_TOKEN
  • Cities for a specific country: https://production-sfo.browserless.io/proxy/cities?country=US&token=YOUR_TOKEN

Here's an examples of collecting content, pdf and screenshot from a United States Proxy:

Content

curl --request POST \
--url "https://production-sfo.browserless.io/content?token=YOUR_API_TOKEN_HERE&proxyCountry=us&proxy=residential" \
--header "Content-Type: application/json" \
--data "{
\"url\": \"https://ip-api.com\"
}" \
--output "ipinfo.html"

PDF

curl --request POST \
--url "https://production-sfo.browserless.io/pdf?token=YOUR_API_TOKEN_HERE&proxyCountry=us&proxy=residential" \
--header "Content-Type: application/json" \
--data "{
\"url\": \"https://ip-api.com\"
}" \
--output "ipinfo.pdf"

Screenshot

curl --request POST \
--url "https://production-sfo.browserless.io/screenshot?token=YOUR_API_TOKEN_HERE&proxyCountry=us&proxy=residential" \
--header "Content-Type: application/json" \
--data "{
\"url\": \"https://ip-api.com\"
}" \
--output "ipinfo.png"