Automated social media bot
Astronomy Bot
A Node.js Mastodon bot that posts astronomy content from NASA and other APIs, from the ISS's position to moon phases, and can locate any body in the solar system.
- Status
- Live
- Built with
- Node.js, JavaScript

Why I built it
A learning exercise in Node.js and the Twitter and Mastodon APIs, connecting to third-party APIs like NASA, and doing the calculations to locate any body in the solar system at any date and time. It started as a Twitter bot and moved to Mastodon.
What I built
Daily posts include NASA's Astronomy Picture of the Day, the EPIC Blue Marble image and a Mars rover photo. Every fifteen minutes it also posts one of: the ISS's current position, an astronaut or spacecraft spotlight, upcoming launches, the number of people on and off Earth, a James Webb telescope image, or the moon phase in both hemispheres.
You can message it your coordinates to find out which planet you're looking at. pm2 keeps it running, and the codebase has been cloned and repurposed for other bots.
Screenshots
Open full sizeBlue Marble photo of the day post
Open full sizeMoon phase post for the northern hemisphere
Open full sizeSpacecraft spotlight post
Open full sizeJames Webb Space Telescope photo post
Open full sizePost showing how many people are on and off Earth

