Proxy Integration with Scrapy Proxy Middleware

Learn how to set up residential proxies with the Scrapy proxy middleware.

115M+

ethically-sourced IPs

#1

response time

99.86%

success rate

100%

uptime

<0.6s

response time

What is the Scrapy proxy middleware?

Scrapy is an open-source web crawling framework for Python that extracts data from websites, processes it, and stores it. The proxy middleware enables it to bypass IP-based rate limiting and access geographically restricted content, improving the efficiency and reach of web scraping and crawling tasks.

Asynchronous scraping

Ensure lightning-fast data collection by allowing multiple requests to be processed simultaneously.

Built-in selectors

Streamline data extraction by quickly and accurately gathering the information you need from web pages.

Middleware support

Integrate proxies in just minutes thanks to simple middleware support.

Why residential proxies?

A residential proxy serves as a mediator, allowing users to get an IP address from an authentic desktop or mobile device connected to a local network. Due to its origin, residential proxies are a perfect match for overcoming geo-restrictions, bypassing CAPTCHAs, managing multiple accounts, and conducting web testing with the CapSolver platform.


Decodo offers top-notch residential proxies with an extensive IP pool of over 55M IPs across 195+ locations. With an unparalleled responsive rate, clocking in at under 0.6 seconds, a success rate of 99.86%, and an affordable entry point with Pay As You Go, Decodo is a great deal for hustlers and fast-growing companies.

Set up Decodo proxies with Scrapy

To install the Scrapy proxy middleware, you’ll need to set up a Scrapy project first. Follow the official installation and documentation to create your project. Then, follow the instructions below to set up the middleware:

Screenshot-1.png

Getting residential proxies

Log in to your Decodo dashboard, find residential proxies by choosing Residential under the Residential Proxies column on the left panel, and select a plan that suits your needs. Then, follow these steps:


  1. Open the Proxy setup tab.
  2. Configure the parameters: set your authentication method, location, session type, and protocol
  3. Select the number of proxy endpoints you want to generate (default – 10). 
  4. Copy the endpoints by clicking the Copy button.
Installation

Installation

Once you’ve obtained the endpoint information, you can install the middleware:


  1. Open your terminal tool and navigate to the project folder using cd yourprojectname.
  2. Download the proxy middleware using the following command: curl https://raw.githubusercontent.com/Decodo/Scrapy-Middleware/master/decodo_auth.py > decodo_auth.py or get it from the GitHub repository.

Configuration

Configuration

  1. Open the settings.py file in your project folder.
  2. Edit the file by adding the following properties at the bottom:

DOWNLOADER_MIDDLEWARES = {
'scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware': 110,
'yourprojectname.decodo_auth.ProxyMiddleware': 100,
}

SMARTPROXY_USER = 'username'## Decodo username
SMARTPROXY_PASSWORD = 'password'## Decodo password
SMARTPROXY_ENDPOINT = 'gate.decodo.com'## Endpoint you'd like to use
SMARTPROXY_PORT = '7000'## Port of the endpoint you're using


3. Change the yourprojectname in the above to the name of your project folder.


4. Enter the Decodo credentials and endpoint information you’ve received from the dashboard.


5. Your web crawlers will now be going through Decodo proxies.

Reliable proxies at affordable prices

Pick a plan that suits you. Get ahead with unblockable and stable proxies.

2 GB

SAVE 50%

$6.0

$3.0

/GB

Total:$12$6+ VAT billed monthly

Use discount code - RESI50

8 GB

SAVE 50%

$5.5

$2.75

/GB

Total:$44$22+ VAT billed monthly

Use discount code - RESI50

25 GB

POPULAR
SAVE 50%

$5.2

$2.6

/GB

Total:$130$65+ VAT billed monthly

Use discount code - RESI50

50 GB

SAVE 50%

$4.9

$2.45

/GB

Total:$245$123+ VAT billed monthly

Use discount code - RESI50

100 GB

SAVE 50%

$4.5

$2.25

/GB

Total:$450$225+ VAT billed monthly

Use discount code - RESI50

PAY AS YOU GO

No commitment

$7.0

$3.5

/GB

Total:$7$3.5+ VAT

250 GB

SAVE 50%

$4.0

$2.0

/GB

Total:$1000$500+ VAT billed monthly

Use discount code - RESI50

500 GB

SAVE 50%

$3.5

$1.75

/GB

Total:$1750$875+ VAT billed monthly

Use discount code - RESI50

1000 GB

SAVE 50%

$3.0

$1.5

/GB

Total:$3000$1500+ VAT billed monthly

Use discount code - RESI50

With each residential proxy plan, you access:

115M+ ethically-sourced IPs in 195+ locations

HTTP(S) & SOCKS5 support

Country, state, city, ZIP code, and ASN-level targeting

Rotating and sticky session options

<0.6s avg. response time

99.86% success rate

99.99% uptime

Seamless integration with scraping tools and bots

24/7 tech support

14-day money-back

SSL Secure Payment

Your information is protected by 256-bit SSL

What people are saying about us

We're thrilled to have the support of our 130K+ clients and the industry's best.

Attentive service

The professional expertise of the Decodo solution has significantly boosted our business growth while enhancing overall efficiency and effectiveness.

N

Novabeyond

Easy to get things done

Decodo provides great service with a simple setup and friendly support team.

R

RoiDynamic

A key to our work

Decodo enables us to develop and test applications in varied environments while supporting precise data collection for research and audience profiling.

C

Cybereg

Decodo-best-usability-award-2025-by-G2

Best Usability 2025

Awarded for the ease of use and fastest time to value for proxy and scraping solutions.

Decodo-Highest-User-Adoption-2025-award-by-G2

Best User Adoption 2025

Praised for the seamless onboarding experience and impactful engagement efforts.

Decodo-best-value-by-Proxyway-2025-award

Best Value 2025

Recognized for the 5th year in a row for top-tier proxy and scraping solutions.

Featured in:

Cybernews
Hackernoon
Techjury
Techradar
Yahoo news
Cybernews
Hackernoon
Techjury
Techradar
Yahoo news

Explore our other proxy line products

What are proxies?

A proxy is an intermediary between your device and the internet, forwarding requests between your device and the internet while masking your IP address.

Residential Proxies

from $1.5/GB

Real, physical device IPs that provide a genuine online identity and enhance your anonymity online. Learn more

ISP Proxies

from $0.27/IP

IPs assigned by Internet Service Providers (ISPs), offering efficient and location-specific online access with minimal latency. Learn more

Mobile Proxies

from $2.25/GB

Mobile device based IPs offering anonymity and real user behavior for mobile-related activities on the internet. Learn more

Datacenter Proxies

from $0.026/IP

Remote computers with unique IPs for tasks requiring scalability, fast response times, and reliable connections. Learn more

Site Unblocker

from $0.95/1K req

A powerful application for all proxying activities offering dynamic rendering, browser fingerprinting, and much more. Learn more

Decodo Blog

Build knowledge on residential proxies, or pick up some dope ideas for your next project – our blog is just the perfect place.

Most recent

Mastering Web Scraping Pagination: Techniques, Challenges, and Python Solutions

Pagination is the system websites use to split large datasets across multiple pages for faster loading and better navigation. In web scraping, handling pagination is essential to capture complete datasets rather than just the first page of results. This guide explains what pagination is, the challenges it creates, and how to handle it efficiently with Python.

Dominykas Niaura

Oct 28, 2025

10 min read

Most popular

How to scrape Google Maps

How to Scrape Google Maps: A Step-By-Step Tutorial 2025

Dominykas Niaura

Aug 18, 2025

10 min read

Residential vs Datacenter Proxies: Which Should You Choose?

Vilius Sakutis

Dec 19, 2023

7 min read

Python Errors and Exceptions

Python Errors and Exceptions: An Ultimate Guide to Different Types and Solutions

Zilvinas Tamulis

Feb 05, 2024

6 min read

ChatGPT web scraping

How to Leverage ChatGPT for Effective Web Scraping

Dominykas Niaura

Aug 20, 2025

8 min read

Frequently asked questions

What is Scrapy?

Scrapy is an open-source web crawling framework for Python designed to extract, process, and store data from websites.

What is Scrapy used for?

Scrapy is used to create web crawlers (spiders) that define how to navigate and scrape web pages, making it a powerful tool for web scraping and data mining tasks.

Be aware that any tools mentioned in this article belong to a third party, not Decodo. Therefore, Decodo will not be responsible for any of the services offered by the third-party. Make sure to thoroughly review the third-party’s policies and practices, or do your due diligence, before using or accessing any of their services.

The Fastest Residential Proxies

Dive into a 115M+ ethically-sourced residential IP pool from 195+ locations worldwide.

14-day money-back option

© 2018-2025 decodo.com. All Rights Reserved