Fetch the proxy list from the raw JSON file
proxy_list_url = "https://raw.githubusercontent.com/oxylabs/free-proxy-list/main/proxy_list.json" response = requests.get(proxy_list_url) proxies = response.json()
Use the first proxy in the list for a request
first_proxy = proxies[0] proxy_url = f"{first_proxy['protocol']}://{first_proxy['ip']}:{first_proxy['port']}"
proxies_dict = { first_proxy['protocol']: proxy_url }
try: test_response = requests.get("http://httpbin.org/ip", proxies=proxies_dict, timeout=5) print(test_response.json()) except requests.exceptions.RequestException as e: print(f"Proxy failed: {e}")
**Final Thoughts**
While you probably wouldn't run your mission-critical, production-grade scraping pipeline on a list of free proxies, this resource is incredibly handy for everything else. It saves you the initial legwork and provides a clean, programmatic way to access a pool of US-based IPs. For hobby projects, experiments, and light-duty tasks, it's a solid find that respects your time as a developer.
Check out the repo, clone it, and maybe even star it for the next time you need a quick proxy.
---
@githubprojects