TL;DR
Byabbe's "What Happened Today" API returns historical events, notable births, and famous deaths for any given month and day. Each entry includes the year, description, and category (event, birth, or death). It's a simple educational API for history apps, daily trivia, and "on this day" features.
Quick start: https://byabbe.se/on-this-day/1/1/events.json
No API key needed — just make a request!
How to Use This API
1. Events on a Specific Date
https://byabbe.se/on-this-day/12/25/events.json
Returns historical events that happened on December 25th. Format: /month/day/events.json.
2. Births on a Date
https://byabbe.se/on-this-day/7/20/births.json
Notable people born on July 20th. Entries include year, description, and optional Wikipedia link.
3. Deaths on a Date
https://byabbe.se/on-this-day/4/15/deaths.json
Famous deaths that occurred on April 15th.
4. All Data for a Date
https://byabbe.se/on-this-day/6/16
Returns events, births, and deaths all at once. Omitting the .json suffix returns HTML.
5. JavaScript — Today in History
async function getTodayInHistory() {
const today = new Date();
const month = today.getMonth() + 1;
const day = today.getDate();
const resp = await fetch(
`https://byabbe.se/on-this-day/${month}/${day}/events.json`
);
const data = await resp.json();
const container = document.getElementById('history-events');
if (container) {
container.innerHTML = data.events
.slice(0, 10)
.map(e => `${e.year}: ${e.description} `)
.join('');
}
}
getTodayInHistory();
6. Python — Find Events Matching a Keyword
import requests
def search_events_on_date(month, day, keyword='invented'):
resp = requests.get(
f'https://byabbe.se/on-this-day/{month}/{day}/events.json'
)
data = resp.json()
matches = [e for e in data.get('events', [])
if keyword.lower() in e['description'].lower()]
print(f"{len(matches)} events on {month}/{day} matching '{keyword}':")
for e in matches[:5]:
print(f" {e['year']}: {e['description']}")
search_events_on_date(3, 14, 'patent')
https://byabbe.se/on-this-day/6/16/events.json
Frequently Asked Questions
- How far back does the data go?
- Events span thousands of years — from ancient history through modern times. The database covers a broad range of significant historical occurrences.
- How many events per date?
- Varies by date. Major dates (like holidays) may have dozens of events. Less notable dates might have fewer. Births and deaths similarly vary.
- What categories are available?
- Three categories:
events(historical occurrences),births(notable people born), anddeaths(notable people who died). Each has its own .json endpoint. - Are there Wikipedia links?
- Some entries include optional Wikipedia links for further reading. The
wikipediafield may contain a URL when available. - Is the data accurate?
- Data is sourced from public historical records. As with any historical data, some entries may reflect different calendar systems (Julian vs Gregorian) for very old dates.
API Details
- API URL
https://byabbe.se/on-this-day- Documentation
- GitHub Repository
- Category
- Date
- Authentication
- Not Required
- Geographic Coverage
- Global — World history
What You Can Build
- "On This Day" widget for news and magazine websites
- Historical events calendar — browse by date through history
- Birthday explorer — see who else shares a birth date
- Daily history email or notification service
- Trivia app with daily historical questions