Skip to main content
Version: v2

Proxy Mode (Proxy Port)

ScrapingAnt Proxy Mode allows you to use ScrapingAnt API via proxy port.

Introduction

ScrapingAnt Proxy Mode is a simple HTTP/HTTPS proxy that allows you to use ScrapingAnt API via proxy port. It can be used with any HTTP client that supports proxy configuration and makes integration with third-party libraries and tools easier.

The proxy mode is a light front-end for the scraping API and has all the same functionality and performance as sending requests to the API endpoint.

Request cost is calculated in the same way as for the scraping endpoint.

tip

As browser rendering is enabled by default, we recommend to disable it while using ScrapingAnt Proxy Mode. It can be done by setting browser parameter to false.

Integration details

ScrapingAnt Proxy Mode is available on the following ports:

  • HTTP address: proxy.scrapingant.com:8080
  • HTTPS address: proxy.scrapingant.com:443
  • Username: scrapingant + API parameters separated by & delimiter
  • Password: YOUR-API-KEY

So,the sample cURL request with username for the proxy is scrapingant and the password is your API key will have the following look:

curl -x "http://scrapingant:YOUR-API-KEY@proxy.scrapingant.com:8080" -k "http://httpbin.org/ip"
danger

So that we can properly direct your requests through the API, your code must be configured to not verify SSL certificates.

Proxy Mode parameters

ScrapingAnt Proxy Mode uses the same request structure as the general endpoint.

To enable extra functionality whilst using the API in proxy mode, you can pass parameters to the API by adding them to username, separated by ampersand.

For example, to disable browser rendering and use residential proxies, you can use the following username:

scrapingant&browser=false&proxy_type=residential

Headers Forwarding

ScrapingAnt Proxy Mode supports headers forwarding. It means that all the headers that were sent to the proxy will be forwarded to the API endpoint.

In order to enable headers forwarding, you need to add forward_headers=true parameter to the username:

scrapingant&forward_headers=true

Without headers forwarding enabled, the API will not process headers that are not following the Ant- prefix convention. The same is applicable for response headers as well. Original headers will have their original names only with enabled headers forwarding.

You can read about default headers format at Headers page.