Point your Scrapy spiders at one Proxy Rotator gateway and get a fresh IP on every request from a 100M+ pool of residential, datacenter, mobile and IPv6 proxies. No proxy-list package, no rotation middleware to build. Set one proxy line and scrape.
Plans from $24.95/mo New IP per request HTTPS & SOCKS5
The hard parts of proxy management are handled at the gateway, so your spider code stays simple.
The gateway hands every Scrapy request a different exit IP. No proxy lists, no dead-IP retries, no custom rotation middleware.
Use rotating IPs for high-volume crawls, or sticky sessions when a flow needs the same IP across several requests.
Residential, datacenter, mobile and IPv6 in one pool. Switch types from your dashboard without touching the spider.
Standard protocols work with Scrapy out of the box and with the SOCKS handling in Twisted when you need it.
Target by country, and by city on residential, to crawl localized pages, SERPs and pricing.
Thread-based plans handle Scrapy's concurrent requests, from small crawls to heavy production pipelines.
gateway.proxyrotator.com:8080.pip install scrapy.Throughout this guide, replace USER:PASS with your real gateway credentials.
Our gateway already rotates, so you only need one proxy line. No scrapy-rotating-proxies package required.
The simplest method is to attach the proxy on each request in start_requests. Scrapy's built-in HttpProxyMiddleware reads request.meta['proxy'] automatically.
import scrapy
PROXY = "http://USER:PASS@gateway.proxyrotator.com:8080"
class IpSpider(scrapy.Spider):
name = "ipcheck"
def start_requests(self):
urls = ["https://api.ipify.org"] * 5
for url in urls:
# gateway rotates, so each request exits a new IP
yield scrapy.Request(
url,
meta={"proxy": PROXY},
callback=self.parse,
dont_filter=True,
)
def parse(self, response):
self.logger.info("Exit IP: %s", response.text)
Run it with scrapy runspider spider.py. Each of the five requests prints a different IP.
To avoid repeating the proxy on each request, set it once in a tiny downloader middleware. Drop this in middlewares.py and enable it in settings.py.
class ProxyRotatorMiddleware:
PROXY = "http://USER:PASS@gateway.proxyrotator.com:8080"
def process_request(self, request, spider):
request.meta["proxy"] = self.PROXY
DOWNLOADER_MIDDLEWARES = {
"myproject.middlewares.ProxyRotatorMiddleware": 350,
"scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware": 750,
}
Prefer not to embed credentials? Whitelist your server IP in the dashboard, then drop the USER:PASS@ part. No username or password is needed.
PROXY = "http://gateway.proxyrotator.com:8080" # in start_requests or your middleware request.meta["proxy"] = PROXY
Before running a full crawl, confirm the gateway is reachable and rotating from the command line.
curl -x http://USER:PASS@gateway.proxyrotator.com:8080 https://api.ipify.org # run it again, you get a different IP
A different IP on each run confirms your credentials work and the gateway is rotating.
Use rotating proxies for most crawls: every Scrapy request exits a fresh IP, which is ideal for high-volume data collection where you do not need to keep a session. Choose sticky proxies when a target requires the same IP across several requests, such as a login followed by paginated pages. You can switch between them from your dashboard without changing your spider.
Create an account, grab your gateway credentials, and get a new IP per request from a 100M+ pool. Plans from $24.95/mo.