urllib3 vs requests is not a rivalry: requests is built on top of urllib3. urllib3 gives you connection pools, retries and TLS with a lower-level API; requests adds sessions, cookies, JSON, readable exceptions and compressed responses by default. Use requests unless you need urllib3's lower overhead or are writing a library.
We measured both on 20 November 2026 with Python 3.12.10, requests 2.34.2 and urllib3 2.8.0: once against a server on the same PC, once through one QuanticData Residential Premium session in the US, on the same page.
The numbers
| Test | requests | urllib3 |
|---|---|---|
| Local server, 500 GETs, median | 0.767 ms | 0.419 ms |
| Through the proxy, 20 GETs of one page, median | 242 ms | 242 ms (218 ms with compression) |
| Bytes received for that page | 5,326 (br) | 50,877 by default, 5,357 with compression |
| Accept-Encoding sent by default | gzip, deflate, br, zstd | none |
Locally, without a network in the way, urllib3 needed about half the time per request: requests adds the work of building a session request, merging settings and handling cookies. Through a real network the difference disappears into the connection time; both had the same median.
The default that matters: compression
The larger difference is not speed but bytes. requests asks every server for a compressed response. urllib3 does not, unless you tell it:
import urllib3
gz = urllib3.make_headers(accept_encoding=True)
# {'accept-encoding': 'gzip,deflate,br,zstd'}
r = pm.request("GET", URL, headers=gz)
On our test page the server sent 50,877 bytes to plain urllib3 and 5,357 bytes once it was asked for compression: 9.5 times less traffic. On a metered proxy plan, where you pay for gigabytes, that default decides the bill more than any speed difference. If you use urllib3 directly, set the header once on the PoolManager or ProxyManager. (Our residential proxy pricing is per GB.)
The same request, both ways, through a proxy
# requests
import requests
PROXY = "http://USER-country-us-sid-u01-ttl-30m:PASS@residentialpremium.quanticdata.io:8080"
s = requests.Session()
s.proxies = {"http": PROXY, "https": PROXY}
r = s.get("https://httpbin.org/get", params={"q": "python proxy"}, timeout=30)
print(r.json()["args"]) # {'q': 'python proxy'}
# urllib3
import urllib3
pm = urllib3.ProxyManager(
"http://residentialpremium.quanticdata.io:8080",
proxy_headers=urllib3.make_headers(proxy_basic_auth="USER-country-us-sid-u01-ttl-30m:PASS"),
headers=urllib3.make_headers(accept_encoding=True),
timeout=urllib3.Timeout(connect=10, read=30),
retries=urllib3.Retry(3))
r = pm.request("GET", "https://httpbin.org/get", fields={"q": "python proxy"})
print(r.json()["args"]) # {'q': 'python proxy'}
In urllib3 the proxy credentials go in proxy_headers, not in the URL, and the ProxyManager keeps the connection open: five GETs through it used one connection in our log. The requests side of proxies is covered in how to use a proxy with Python requests.
API differences side by side
| requests | urllib3 | |
|---|---|---|
| Query string | params={...} | fields={...} on GET |
| JSON body | json={...} | json={...} (urllib3 2.x) |
| Response JSON | r.json() | r.json() |
| HTTP 404 | A response; raise_for_status() raised HTTPError | A response with status 404, no exception |
| Cookies | Kept across calls in a Session | Yours to handle |
| Retries | Through an HTTPAdapter with urllib3's Retry | retries=Retry(...) directly |
| Compression | Asked for by default | Only when you set Accept-Encoding |
| Proxy | proxies dict, credentials in the URL | ProxyManager, credentials in proxy_headers |
Retries are the same machinery in both: requests passes urllib3's Retry through its adapter. The details and the measured backoff are in Python requests retry.
And urllib from the standard library?
urllib.request needs no install and handles proxies with a ProxyHandler. Through the same Residential Premium plan it returned 200 from Beacon, New York. Two things to know: it sends User-agent: Python-urllib/3.12, which many sites refuse, and a 404 raises HTTPError instead of returning a response.
import urllib.request, json
opener = urllib.request.build_opener(urllib.request.ProxyHandler({"http": PROXY, "https": PROXY}))
r = opener.open("https://ipinfo.io/json", timeout=30)
print(r.status, json.load(r)["city"]) # 200 Beacon
How we measured
The local test started a small HTTP server inside the same Python process on 127.0.0.1, answering every GET with a short JSON body. Each client made one warm-up request, then 500 timed requests on a reused connection (a requests Session, a urllib3 PoolManager), and we took the median so a single slow call could not move the result. The proxy test fetched page 2 of the books.toscrape.com catalogue, a public practice shop, 20 times per client, through one Residential Premium session, so both clients used the same setup. Byte counts come from reading the raw body without decoding it. All on 20 November 2026, on one Windows 11 PC.
What this does not measure: many requests in parallel. Both libraries are synchronous; for concurrency you would add threads to either, or move to an async client such as httpx or aiohttp, which take the same proxy URL format as requests.
Which one to use
- requests for scripts and scrapers: sessions, cookies and compression by default, the API most examples use.
- urllib3 inside libraries and tools that want fewer dependencies, or hot loops where half a millisecond per call adds up. Turn compression on.
- urllib.request when you cannot install anything.
- httpx when you want the requests API plus async: see httpx with a proxy. The full field is compared in Python web scraping libraries.
Whichever you pick, the proxy URL is the same. QuanticData residential proxies and mobile proxies take the country and a session ID in the username, and work with all four clients.


