Rotating Proxies for Web Scraping
Rotating proxies for web scraping distribute your requests across many IP addresses to prevent your scraper from being blocked by rate limits or IP bans. You pay only for the traffic you use, choosing the right network of IPs based on the target site's defenses.
- Rotate IPs per request or keep one IP for minutes with a session ID.
- Four networks: residential, mobile, datacenter, and ISP, each for different targets.
- Traffic is billed per GB from a prepaid balance, with volume discounts.
- Target by country, US state, or city for residential and mobile proxies.
What Do You Need from a Proxy for Web Scraping?
When you scrape websites, your main technical challenge is avoiding detection and blocking. Sites use IP-based rate limiting, CAPTCHAs, and outright bans to stop automated access. A proxy acts as an intermediary, making your requests appear to come from a different IP address. Rotating proxies for web scraping take this further by automatically switching the IP address used, spreading the load and mimicking organic traffic from many users. This is the core value: rotation prevents any single IP from making too many requests too quickly, which is a primary trigger for anti-bot systems. You also need reliability, geographic targeting to access localized content, and predictable costs. Our service addresses this with a single gateway that handles the rotation logic, so you don't need to manage a list of individual proxy servers.
Choosing the Right Rotating Proxy Network
The best network for your scraping job depends on the target website's sophistication and the type of IPs it tends to trust. We offer four distinct rotating proxy networks, each with a different origin for its IP addresses. Your choice balances success rate, speed, and cost.
| Network | When It Fits | Entry Price per GB |
|---|---|---|
| Rotating Residential | For heavily protected sites like social media, e-commerce marketplaces, and travel aggregators that block datacenter IPs. IPs come from real household internet connections. | $1.79 |
| Rotating Mobile | For scraping mobile apps via emulation, or sites that serve different content to mobile traffic. IPs come from 3G/4G/5G cellular networks. | $3.00 |
| Rotating Datacenter | For high-speed, high-volume scraping of less protected targets, like public APIs, news sites, or forums. IPs come from cloud servers and are the fastest and most affordable. | $0.36 |
| Rotating ISP | A balance between residential trust and datacenter speed. IPs are registered to consumer ISPs but hosted on fast servers. Good for general e-commerce, Google search, and price monitoring. | $1.80 |
Residential proxies are the most trusted but also the most expensive per GB. Datacenter proxies are the most cost-effective for large-scale projects where IP reputation is less critical, such as news monitoring or academic research.
How to Set Up the Proxy Username for Scraping
You control the network, location, and rotation behavior through options in the proxy username. The format is your proxy user's login, an underscore, then any options joined by underscores: key.value. The gateway is gw.rotatingproxy.cc on port 7070 for HTTP/HTTPS or 7071 for SOCKS5. Authentication uses the proxy username and password.
To scrape US retail sites from residential IPs, rotating the IP on every single request:
USERNAME_net.res_cc.us
To monitor prices on a German e-commerce site using ISP proxies, and keep the same IP for 30-minute sessions to maintain a shopping cart state:
USERNAME_net.isp_cc.de_sid.abc123_ttl.30
To scrape local business listings from Chicago using mobile IPs, with per-request rotation:
USERNAME_net.mob_cc.us_st.il_city.chicago
The sid (session ID) is any 6-16 character string you choose. Reusing the same sid within the ttl (time-to-live in minutes) will keep you on the same exit IP. Omit the sid entirely to get a new IP for every connection.
Estimating Traffic and Cost for a Scraping Project
Web scraping traffic costs are predictable because you pay per gigabyte (GB) used. One GB is 1,000,000,000 bytes of upload plus download through our gateway. To budget, estimate the number of pages, the average page weight, and any overhead from images or APIs.
Let's say you are scraping 100,000 product pages per day for ecommerce intelligence. The average HTML page size is 150 KB, and you also download a 50 KB product image. Total data per page is 200 KB.
- Daily traffic: 100,000 pages * 200 KB = 20,000,000 KB
- Convert to GB: 20,000,000 KB / 1,000,000 KB per GB = 20 GB per day.
If you use rotating residential proxies at the entry rate of $1.79 per GB, your daily cost is 20 * $1.79. Over a 30-day month, you'd use 600 GB. Since our volume rates apply automatically, your cost per GB would step down as your monthly usage crosses the 50 GB and 250 GB bands. For large projects, you can significantly reduce costs by using datacenter proxies ($0.36) or by caching responses and disabling images.
Python Code Example with Rotating Proxies
Here is a concrete example using the popular requests library in Python. This script rotates IPs on every request by not setting a session ID. It includes a retry logic for robustness.
import requests
from requests.auth import HTTPProxyAuth
# Proxy configuration
proxy_host = "gw.rotatingproxy.cc"
proxy_port = 7070
proxy_user = "USERNAME_net.res_cc.us" # Rotating residential, US IPs
proxy_pass = "PASSWORD"
proxies = {
"http": f"http://{proxy_user}:{proxy_pass}@{proxy_host}:{proxy_port}",
"https": f"http://{proxy_user}:{proxy_pass}@{proxy_host}:{proxy_port}"
}
# Target URL
url = "https://httpbin.org/ip"
for i in range(5):
try:
response = requests.get(url, proxies=proxies, timeout=30)
response.raise_for_status()
print(f"Request {i+1}: {response.json()}") # Shows the exit IP
except requests.exceptions.RequestException as e:
print(f"Request {i+1} failed: {e}")
# In a real scraper, implement a backoff and retry strategy
For concurrent scraping, use aiohttp or httpx. See our aiohttp proxy and httpx proxy integration guides. If you are using a framework like Scrapy, you can configure the proxy in the request meta or downloader middleware.
Good Practices for Scraping with Rotating Proxies
Rotation alone is not a silver bullet. You must scrape politely to be a good citizen and ensure long-term success.
- Respect robots.txt: Always check the target's
robots.txtfile. Our robots.txt guide explains how to parse it. While not legally binding everywhere, it shows the site owner's preferences. - Implement Rate Limiting: Even with many IPs, you should limit request rates per domain. Add delays between requests, and avoid sudden bursts. Rate limiting your crawler is essential.
- Use Caching: If you need to revisit pages or retry failed requests, cache the HTML locally. This saves bandwidth and cost. Set appropriate
If-Modified-Sinceheaders where possible. - Schedule Off-Peak Hours: Run large scrapers during off-peak hours for the target site's region. This reduces load on their servers and may result in fewer blocks.
- Monitor and Adapt: Track success rates, HTTP status codes, and CAPTCHA appearances. If failure rates spike, increase delays or switch to a more trusted network like residential. Monitoring a scraper helps catch issues early.
Common Problems and Fixes When Scraping
Here are the most common ones and how to resolve them.
Target Site Returns 403 Forbidden
A 403 error means the request was understood but rejected. This often indicates the site has detected and blocked the proxy IP. First, verify your proxy is working with an IP check tool (see checking the exit IP). If the IP is visible, the problem is likely IP reputation.
Fix: Switch to a different network. Move from datacenter to ISP or residential proxies. For sites like Amazon or Instagram, residential IPs are often necessary. Also, ensure your request headers (especially User-Agent) are realistic and match a common browser.
Slow Responses or Timeouts
High latency or timeouts can happen due to network congestion, slow exit nodes, or the target site's own response time.
Fix: Increase your timeout settings in your HTTP client to 60 seconds or more. For concurrency, ensure you are not hitting the connection limit of 1,000 per account. If the problem persists, try a different proxy network; datacenter proxies typically offer the lowest latency. Also, check if you are using the correct port (7070 for HTTP/HTTPS, 7071 for SOCKS5).
Session IP Changes Before the TTL Expires
You set a session ID with a 30-minute TTL, but the IP changed after 10 minutes.
Fix: This is normal behavior if the underlying device (for residential/mobile) disconnects. The gateway will automatically move your session to a new IP within the same targeted location. Your session remains active. If you require absolute IP stability, consider that rotating proxies are not designed for that; you would need a static IP service, which we do not offer. For most scraping, the session's continuity is more important than the exact IP.
High Traffic Usage Compared to Expectations
Your reported GB usage seems much higher than your estimate based on page counts.
Fix: Traffic includes all upload and download. If you are using a headless browser like Playwright or Puppeteer, it may be downloading images, CSS, and fonts by default. Disable these resources for scraping. Also, check for redirects or failed retries that cause duplicate requests. Our how traffic is measured guide explains the counting methodology.
Advanced: Concurrency, Retries, and Headless Browsers
For large-scale scraping, you need to manage concurrent connections efficiently. With a limit of 1,000 concurrent connections per account, you can parallelize aggressively. Use an asynchronous HTTP client or a framework like Scrapy that handles concurrency natively.
Always implement a retry strategy with exponential backoff. Transient network errors and occasional bad proxy IPs are inevitable. Retry failed requests with a delay, and consider marking a particular session ID as "bad" if it fails repeatedly. Read our guide retry strategies for proxy requests.
For JavaScript-heavy sites, you may need a headless browser. Configure it to use the proxy at the browser level. Remember that headless browsers consume significantly more bandwidth and resources. Use them only when necessary, and always try to find a hidden JSON API first (use public APIs before scraping HTML). For setup, see our guides for Playwright Python proxy and headless browsers with proxies.
Legal and Ethical Use of Proxies for Scraping
Rotating proxies are a tool. It is your responsibility to use them lawfully and ethically. Only scrape public data you are legally allowed to access. Do not scrape personal data in bulk, attempt to break into accounts, or circumvent paywalls. Respect the website's terms of service and robots.txt directives. Our web scraping legal guide provides an overview, but you should consult legal counsel for your specific project. We prohibit using our service for fraudulent activity, ticket scalping, creating fake accounts, or any other malicious purpose as outlined in our acceptable use summary.
Questions
Can rotating proxies be used to scrape Google Search results?
Yes, but Google has advanced bot detection. We recommend using rotating residential or ISP proxies, setting a low request rate, and using realistic headers. See our dedicated page for Google search proxies.
How do I know which proxy network to start with for a new site?
Begin with the most cost-effective option: rotating datacenter proxies. If you immediately get 403 errors or CAPTCHAs, switch to rotating ISP proxies. For the most protected sites like social media or major marketplaces, start with rotating residential proxies.
My scraper works without proxies but gets blocked quickly. Will rotating proxies solve this?
Rotating proxies for web scraping are the primary tool to avoid IP-based blocking. By distributing requests across many IPs, you stay below per-IP rate limits. Combine this with polite scraping practices like rate limiting and realistic headers for the best results.
How does the pay-as-you-go billing work for a scraping project that runs 24/7?
You add funds to your balance (minimum $40). As your scraper runs, traffic is deducted per GB. When the balance hits zero, traffic stops until you top up. There is no monthly commitment, and your balance does not expire. See how pay as you go proxy billing works.
Can I target a specific city for scraping local business data?
Yes, with rotating residential and mobile proxies. Targeting is available for country, US state, and city. Use the `city` option in the username with the city's token (e.g., `city.los-angeles`). Check our city targeting guide for the list of available cities.
What's the difference between port 7070 and port 7071?
Port 7070 supports HTTP and HTTPS (CONNECT) proxy protocols. Port 7071 supports SOCKS5. Both work for web scraping; SOCKS5 can be simpler for some applications as it proxies all TCP traffic. For most HTTP libraries, port 7070 is the standard choice. Learn more in which port to use.
Start with one top-up, use any network
Create an account in a minute, add $40 or more, and the same balance pays for residential, mobile, datacenter and ISP traffic.