Oct 4, 2026

Python requests with a proxy: the four fields, then a public IP check

A proxies dict, HTTPS, and one echo request. No scraping cookbook. No invented success rate.

Python’s requests library takes a proxies dictionary. Both http and https keys should point at the same proxy URL. The URL is scheme, user, password, host, port. Fill those from the vendor dashboard. Do not copy a blog’s expired port as if it were a standard.

The shape

Build the URL as http://USER:PASSWORD@HOST:PORT. Pass it as both http and https in the proxies dict. Then GET a public IP echo. Print the body. If it is still your office address, the tunnel did not attach. If it is an address you do not recognise, the proxy is in the path. Then, and only then, request a URL you are allowed to collect.

Timeouts and retries

A missing timeout will hang a worker. Set one. A retry still burns gigabytes. Count retries in the visit calculator, not as a free extra.

Oxylabs: Playwright uses the same host, user and password as requests (vendor tutorial)

Legitimate use

Public pages you are allowed to collect, ad verification, SEO monitoring you are allowed to run, geo tests of properties you control. Not logins you do not own, not paywalls, not ticket queues.

Orange “Open” buttons can be affiliate. They do not change the editorial order. Confirm the live rate before you pay.

Sources

Where this note comes from

Vendor pages and the ProxyTopSite catalog. Confirm the live rate.