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.

(4.3)

From 6,043 users

700+

Applications using this API

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
271ms283ms319ms476ms1078ms

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

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.