Getting Started

Welcome to the This Day in History API documentation. Get started in minutes with our simple REST API.

Quick Start

1. Get Your API Key

Sign up and generate your free API key from the dashboard.

Create Free Account →

2. Make Your First Request

curl -H "x-api-key: YOUR_API_KEY" \
  https://thisdayinhistory.io/api/facts/today

3. Get Response

{
  "date": "1/12",
  "count": 8,
  "facts": [
    {
      "id": 1,
      "month": 1,
      "day": 12,
      "year": 2010,
      "title": "Haiti Earthquake",
      "description": "Magnitude 7.0 earthquake...",
      "category": "Disasters",
      "created_at": "2024-01-01T00:00:00.000Z"
    }
  ]
}

Base URL

https://thisdayinhistory.io/api