Mars Rover Photos

Number of APIs: 1

Mars Rover Photos

Image data gathered by NASA's Curiosity, Opportunity, and Spirit rovers on Mars

This API is designed to collect image data gathered by NASA's Curiosity, Opportunity, and Spirit rovers on Mars and make it more easily available to other developers, educators, and citizen scientists. This API is maintained by Chris Cerami. Each rover has its own set of photos stored in the database, which can be queried separately. There are several possible queries that can be made against the API. Photos are organized by the sol (Martian rotation or day) on which they were taken, counting up from the rover's landing date. A photo taken on Curiosity's 1000th Martian sol exploring Mars, for example, will have a sol attribute of 1000. If instead you prefer to search by the Earth date on which a photo was taken, you can do that too.Along with querying by date, results can also be filtered by the camera with which it was taken and responses will be limited to 25 photos per call. Queries that should return more than 25 photos will be split onto several pages, which can be accessed by adding a 'page' param to the query.Each camera has a unique function and perspective, and they are named as follows:

Rover Cameras

AbbreviationCameraCuriosityOpportunitySpirit
FHAZFront Hazard Avoidance Camera✔✔✔
RHAZRear Hazard Avoidance Camera✔✔✔
MASTMast Camera✔
CHEMCAMChemistry and Camera Complex✔
MAHLIMars Hand Lens Imager✔
MARDIMars Descent Imager✔
NAVCAMNavigation Camera✔✔✔
PANCAMPanoramic Camera✔✔
MINITESMiniature Thermal Emission Spectrometer (Mini-TES)✔✔

Querying by Martian sol

ParameterTypeDefaultDescription
solintnonesol (ranges from 0 to max found in endpoint)
camerastringallsee table above for abbreviations
pageint125 items per page returned
api_keystringDEMO_KEYapi.nasa.gov key for expanded usage

Example queries

Querying by Earth date

ParameterTypeDefaultDescription
earth_dateYYYY-MM-DDnonecorresponding date on earth for the given sol
camerastringallsee table above for abbreviations
pageint125 items per page returned
api_keystringDEMO_KEYapi.nasa.gov key for expanded usage

Example query

https://api.nasa.gov/mars-photos/api/v1/rovers/curiosity/photos?earth_date=2015-6-3&api_key=DEMO_KEY

Mission Manifest

A mission manifest is available for each Rover at /manifests/rover_name. This manifest will list details of the Rover's mission to help narrow down photo queries to the API. The information in the manifest includes:

KeyDescription
nameName of the Rover
landing_dateThe Rover's landing date on Mars
launch_dateThe Rover's launch date from Earth
statusThe Rover's mission status
max_solThe most recent Martian sol from which photos exist
max_dateThe most recent Earth date from which photos exist
total_photosNumber of photos taken by that Rover

It also includes a list of objects under the photos key which are grouped by sol, and each of which contains:

KeyDescription
solMartian sol of the Rover's mission
total_photosNumber of photos taken by that Rover on that sol
camerasCameras for which there are photos by that Rover on that sol

An example entry from a sol at /manifests/Curiosity might look like:

{sol: 0, total_photos: 3702, cameras: [ CHEMCAM, FHAZ, MARDI, RHAZ]}

This would tell you that this rover, on sol 0, took 3702 photos, and those are from among the CHEMCAM, FHAZ, MARDI, and RHAZ cameras.

  1. Mars Rover Photos GET https://api.nasa.gov/mars-photos/api/v1/rovers/curiosity/photos?sol=1000&camera&page