DEV Community

Cover image for I built 'EarthquakeToday,' a 24/7 multi-platform bot in Python. In its first month, it's served 3k visitors.

I built 'EarthquakeToday,' a 24/7 multi-platform bot in Python. In its first month, it's served 3k visitors.

The Problem

I've always been frustrated by how difficult it is to get simple, real-time earthquake data. Most news sites are slow, cluttered with ads, and make it hard to find the basic info you need.

My philosophy is that essential safety data should always be free and hassle-free.

The Solution: A Bot & A Website

So, I decided to build a complete, end-to-end solution to solve this. My project has two parts:

The Website: https://earthquaketoday.org
A clean, fast, 100% ad-free site for viewing real-time earthquake data on an interactive map.

The Bot: A 24/7 Python bot that automates everything.

How the Bot Works (The Tech Stack)

This was the fun part! I built the bot in Python, running 24/7 on an Ubuntu VPS, managed by pm2.

Every 3 minutes, the bot's job queue fires and it:

Fetches Data: Scrapes the latest 1-hour feed from the official USGS API.

Filters Data: Ignores any quake below M1.5 and checks against a local JSON file to prevent posting duplicates.

Posts to Socials:

Formats and posts an alert to Telegram (using python-telegram-bot).

Formats a different, more engaging post (with dynamic location hashtags!) to X/Twitter (using tweepy).

Posts to my official Facebook Page (using the facebook-sdk).

Pings for SEO: This is my favorite part. The instant a new quake is posted, the bot automatically pings IndexNow (both Bing and Yandex) with the new earthquaketoday.org URL. This gets the new quake page indexed by search engines in minutes.

The bot is also interactive! I built in command handlers so users can DM the bot and get the latest quake info on demand.

The Result (So Far)

I'm humbled to see that in just its first month, with no promotion other than its own automated posts, the site has already served nearly 3,000 visitors!
ErthaquakeToday traffic info by Semrush

It feels great to build a tool that people are genuinely finding useful.

What do you think? I'd love to hear any feedback from the dev community!

Top comments (0)