The 5-Minute Integration Guide: Scrapy, Playwright and Plain Requests
Every EZ-Proxies product uses the same gateway pattern: one hostname, one port per protocol, and a username string that carries your routing preferences. Once you understand the username flags, every integration below is copy-paste.
The username flag system
Your base username looks like ez_user_39281. Append flags with colons to control routing:
- country-us routes through United States IPs. Any ISO code works.
- state-texas or city-madrid narrows further.
- session-a1b2c3 pins a sticky session. Reuse the token to keep the same IP.
- sesstime-30 holds the sticky IP for 30 minutes, from 1 to 1440.
A full username: ez_user_39281:country-de:session-job42:sesstime-10
Plain Python requests
Set the proxy once and every call inherits it. Rotating pool, US exit, nothing else to configure:
proxy = "http://ez_user_39281:country-us:PASS@gw.ez-proxies.com:7777"
Pass it in the proxies dict for both http and https keys. That is the entire integration.
Scrapy
Add the proxy to request meta in your spider, or set it globally with a one-line middleware. For per-request rotation you do nothing: the gateway rotates for you. For sticky sessions per item, generate a session token from the item id and append it to the username.
Playwright
Pass the server, username and password in the proxy option at browser launch. One browser context per sticky session is the pattern that behaves most like a real user: same IP, same cookies, same fingerprint for the whole flow.
Verifying it works
Hit https://api.ipify.org?format=json through the proxy and check the returned IP against our dashboard's geo lookup. If you requested country-de and see a German consumer ASN, you are live.
Common mistakes
- Sending HTTPS traffic to the HTTP-only port. Use 7777 for HTTP/HTTPS, 7778 for SOCKS5.
- URL-encoding the colons in the username. Send them raw.
- Creating a new session token per request while expecting a stable IP. Reuse the token.