Historical Figures API

The Historical Figures API allows you to search for famous (or infamous) people in history. From ancient civilizations to the current decade, our database contains a wide range of notable individuals from all walks of life.

/v1/historicalfigures GET

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

Returns a list of up to 10 people that match the search parameters.


Parameters

  • name  required

    Name of the person to search. Includes partial results (e.g. julius will match Julius Caesar).

  • offset  optional

    Number of results to offset pagination.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Sample Request Live Demo!

name
https://api.api-ninjas.com/v1/historicalfigures?name=julius caesar

Sample Response

JSON
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 63 64 65 66 67 68 69 70 71 [ { "name": "Julius Caesar", "title": "Roman general and statesman", "info": { "born": "12 July 100 BC Rome Italy", "died": "15 March 44 BC Rome, Italy", "years": "81-45 BC", "awards": "Civic Crown", "office": [ "Consul (59, 48, 46-45, 44 BC)", "Dictator (49-44 BC)" ], "parents": [ "Gaius Julius Caesar", "Aurelia" ], "spouses": "Cossutia (disputed) Cornelia (m. 84 BC; d. 69 BC) Pompeia (m. 67 BC; div. 61 BC) Calpurnia (m. 59 BC)", "children": [ "Julia", "Caesarion (unacknowledged)", "Augustus (adoptive)" ], "partners": "Cleopatra", "conflicts": [ "War against Mytilene Siege of Mytilene", "Siege of Mytilene", "Third Mithridatic War", "Gallic Wars Battle of the Arar Battle of Bibracte Battle of Vosges Battle of the Axona Battle of the Sabis Siege of the Atuatuci Crossing of the Rhine Invasions of Britain Siege of Avaricum Siege of Gergovia Battle of Alesia Siege of Uxellodunum", "Battle of the Arar", "Battle of Bibracte", "Battle of Vosges", "Battle of the Axona", "Battle of the Sabis", "Siege of the Atuatuci", "Crossing of the Rhine", "Invasions of Britain", "Siege of Avaricum", "Siege of Gergovia", "Battle of Alesia", "Siege of Uxellodunum", "Caesar's Civil War Siege of Corfinium Siege of Brundisium Siege of Massilia Battle of Ilerda Siege of Oricum Siege of Dyrrhachium Siege of Gomphi Battle of Pharsalus Siege of Alexandria Battle of the Nile Battle of Zela Battle of Ruspina Battle of Thapsus Battle of Munda Siege of Corduba", "Siege of Corfinium", "Siege of Brundisium", "Siege of Massilia", "Battle of Ilerda", "Siege of Oricum", "Siege of Dyrrhachium", "Siege of Gomphi", "Battle of Pharsalus", "Siege of Alexandria", "Battle of the Nile", "Battle of Zela", "Battle of Ruspina", "Battle of Thapsus", "Battle of Munda", "Siege of Corduba" ], "occupation": [ "Politician", "soldier" ], "notable_work": [ "Bellum Gallicum", "Bellum Civile" ], "resting_place": "Temple of Caesar Rome 41deg53'31''N 12deg29'10''E / 41.891943degN 12.486246degE / 41.891943; 12.486246", "cause_of_death": "Assassination ( stab wounds )" } } ]

Code Examples

1 2 3 4 5 6 7 8 9 import requests name = 'julius caesar' api_url = 'https://api.api-ninjas.com/v1/historicalfigures?name={}'.format(name) 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.