Integrations / Language

Use Proxys with Python requests

Send requests through Proxys with the requests library.

Steps

  1. Install requests: pip install requests.
  2. Copy a sub-user's username and password from the dashboard.
  3. Pass the proxy for both http and https.
Python
import requests

proxy = "http://USERNAME-country-us:PASSWORD@gw.proxys.co:8000"
r = requests.get("https://ipinfo.io/json", proxies={"http": proxy, "https": proxy}, timeout=30)
print(r.json())

Before you start

Replace USERNAME and PASSWORD with a sub-user's credentials from the dashboard. Change -country-us to the country you need, or remove it for a random location. See targeting options for city, ASN and sticky sessions.

Try 1 GB for $1