Win Giveaways on Twitter with a Bot

2025-10-05

Back when I was studying, around 2015, I saw this post from a guy winning stuff on Twitter with a self-made bot. I couldn’t find the code, so I wrote my own.

On Twitter, at least at the time, people and companies used giveaways to promote their accounts. They asked for retweets and, in return, promised to randomly select a winner from all the retweeters to receive some kind of prize.

Hurdles

  1. Twitter enforced rate limits, so searches and retweets were limited.
  2. Some giveaways required you to also follow the account, and following too many people too quickly would get your account blocked.
  3. Surprisingly, there were other bots tweeting tweets with keywords like #retweet2win without actually offering a prize.

The first two were relatively easy to solve: just add delays and unfollow accounts after some time. That made the whole process more time-consuming, but since the number of giveaways was also limited and spread out over time, that was fine.

One day I found that one of those anti-giveaway-bot bots had my bot's name plus some suffix as its own name. So someone must have seen my bot and created an account to interfere with its mission.

To avoid wasting time retweeting those bots, I made a blacklist of accounts not to interact with. After a few days, I found most of these bots and also some scammy giveaway accounts I had no interest in retweeting.

Scams

Every other day, I would check my DMs to see if any giveaway accounts had selected me as the winner. Pretty straightforward, but, of course, most of these alleged wins were things like:

“You won the PS4! I only need you to send me 20 € on PayPal for shipping, then I’ll send it to you.”

To get real, physical prizes sent to my door, I needed to disclose my address to the giveaway creator. So I spent quite some time figuring out if the whole giveaway was a scam or not. That was a bit annoying.

Prizes

I won random stuff like:

  • tickets to expos I’d never heard of
  • gift cards for online shops
  • an educational poster for geography classes
  • self-published books
  • plushies

My favorite to this day is a Corgi certificate: a piece of relatively thick paper with a corgi on it, surrounded by the phrase “100% woof”. I don’t own a dog and have no clue what this certificate certifies. ¯\(ツ)

For stuff I couldn’t use myself (tickets to concerts in other countries, etc.), I found people on Reddit who were interested so the tickets wouldn't be wasted.

Customer Support

I made the bot open source and, after some days, had a few people emailing me asking for instructions to set it up or reporting bugs. That felt nice, finally seeing other people take interest in what I’d created. But it turned out to be quite time-consuming. And I also didn’t want armies of my bots polluting Twitter. Just, you know, mine and maybe a handful of others.

This taught me a valuable lesson: If you put some code into the world, you basically lose control over it.

After a few weeks, requests for support ended and I eventually archived the GitHub repo.

Regrets

Once a few physical wins arrived at my doorstep, I told a friend about my bot. He wanted to try it, and in an afternoon, we set it up on his Raspberry Pi.

Within a month, he won a 3D printer, surpassing pretty much everything I had won up to that time and, in hindsight, ever. Envy is an ugly emotion and it happened almost a decade ago, but it still stings somehow.

Looking back at this today, I wouldn't do something like this again. Who really likes bots on their beloved social media platform? And I won giveaways other people, potentially much more interested in the prizes, could have won. So, yeah, regret.