Holiday Sale! Get over 30% off when you subscribe to an annual plan!

Day in History API

The Day in History API provides historical events that happened on a specific date. Free users receive events for today's date only - premium users can specify custom dates and control pagination.

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
243ms269ms340ms515ms1107ms

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


/v1/dayinhistory GET

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

Returns historical events that occurred on a specific date. If no date parameters are provided, returns events for today's date.

Parameters

  • month  optional premium

    The month of the historical events to retrieve. Must be between 1 and 12. If specified, day must also be provided. If both are omitted, today's date is used.

  • day  optional premium

    The day of the month for the historical events to retrieve. Must be between 1 and 31. If specified, month must also be provided. If both are omitted, today's date is used.

  • offset  optional premium

    The number of results to skip. Must be zero or a positive integer. Default is 0.

  • limit  optional premium

    The maximum number of results to return. Must be between 1 and 30. Default is 1.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

Returns a JSON array of objects, each with the following properties:

  • year

    The year of the historical event.

  • month

    The month of the historical event (1-12).

  • day

    The day of the month of the historical event.

  • event

    A description of the historical event.

Sample Request Live Demo!

month premium
day premium
offset premium
limit premium

Try this API endpoint with all available parameters in our API playground

https://api.api-ninjas.com/v1/dayinhistory?month=7&day=20

Headers

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

Sample Response

JSON
1 2 3 4 5 6 7 8 [ { "year": 1969, "month": 7, "day": 20, "event": "Apollo program: Apollo 11's crew successfully makes the first human landing on the Moon in the Sea of Tranquility. Americans Neil Armstrong and Buzz Aldrin become the first humans to walk on the Moon six and a half hours later." } ]

Code Examples

1 2 curl -X GET "https://api.api-ninjas.com/v1/dayinhistory" \ -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.