NewConnect Claude, Gemini, ChatGPT, and other AI agents to API Ninjas via our MCP server

Historical Events API

The Historical Events API allows you to search for famous events in history. From ancient antiquity to modern times, events from all parts of human civilization are recorded.

(4.3)

From 10,001 users

3,700+

Applications using this API

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
393ms412ms463ms702ms1115ms

Didn't find what you were looking for? Suggest an improvement


/v1/historicalevents GET

https://api.api-ninjas.com/v1/historicalevents

Returns a list of up to 10 events that match the search parameters. Use the offset parameter to paginate through more results.

Parameters

  • text  optional

    Query text to search events by. Use keywords or short phrases for best match results.

  • year  optional

    4-digit year (e.g. 1776). For BC/BCE years, use a negative integer (e.g. -351 for 351 BC).

  • month  optional

    Integer month (e.g. 3 for March).

  • day  optional

    Calendar day of the month.

  • offset  optional premium only

    Number of results to offset pagination.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

A JSON array of objects, each containing the following fields, or an error if the request is unsuccessful.

  • year

    The year of the event. For BC/BCE years, this is a negative integer (e.g., "-45" for 45 BC).

  • month

    The month of the event as a 2-digit string (e.g., "01" for January).

  • day

    The day of the month as a 2-digit string.

  • event

    Description of the historical event.

Sample Request Live Demo!

text
year
month
day
offset premium

Try this endpoint live with a free API key

Instant access — no credit card required.

https://api.api-ninjas.com/v1/historicalevents?text=roman%20empire

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
[
    {
      year:"-45",
      month:"01",
      day:"01",
      event:"The Julian calendar takes effect as the civil calendar of the Roman Empire, establishing January 1 as the new date of the new year."
    },
    {
      year:"366",
      month:"01",
      day:"02",
      event:"The Alemanni cross the frozen Rhine in large numbers, invading the Roman Empire."
    },
    {
      year:"250",
      month:"01",
      day:"03",
      event:"Emperor Decius orders everyone in the Roman Empire (except Jews) to make sacrifices to the Roman gods."
    },
    {
      year:"-27",
      month:"01",
      day:"16",
      event:"Gaius Julius Caesar Octavianus is granted the title Augustus by the Roman Senate, marking the beginning of the Roman Empire."
    },
    {
      year:"379",
      month:"01",
      day:"19",
      event:"Emperor Gratian elevates Flavius Theodosius at Sirmium to Augustus, and gives him authority over all the eastern provinces of the Roman Empire."
    },
    {
      year:"1719",
      month:"01",
      day:"23",
      event:"The Principality of Liechtenstein is created within the Holy Roman Empire."
    },
    {
      year:"98",
      month:"01",
      day:"27",
      event:"Trajan succeeds his adoptive father Nerva as Roman emperor; under his rule the Roman Empire will reach its maximum extent."
    },
    {
      year:"1018",
      month:"01",
      day:"30",
      event:"Poland and the Holy Roman Empire conclude the Peace of Bautzen."
    },
    {
      year:"421",
      month:"02",
      day:"08",
      event:"Constantius III becomes co-Emperor of the Western Roman Empire."
    },
    {
      year:"55",
      month:"02",
      day:"11",
      event:"The death under mysterious circumstances of Tiberius Claudius Caesar Britannicus, heir to the Roman empire, on the eve of his coming of age clears the way for Nero to become Emperor."
    }
]

Code Examples

1 2 curl -X GET "https://api.api-ninjas.com/v1/historicalevents?month=1&day=1" \ -H "X-Api-Key: YOUR_API_KEY"

If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.

Frequently Asked Questions

  • Yes, but you must have a premium subscription. Commercial use of the Historical Events API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.
  • Sign up for a free account to instantly get your API key, then pass it in the X-Api-Key header on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.
  • Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.
  • The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.
  • Pass keywords or a short phrase to the text parameter (e.g. 'roman empire') to search by topic, or use the year, month, and day parameters to filter by date; for BC/BCE years use a negative integer such as -351 for 351 BC. You can also explore date-based events with the related Day in History API.
  • Each request returns a JSON array of up to 10 event objects, each with a year, month (a 2-digit string like '01'), day (a 2-digit string), and an event description. See the error codes page for what is returned when a request is unsuccessful.
  • Each call returns up to 10 matching events, so use the offset parameter to paginate through additional results; note that offset is a premium-only feature available on paid plans.
  • It is great for building 'on this day' widgets, trivia and quiz games, educational timelines, and history-themed content that draws on famous events from ancient antiquity to modern times. Pair it with the Historical Figures API or browse all of our APIs for more options.