Best Proxies for Scraping: Mobile Proxy Setup Guide
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 mobile proxies on AT&T and T-Mobile networks across 174 city locations. 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 all 174 US locations and check current pricing — no signup required to look around.
Prerequisites
You need the following before starting:
- Python 3.8+ (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 endpoint:
| Protocol | Host | Port | Connection String |
|---|---|---|---|
| HTTP | gatewayip |
8083 |
http://USER:PASS@gatewayip:8083 |
| SOCKS5 | gatewayip |
9093 |
socks5://USER:PASS@gatewayip:9093 |
Authentication works via username/password embedded in the proxy URL or via IP whitelisting managed through the REST API documentation.
Quick connectivity test using curl:
curl -x http://USER:PASS@gatewayip:8083 https://api.ipify.org
For SOCKS5:
curl -x socks5://USER:PASS@gatewayip:9093 https://api.ipify.org
Both commands should return a T-Mobile or AT&T IP address. If you see your own IP, authentication failed.
[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 requests
from requests.adapters import HTTPAdapter
from urllib3.util.retry import Retry
# ProxyPanel credentials
PROXY_USER = "USER"
PROXY_PASS = "PASS"
PROXY_HOST = "gatewayip"
# HTTP proxy config
proxies_http = {
"http": f"http://{PROXY_USER}:{PROXY_PASS}@{PROXY_HOST}:8083",
"https": f"http://{PROXY_USER}:{PROXY_PASS}@{PROXY_HOST}:8083",
}
# SOCKS5 proxy config (alternative)
proxies_socks5 = {
"http": f"socks5://{PROXY_USER}:{PROXY_PASS}@{PROXY_HOST}:9093",
"https": f"socks5://{PROXY_USER}:{PROXY_PASS}@{PROXY_HOST}:9093",
}
# 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 at a configurable interval (minimum 180 seconds)
- Smart rotation — locks the same city and carrier across rotations for geo-consistent scraping
- On-demand rotation — trigger an IP change via URL or REST API call
Force an IP change mid-scrape using the API:
import requests
API_BASE = "https://www.proxypanel.io"
API_KEY = "YOUR_API_KEY"
def rotate_ip():
"""Trigger an immediate IP change via ProxyPanel REST API."""
response = requests.get(
f"{API_BASE}/api/change-ip",
params={"apikey": API_KEY},
timeout=10,
)
if response.status_code == 200:
print(f"New IP assigned: {response.json()}")
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 50 US cities. Amazon uses aggressive bot detection — TLS fingerprinting, behavioral analysis, and IP reputation scoring. Here's the strategy:
- Use ProxyPanel's location API to cycle through 50 city endpoints
- Set smart rotation to lock each city + carrier pair for geo-specific pricing data
- Rotate the IP every 180 seconds (the minimum 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? Spin up a $1 trial and test your full scraping pipeline with real carrier IPs.
Performance Tips
- Concurrency: Run 3-5 concurrent sessions per proxy connection. Going beyond 8 risks triggering carrier-level throttling.
- Rotation interval: Set to 180s for high-volume scraping. For multi-step checkout flows, use sticky sessions to keep the same IP for up to 30 minutes.
- Connection pooling: Reuse the
requests.Sessionobject. Creating a new TCP + TLS handshake per request wastes 200-400ms each time. - Protocol choice: HTTP on port
8083has lower latency for standard scraping. SOCKS5 on port9093is 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 IP whitelisting isn't configured. Verify the username and password, or add your server's public IP to the whitelist via the API reference.
# 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 and T-Mobile towers give scraping traffic the highest possible reputation, and ProxyPanel's API-driven rotation keeps those IPs fresh across 174 US cities. The combination of unlimited bandwidth, sub-200-second rotation, and carrier-grade addressing handles everything from price monitoring to large-scale data collection. Test it against your hardest target — a $1 trial gives you one full hour on the live network with no plan commitment required.