Last Chance: Lock in $0.50/GB for Life - Price Doubles December 1st!

How To Use Proxies With Tweepy

Tweepy is an open-source Python library that users can utilize to easily access the Twitter API. It includes a set of classes and methodologies that represent Twitter’s model and API endpoints. With Tweepy, users would not have to deal with low-level details that cost them a lot of time, so they could just focus on building their desired functionalities.

Carl Gamutan

by Carl Gamutan

Publishing Date: June 28, 2022


Tweepy is an open-source Python library that users can utilize to easily access the Twitter API. It includes a set of classes and methodologies that represent Twitter’s model and API endpoints. With Tweepy, users would not have to deal with low-level details that cost them a lot of time, so they could just focus on building their desired functionalities.

If you’re creating a Twitter bot through Tweepy, then you also need to pair it with a Tweepy or Twitter proxy. Twitter, and other social media websites, have strict restrictions against the use of bots on their site so when they detect that you’re using a bot, they would immediately ban your account and blacklist your IP address.

A Tweepy proxy will prevent this from happening because it will handle all of your web requests for you so Twitter will only be able to see the IP address of the proxy server and your own IP address will be hidden. Through continuously rotating proxies, your Twitter bot would have a different IP address on a given interval which will deceive Twitter into thinking your bot’s requests come from various users and not just from a single location.

Let’s set up a Tweepy proxy server.

How To Use Proxies With Tweepy

For Windows:

To set up proxies in Windows, simply search for “Proxy Settings” in your windows search bar and open the search result.

windowsproxysettings.png

You are then given two options to choose from: Automatic proxy setup or Manual proxy setup. If you want windows to automatically detect your proxy settings, choose the first option. Choose the second option if you want to utilize a specific ip address and port number.

If you chose the first option, then:

  1. Turn on Automatically detect Settings
  2. Turn on Use setup script
  3. Enter the script address
  4. Click Save

windowsautomaticsetup.png

If you chose the second option, then:

  1. Turn on Use a proxy server
  2. Input both server address and port number
  3. If you have any addresses you would like to visit without a proxy, enter them here
  4. Turn on Don’t use the proxy server for local addresses check box if you want to access a local server without a proxy
  5. Click Save

windowsmanualsetup.png Image Alt Text: Windows Automatic Proxy Setup

For Mac:

To start configuring your proxy settings in MacOS, simply:

Step 1. Click on the Apple Icon.

macAppleIcon.png

Step 2. On the drop down menu, click on “System Preferences”.

macSystemPreferences.png

Step 3. Click on “Network”

macNetwork.png

Step 4. Click on “Advanced”

macNetworkAdvancedSettings.png

Note: Make sure to connect to your wi-fi first.

Step 5. Click on “Proxies”

macNetworkProxySettings.png

This should then redirect you to MacOS proxy settings. MacOS is more straightforward compared to windows. You only have one option which is to manually configure your proxy server.

Here are the steps to follow:

  1. Select which proxy IP protocol you want to configure. This depends on which protocols your proxy service provider offers.
  2. Turn on Secure Web Proxy
  3. Input the Proxy Server Address and Port Number
  4. Click OK to save the configurations

Note: You may be prompted for your Mac user password to save your settings.

macProxySetup.png Image Alt Text: Configuring MacOS Proxy Settings

Congratulations! You have now finished configuring a Tweepy proxy server.

Experience 10GB of Residential Proxies for 5 days

Monthly plans starting at $50

Claim my $5 trial