Best Proxies for Scraping: Mobile Proxy Setup Guide
Updated
Datacenter proxies get blocked by Amazon, Cloudflare, and most major retailers within minutes. Mobile proxies on real carrier IPs don't trigger the same anti-bot fingerprints — and that's exactly why they've become the best proxies for scraping at scale. Carrier-Grade NAT (CGNAT) means thousands of legitimate mobile users share the same IP pool, so blocking a single address risks cutting off real customers. Anti-bot systems know this, which gives 4G and 5G mobile IPs a trust score that residential and datacenter proxies simply can't match.
ProxyPanel provides US-only 4G and 5G mobile proxies on the AT&T, T-Mobile and Verizon networks, in cities across the US. Every plan includes unlimited bandwidth, auto IP rotation, and full REST API access. Before writing a single line of scraping code, it's worth understanding why this architecture matters for your success rate.
Want to explore what's available before committing? Browse our US locations and check current pricing — no signup required to look around.
Prerequisites
You need the following before starting:
- Python 3.10+ (tested on 3.10 and 3.12)
requestslibrary:pip install requestsrequests[socks]for SOCKS5 support:pip install requests[socks]- A ProxyPanel account with active credentials (username/password or whitelisted IP)
- Any OS — Linux, macOS, and Windows all work identically
If you plan to use SOCKS5, also install PySocks: pip install pysocks. The setup guides cover account activation and credential retrieval in detail.
Setting Up the Proxy Connection
ProxyPanel exposes two protocols on every proxy, each on its own port. Both ports are shown on your proxy in the dashboard and differ from proxy to proxy:
| Protocol | Host | Port | Connection String |
|---|---|---|---|
| HTTP | HOST |
The HTTP port shown on your proxy | http://USERNAME:PASSWORD@HOST:HTTP_PORT |
| SOCKS5 | HOST |
The SOCKS5 port shown on your proxy | socks5h://USERNAME:PASSWORD@HOST:SOCKS5_PORT |
Authentication works via username/password embedded in the proxy URL, or via IP whitelisting: add your server's IP under IP whitelist in the dashboard (or through the REST API documentation) and connect to the separate whitelist port shown there, without credentials.
Quick connectivity test using curl:
curl -x http://USERNAME:PASSWORD@HOST:HTTP_PORT https://api.ipify.org
For SOCKS5 (socks5h:// resolves DNS through the proxy):
curl -x socks5h://USERNAME:PASSWORD@HOST:SOCKS5_PORT https://api.ipify.org
Both commands should return a mobile carrier IP address. If you see your own IP, the request didn't go through the proxy.
[IMAGE: Terminal output showing curl proxy test returning a mobile carrier IP — alt text: Testing ProxyPanel mobile proxy connection via curl]
Code Example
Here's a complete Python scraper with proxy configuration, retry logic, and error handling. This script fetches product titles from a target URL through ProxyPanel's mobile proxy endpoint.
import os
from urllib.parse import quote
import requests
from requests.adapters import HTTPAdapter
from urllib3.util.retry import Retry
# ProxyPanel credentials, read from environment variables
# (host, ports, username and password are shown on your proxy)
PROXY_USER = os.environ["PROXY_USER"] # USERNAME
PROXY_PASS = quote(os.environ["PROXY_PASS"], safe="") # PASSWORD, URL-encoded
PROXY_HOST = os.environ["PROXY_HOST"] # HOST
HTTP_PORT = os.environ["PROXY_HTTP_PORT"] # HTTP_PORT
SOCKS5_PORT = os.environ["PROXY_SOCKS5_PORT"] # SOCKS5_PORT
# HTTP proxy config
proxies_http = {
"http": f"http://{PROXY_USER}:{PROXY_PASS}@{PROXY_HOST}:{HTTP_PORT}",
"https": f"http://{PROXY_USER}:{PROXY_PASS}@{PROXY_HOST}:{HTTP_PORT}",
}
# SOCKS5 proxy config (alternative; socks5h resolves DNS through the proxy)
proxies_socks5 = {
"http": f"socks5h://{PROXY_USER}:{PROXY_PASS}@{PROXY_HOST}:{SOCKS5_PORT}",
"https": f"socks5h://{PROXY_USER}:{PROXY_PASS}@{PROXY_HOST}:{SOCKS5_PORT}",
}
# Session with retry logic
session = requests.Session()
retries = Retry(
total=5,
backoff_factor=2,
status_forcelist=[429, 500, 502, 503, 504],
allowed_methods=["GET"],
)
session.mount("https://", HTTPAdapter(max_retries=retries))
session.mount("http://", HTTPAdapter(max_retries=retries))
# Headers mimicking a real mobile browser
session.headers.update({
"User-Agent": "Mozilla/5.0 (Linux; Android 14; Pixel 8) "
"AppleWebKit/537.36 (KHTML, like Gecko) "
"Chrome/125.0.0.0 Mobile Safari/537.36",
"Accept-Language": "en-US,en;q=0.9",
})
def scrape_url(url: str) -> str | None:
"""Fetch a URL through the mobile proxy with error handling."""
try:
response = session.get(url, proxies=proxies_http, timeout=30)
response.raise_for_status()
return response.text
except requests.exceptions.ProxyError as e:
print(f"Proxy connection failed: {e}")
except requests.exceptions.HTTPError as e:
print(f"HTTP error {response.status_code}: {e}")
except requests.exceptions.Timeout:
print(f"Request timed out for {url}")
return None
# Example usage
if __name__ == "__main__":
target = "https://httpbin.org/ip"
html = scrape_url(target)
if html:
print(f"Response: {html[:500]}")
This pattern handles 502 Bad Gateway, timeouts, and rate-limit responses (429) with exponential backoff. The Retry object automatically re-sends failed requests up to five times.
Rotating IPs Programmatically
Static IPs get fingerprinted quickly. ProxyPanel supports three rotation strategies:
- Auto rotation — IP changes automatically on a schedule you set in the Rotation column of My Proxies: Every 5 min, Every 10 min, Every 30 min or Hourly
- Same city & carrier — the IP rotation setting keeps the same city and carrier across rotations for geo-consistent scraping (Location rotation and Location · keep carrier move the proxy to a new city instead)
- On-demand rotation — trigger an IP change with the Change IP button, the proxy's change-IP link, or a REST API call, once every 60 seconds
Force an IP change mid-scrape using the API (create a key on the API page of your dashboard; the proxy's API id looks like pp123456 and is not its login):
import os
import requests
API_BASE = "https://proxypanel.io/api/v1"
API_KEY = os.environ["PROXY_API_KEY"] # YOUR_API_KEY
PROXY_ID = "pp123456"
def rotate_ip():
"""Trigger an immediate IP change via the ProxyPanel REST API."""
response = requests.post(
f"{API_BASE}/proxies/{PROXY_ID}/rotate",
headers={"Authorization": f"Bearer {API_KEY}"},
timeout=120, # the call answers once the new IP is ready
)
if response.status_code == 409:
wait = response.json().get("retry_after")
print(f"Too soon, retry in {wait} seconds")
elif response.ok:
print(f"New IP assigned: {response.json().get('new_ip')}")
else:
print(f"Rotation failed: {response.status_code}")
# Call between batches
rotate_ip()
The endpoint reference documents every available API method, including changing location, setting rotation intervals, and managing the IP whitelist.
[IMAGE: Diagram showing IP rotation flow — scraper sends request, proxy rotates IP, target sees new mobile IP — alt text: ProxyPanel IP rotation workflow for web scraping]
Real-World Scenario
Scraping 10,000 Amazon product listings across many US cities. Amazon uses aggressive bot detection — TLS fingerprinting, behavioral analysis, and IP reputation scoring. Here's the strategy:
- Spread the job over several proxies and use ProxyPanel's locations API to move each one to the cities you need (allow about 3 minutes between location changes)
- Set IP rotation ("Same city & carrier") to keep each city + carrier pair for geo-specific pricing data
- Rotate the IP every 5 minutes (the shortest automatic interval) to avoid session-level fingerprinting
- Send 1 request every 3-5 seconds per proxy connection to stay under behavioral thresholds
- Use the Android Chrome User-Agent shown above — it matches the carrier IP's expected device profile
With unlimited bandwidth on the monthly plan, the entire 10,000-listing job runs without worrying about overage charges. The CGNAT-assigned IPs mean Amazon sees traffic that looks indistinguishable from real mobile shoppers.
Ready to benchmark against your actual target site? If your account has a free trial available, you'll see it on your dashboard; it gives a working proxy for 1 hour, enough to test your full scraping pipeline with real carrier IPs. Otherwise, check current pricing.
Performance Tips
- Concurrency: Start with a few concurrent sessions per proxy and add more while watching for 429s and captchas; the right number depends on the target site.
- Rotation interval: Every 5 min is the shortest automatic interval and suits high-volume scraping. For multi-step checkout flows, set No rotation (or a longer interval) so the IP stays the same, and change it between flows.
- Connection pooling: Reuse the
requests.Sessionobject. Creating a new TCP + TLS handshake for every request adds avoidable overhead. - Protocol choice: HTTP, on the HTTP port shown on your proxy, suits standard scraping. SOCKS5, on its SOCKS5 port with
socks5h://, is better when you need to route DNS through the proxy or work with non-HTTP protocols. - Geo-targeting: Use the location API to pin requests to a specific city. Price scraping from
New Yorkreturns different results thanDallason most e-commerce sites.
[IMAGE: Table or chart comparing latency and success rates between datacenter, residential, and mobile proxies — alt text: Success rate comparison showing mobile proxies outperforming datacenter and residential on protected sites]
Handling Common Errors
407 Proxy Authentication Required
Your credentials are wrong, or you're relying on IP whitelisting from an address that isn't on the list. Verify the username and password, or add your server's public IP under IP whitelist in the dashboard (or via the API reference) and connect to the separate whitelist port shown there.
# Quick credential test
test = requests.get("https://api.ipify.org", proxies=proxies_http, timeout=10)
print(test.status_code) # Should be 200, not 407
502 Bad Gateway
The proxy endpoint momentarily lost its upstream connection. The retry logic in the code example above handles this automatically. If persistent, call the IP change endpoint to get a fresh connection.
Captcha Challenges
Mobile IPs encounter captchas far less than datacenter proxies, but they still appear on heavily protected sites. When detected:
- Slow your request rate to 1 request per 5 seconds
- Rotate to a different city location
- Ensure your User-Agent matches a mobile device — mismatched fingerprints (desktop UA on a mobile IP) raise suspicion
Rate Limit (429 Too Many Requests)
Back off exponentially. The Retry configuration in the main code example already does this. If you're hitting 429s consistently, reduce concurrency from 5 to 2-3 threads and increase the delay between requests.
Finding the best proxies for scraping comes down to IP trust scores and rotation flexibility. CGNAT mobile IPs from real AT&T, T-Mobile and Verizon networks give scraping traffic a strong reputation, and ProxyPanel's API-driven rotation keeps those IPs fresh in cities across the US. The combination of unlimited bandwidth, on-demand and scheduled rotation, and carrier-grade addressing handles everything from price monitoring to large-scale data collection. Test it against your hardest target: if your account has a free trial available, you'll see it on your dashboard; it gives a working proxy for 1 hour. You can also view pricing plans.