How best to use a public proxy API
19 May, 2017
Today we're going to look at the best way to integrate GetProxyList into your application. Using GetProxyList's API is simple and easy and follows typical
RESTful practices. We're also going to talk about the new data we've added to the API a few days ago and how this can be used.
Our proxy api exposes public proxies in a simple to use interface. A problem with public proxies is their reliability. A public proxy could be working perfectly well one minute and then overloaded or completely taken down the next. Some proxies struggle to access certain sites or connect to certain ports. To work around this we attempt to find and test as many proxies as possible. To take advantage of this setup we suggest setting your integration up to expect failures. Every proxy is tested at least once every 10 minutes so you can be sure it was working in the last 10 minutes though its possible the proxy may not work for your use case.
We use our proxy API for some internal uses and we suggest you follow the same setup as us. We use Guzzle 6 as our HTTP client (any client can be used). We have a wrapper which before making a request fetches a fresh proxy using filters that are needed for the specific use case. We make the request through the proxy and if it fails we catch the exception and retry by fetching a new fresh proxy and trying again. This allows us to make as many successful requests as possible and because of the amount of proxies we expose its rare we reuse the same proxy in a short period of time.
To assist with the above we now provide the following information:
- Connect Time
- Download Speed
- Seconds to first byte
- Uptime
All the above also have filters and the Proxy API Documentation is on our homepage
GetProxyList Team
Back to blog
Our proxy api exposes public proxies in a simple to use interface. A problem with public proxies is their reliability. A public proxy could be working perfectly well one minute and then overloaded or completely taken down the next. Some proxies struggle to access certain sites or connect to certain ports. To work around this we attempt to find and test as many proxies as possible. To take advantage of this setup we suggest setting your integration up to expect failures. Every proxy is tested at least once every 10 minutes so you can be sure it was working in the last 10 minutes though its possible the proxy may not work for your use case.
We use our proxy API for some internal uses and we suggest you follow the same setup as us. We use Guzzle 6 as our HTTP client (any client can be used). We have a wrapper which before making a request fetches a fresh proxy using filters that are needed for the specific use case. We make the request through the proxy and if it fails we catch the exception and retry by fetching a new fresh proxy and trying again. This allows us to make as many successful requests as possible and because of the amount of proxies we expose its rare we reuse the same proxy in a short period of time.
To assist with the above we now provide the following information:
- Connect Time
- Download Speed
- Seconds to first byte
- Uptime
All the above also have filters and the Proxy API Documentation is on our homepage
GetProxyList Team
Back to blog