How to Make a Mastodon Bot: The Definitive Guide
Welcome to the second in the series of Botwiki Definitive Guides. If you’d like to contribute to this guide, or have any questions, stop by the Botmakers community, or, if you prefer, reach out to me on Mastodon or via email.
- What kind of a bot should I make?
- How do I make a Mastodon bot? Where should I host it?
- How often should my bot post?
- Can I make a bot that searches through the public timeline?
- Do I need to attribute content posted by my bot?
- How do I get the RSS feed of my bot?
- Use the same email (sort of) for multiple accounts
- Can I make a bot that posts polls?
- Attributions and thanks
What kind of a bot should I make?¶
As I mentioned in my previous guide, and my article on ethical botmaking, your main goal should be making a bot that doesn’t annoy people. Avoid interacting with random strangers, don’t harass anyone, don’t punch down.
Be creative, be nice, entertain, or educate, there are very few limits to what your bot can do. Feel free to browse Botwiki for inspiration, or join the Botmakers community to join in with someone looking for help.
How do I make a Mastodon bot? Where should I host it?¶
How often should my bot post?¶
There is no right answer to this question and really just depends on what kind of a bot you’re making. You can always ask your followers to let you know what they prefer, or, as one botmaker decided to do, you can even make more than one version of your bot.
Keep in mind that the mastodon.social has a rate limit of 300 requests per 5 minute window for
GET requests and 100 for
POST requests. Other instances could adjust these numbers.
Can I make a bot that searches through the public timeline?¶
Do I need to attribute content posted by my bot?¶
How do I get the RSS feed of my bot?¶
To get the RSS feed of your bot’s output, add
.rss to your bot’s URL, so for example:
Use the same email (sort of) for multiple accounts¶
One neat trick you can use when registering for a new account is adding
+SOMETHING to your email address, for example,
email@example.com. This will let you use the same email address for multiple accounts — and this works for many other websites.
Can I make a bot that posts polls?¶
As of writing this guide, no.