proxy11
Official Python client for the Proxy11 proxy API.
Use it to fetch fresh proxy lists, filter by country or anonymity type, rotate through proxies, and export simple ip:port files.
Install
pip install proxy11
Quick Start
from proxy11 import ProxyClient
client = ProxyClient(api_key="YOUR_API_KEY")
proxies = client.get(limit=50, country="us")
proxy = client.random(proxy_type="anonymous")
proxy_list = client.as_list(limit=100)
Examples
Get Proxies
proxies = client.get(limit=50, country="us", proxy_type="anonymous", speed=1.0)
Get ip:port List
proxies = client.as_list(limit=50)
# ["103.152.112.166:8080", "45.77.56.114:4145"]
Random Proxy
proxy = client.random(country="us")
proxy_details = client.random_proxy()
Save to File
count = client.save("proxies.txt", country="us")
print(f"saved {count} proxies")
Rotator
rotator = client.rotator(country="us", proxy_type="anonymous", auto_refresh=True, refresh_after=50)
for _ in range(100):
proxy = rotator.next()
print(proxy)
# if proxy fails:
# rotator.mark_dead(proxy)
Auto-Rotating Requests Session
session = client.session(country="us", proxy_type="anonymous")
resp = session.get("https://httpbin.org/ip", timeout=15)
print(resp.json())
Error Handling
from proxy11 import APIError, NoProxiesError, ProxyClient
client = ProxyClient("YOUR_API_KEY")
try:
proxy = client.random(country="us")
except NoProxiesError:
print("No proxies matched the filters")
except APIError as exc:
print(f"Proxy11 API error: {exc}")
API
| Method | Description |
|---|---|
get(**filters) |
Return proxy rows as dictionaries |
as_list(**filters) |
Return proxies as ip:port strings |
random(**filters) |
Return one random ip:port proxy |
random_proxy(**filters) |
Return one random proxy dictionary |
save(path, **filters) |
Save ip:port proxies to a file |
rotator(**filters) |
Create a proxy rotator |
session(**filters) |
Create a requests.Session with rotating proxies |
Filters
| Parameter | Type | Description |
|---|---|---|
limit |
int | Max proxies to return, capped by your plan |
country |
string | Country name or two-letter country code |
port |
int | Proxy port |
speed |
float | Max response time in seconds |
proxy_type |
string | anonymous or transparent |
Links
- Website: proxy11.com
- API docs: proxy11.com/apidoc
- SDK page: proxy11.com/sdk
License
MIT
Release files for proxy11 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| proxy11-1.1.0.tar.gz | 7.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| proxy11-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:13.1 kB
Release files / proxy11-1.1.0.tar.gz
| Download URL | proxy11-1.1.0.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fad385158461d326570c5ed91f6a6153e512d7e525ceae15dc0f62809e97a717
|
|
BLAKE2b-256 checksum How to use checksums |
467347acfbdacd47c7dc7e137741f07a73b3b97324481bbb6958a111315a521c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / proxy11-1.1.0-py3-none-any.whl
| Download URL | proxy11-1.1.0-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2a82369debdc85b128019ca54d470f019ffccd1bb4d8335132cf45695306c618
|
|
BLAKE2b-256 checksum How to use checksums |
d59178f962ecbc0eeb913c75adf6cc2b0839ab647175318c1c1af03df2904b0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|