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.
https://api.api-ninjas.com/v1/historicalevents
Returns a list of up to 10 events that match the search parameters.
text
optionalQuery text to search events by. Use keywords or short phrases for best match results.
year
optional4-digit year (e.g. 1776
). For BC/BCE years, use a negative integer (e.g. -351
for 351 BC).
month
optionalInteger month (e.g. 3
for March).
day
optionalCalendar day of the month.
offset
optionalNumber of results to offset pagination.
X-Api-Key
requiredAPI Key associated with your account.
https://api.api-ninjas.com/v1/historicalevents?text=roman empire
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
[
{
"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."
}
]
1
2
3
4
5
6
7
8
9
import requests
text = 'roman empire'
api_url = 'https://api.api-ninjas.com/v1/historicalevents?text={}'.format(text)
response = requests.get(api_url, headers={'X-Api-Key': 'YOUR_API_KEY'})
if response.status_code == requests.codes.ok:
print(response.text)
else:
print("Error:", response.status_code, response.text)
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.