ProxyHealthList

Home / Use cases / Rotating proxy

Free Rotating Proxy Pool

A rotating proxy sends each request from a different IP. You don't need a paid service to get one — you can build your own pool from a free, hourly-verified list. Here is the pattern, with refresh and retry built in.

Download pool (JSON) Top 1000 (JSON)

The rotation pattern

Three moving parts: load a verified pool, rotate to the next proxy each call, and refresh the pool on a timer so dead proxies get replaced.

import itertools, time, requests

LIST = "https://raw.githubusercontent.com/xyzs996/free-proxy-health-list/main/proxies/all/data.json"

def load_pool():
    data = requests.get(LIST, timeout=15).json()
    def to_url(p):
        proto, hp = p["protocol"], p["proxy"]
        if proto.startswith("socks5"): return f"socks5h://{hp}"
        if proto.startswith("socks4"): return f"socks4://{hp}"
        return f"http://{hp}"
    return [to_url(p) for p in data]

pool = load_pool()
cycle = itertools.cycle(pool)
refreshed = time.time()

def get(url, tries=10):
    global pool, cycle, refreshed
    if time.time() - refreshed > 1800:        # refresh every 30 min
        pool = load_pool(); cycle = itertools.cycle(pool); refreshed = time.time()
    for _ in range(tries):
        px = next(cycle)                       # rotate to next IP
        try:
            r = requests.get(url, proxies={"http": px, "https": px}, timeout=8)
            if r.ok: return r
        except requests.RequestException:
            continue                           # dead proxy, rotate on
    raise RuntimeError("no working proxy this round")

print(get("https://httpbin.org/ip").json())

Tips for a healthier pool

Start from the fast or top-1000 subsets for a higher hit rate, drop proxies that fail twice in a row, and refresh more often if your success rate dips. The list is re-verified hourly, so a fresh download is never far off.

Frequently asked questions

Can I build a free rotating proxy?

Yes — rotate through a verified list and retry the next proxy on failure. Rotation with retry is exactly what makes free proxies usable at scale.

How often should I refresh?

Every 15–60 minutes works well. The source list is health-checked and republished hourly.

When should I pay instead?

If you need one stable rotating URL with an SLA and no dead-proxy handling, a managed endpoint is worth it. The planned Pro API provides exactly that.

Related