I Wrote A Bot That Won Twitter Competitions

I Wrote A Bot That Won Twitter Competitions

This is the story of how I wrote a Twitter bot to automatically enter competitions and ended up winning on average 4 competitions per day, every day, for about 9 months straight.

If you’ve ever used Twitter, you’ve probably seen a tweet that looks something like this:

Maybe you’ve actually retweeted it, maybe not, but everyone wants to know: does anyone ever win those competitions? To discover the answer to that question, I wrote a Python script that logs into Twitter, searches for tweets that say something along the lines of “retweet to win!” and then retweets them.

I’m not sure if anyone else has done this before, but I didn’t see any evidence of other bots that were behaving like mine. I did however see evidence of real people who were manually doing the job of my bot by retweeting hundreds of competitions over several hours.

Some competitions require you to follow the original poster, so after discovering a candidate tweet I made sure it wasn’t an entry to a competition, but the original competition itself, and then checked to see if they wanted a follow. If so, I followed them and retweeted.

I Wrote A Bot That Won Twitter Competitions

The most difficult part of this project was preventing the bot from getting banned by Twitter. They have rate limits which prevent you from tweeting too often, retweeting too aggressively, and creating “following churn” by rapidly following and unfollowing people. Twitter doesn’t publish these numbers, so I had to figure them out by trial and error. Twitter also limits the total number of people you can follow given a certain number of followers. If you have below a few hundred followers, you cannot follow more than 2000 people.

Since a lot of competitions required following the original poster, I used a FIFO to make sure I was only following the 2000 most recent competition entries. That gave me long enough to make sure the person I unfollowed had already ended their competition and it kept the follow/unfollow churn rate below the rate limit. I got lucky in that the rate of new competitions launched on Twitter is less than the rate that I could retweet, meaning I was able to enter every competition I could find.

How many was that? Well, over the 9 months I ran my script, I entered approximately 165,000 competitions. Of those, I won around 1000.

So that means my win rate was just over half a per cent, which is pretty miserable, especially when you consider that a good portion of those winnings were things like logos and graphics, which is Twitter slang for a customised image for use in a gaming or YouTube profile. They tend to look like this.

Another very large percentage of the things I won were tickets to events. I did manage to go to an event that I won tickets to, but the majority of them were for concerts and events in other countries that I obviously couldn’t go to. I also won a lot of currency to online games like FIFA. And when the game Destiny was giving out beta codes, I won about 30 of them through as many competitions. I won a lot of cool stuff too though, and getting mysterious things in my mailbox each day was pretty fun. It ended up being a free way to get this effect:

I Wrote A Bot That Won Twitter Competitions

Here’s a picture of The Haul:

I Wrote A Bot That Won Twitter Competitions

My favourite thing that I won was a cowboy hat autographed by the stars of a Mexican soap opera that I had never heard of. I love it because it really embodies the totally random outcome of these competitions. The most valuable thing I won was a trip to New York Fashion Week, which included a limo ride to the show if you lived in a state near New York for you and a friend, and $US500 spending money each, and tickets to some of the shows. That had a retail value of $US4000, but I didn’t claim it because 1) I don’t live near New York and 2) I didn’t want to pay the taxes on a $US4000 prize.

I ended up not claiming the majority of the things I won because I wasn’t able to use them or attend them. In those cases, I just messaged them back and told them to give the prize to someone else. And before you report me to the tax office, yes, I reported and paid taxes on all of the winnings I actually accepted/received.

I had a lot of pretty interesting interactions with the unwashed masses of Twitter, like this:

I Wrote A Bot That Won Twitter Competitions

Most competitions informed the winners by direct message, and a lot of people have an automatic direct message sent to you when you follow them (like the one above), so I had to spend a decent amount of time going though my DMs to find legit winner notifications.

Some people thought it would be hilarious if they mimicked competitions by tweeting things like “RT this and you could win absolutely nothing!!”. Naturally, my bot found those tweets and dutifully retweeted them. So there were several instances of me winning “absolutely nothing.”

Another variation on that was this guy who offered a unique prize:

Yes indeed, I won this competition and the fantastic prize of warped “tupaware” lids. Unfortunately, like lots of other competitions, I never got anything in the mail.

After a while of winning competitions, I realised I could use my bot for good too. Lots of people raise money for charities by asking people to retweet. Something like this:

Sometimes they’re fake, but what do I care? I added search terms for tweets like this and had enough bandwidth to retweet every tweet of this kind without going over the rate limit.

If you want to see the full list of stuff I won, it’s here. There are a few gems in there and I’ll leave it to you to discover them.


Hunter Scott is a computer engineer from Georgia Tech. This post was syndicated from his website with permission.


The Cheapest NBN 50 Plans

It’s the most popular NBN speed in Australia for a reason. Here are the cheapest plans available.

At Gizmodo, we independently select and write about stuff we love and think you'll like too. We have affiliate and advertising partnerships, which means we may collect a share of sales or other compensation from the links on this page. BTW – prices are accurate and items in stock at the time of posting.