NASA have recently updated their Open Data APIs portal. All of the APIs are listed and documented at the bottom of the portal, most also including examples. There are a huge number of APIs and datasets, including photography from the Mars rovers and a wealth of Earth observation data.
NASA Open APIs