Need a quick way to grab fresh proxies for your project without spending a dime? The ProxyScrape API offers exactly that—a free proxy list that you can query programmatically and use however you need. Whether you're scraping data, testing geo-restrictions, or building automation tools, this API makes it straightforward to fetch working proxies on demand.
Let me walk you through how to use it, with real code examples in just about every language you might be working with.
The ProxyScrape API provides access to a regularly updated list of free proxies. You can filter by protocol type (HTTP, SOCKS4, SOCKS5), timeout values, country location, SSL support, and anonymity level. The best part? The results are completely free to use in your projects.
When you're building applications that need proxy rotation or testing tools that require multiple IP addresses, having 👉 reliable proxy sources that update automatically saves you countless hours of manual proxy hunting.
Here's the core endpoint structure you'll be working with:
Breaking down the parameters:
request=displayproxies – tells the API you want to retrieve the proxy list
protocol=http – specify HTTP, SOCKS4, or SOCKS5
timeout=10000 – only return proxies with response times under 10 seconds
country=all – get proxies from any country (or specify a country code)
ssl=all – include both SSL and non-SSL proxies
anonymity=all – return proxies at any anonymity level
Let me show you how to call this API in different programming environments. Pick whichever one matches your stack.
bash
curl --location --request GET 'https://api.proxyscrape.com/v2/?request=displayproxies&protocol=http&timeout=10000&country=all&ssl=all&anonymity=all'
python
import requests
response = requests.get(url)
print(response.text)
javascript
var requestOptions = {
method: 'GET',
redirect: 'follow'
};
fetch("https://api.proxyscrape.com/v2/?request=displayproxies&protocol=http&timeout=10000&country=all&ssl=all&anonymity=all", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
javascript
var axios = require('axios');
var config = {
method: 'get',
url: 'https://api.proxyscrape.com/v2/?request=displayproxies&protocol=http&timeout=10000&country=all&ssl=all&anonymity=all',
headers: { }
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
php
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.proxyscrape.com/v2/?request=displayproxies&protocol=http&timeout=10000&country=all&ssl=all&anonymity=all',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
go
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.proxyscrape.com/v2/?request=displayproxies&protocol=http&timeout=10000&country=all&ssl=all&anonymity=all"
method := "GET"
client := &http.Client {}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://api.proxyscrape.com/v2/?request=displayproxies&protocol=http&timeout=10000&country=all&ssl=all&anonymity=all")
.method("GET", null)
.build();
Response response = client.newCall(request).execute();
ruby
require "uri"
require "net/http"
url = URI("https://api.proxyscrape.com/v2/?request=displayproxies&protocol=http&timeout=10000&country=all&ssl=all&anonymity=all")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
response = https.request(request)
puts response.read_body
csharp
var client = new RestClient("https://api.proxyscrape.com/v2/?request=displayproxies&protocol=http&timeout=10000&country=all&ssl=all&anonymity=all");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
swift
import Foundation
var semaphore = DispatchSemaphore(value: 0)
var request = URLRequest(url: URL(string: "https://api.proxyscrape.com/v2/?request=displayproxies&protocol=http&timeout=10000&country=all&ssl=all&anonymity=all")!, timeoutInterval: Double.infinity)
request.httpMethod = "GET"
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
semaphore.signal()
return
}
print(String(data: data, encoding: .utf8)!)
semaphore.signal()
}
task.resume()
semaphore.wait()
Beyond just retrieving the proxy list, you can also fetch metadata about the available proxies using this endpoint:
https://api.proxyscrape.com/v2/?request=proxyinfo
This returns information about proxy availability, protocols supported, and other useful details that help you understand what's currently in the pool.
Free proxies get a bad rap sometimes, and for good reason—many are slow, unreliable, or short-lived. But when you have a systematic way to fetch and test them programmatically, you can build resilient systems that automatically rotate through working proxies and discard dead ones.
For development and testing environments where you need proxy functionality without the commitment of a paid service, this API provides exactly what you need. The fact that it's accessible through simple GET requests means you can integrate it into any application with minimal effort.
If you're working on projects that need more robust proxy infrastructure with better uptime guarantees and faster speeds, you might eventually want to explore 👉 premium proxy solutions designed for production workloads. But for getting started, learning the ropes, or handling lighter workloads, this free API is hard to beat.
The code examples above should give you everything you need to start pulling proxies into your application right now. Just pick your language, copy the relevant snippet, and you're good to go.