{"id":16906737,"url":"https://github.com/corincerami/mars-photo-api","last_synced_at":"2025-04-08T17:16:40.659Z","repository":{"id":39702829,"uuid":"37878279","full_name":"corincerami/mars-photo-api","owner":"corincerami","description":"A Rails API for photo data from NASA's Mars Rovers","archived":false,"fork":false,"pushed_at":"2025-03-21T23:38:23.000Z","size":4914,"stargazers_count":376,"open_issues_count":9,"forks_count":52,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-04-01T16:15:55.454Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://api.nasa.gov/#MarsPhotos","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/corincerami.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-22T20:13:21.000Z","updated_at":"2025-03-29T19:45:03.000Z","dependencies_parsed_at":"2024-10-26T21:18:09.275Z","dependency_job_id":"14038fbc-e0e4-4cbe-bbf9-627f174edfef","html_url":"https://github.com/corincerami/mars-photo-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corincerami%2Fmars-photo-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corincerami%2Fmars-photo-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corincerami%2Fmars-photo-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corincerami%2Fmars-photo-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/corincerami","download_url":"https://codeload.github.com/corincerami/mars-photo-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247888559,"owners_count":21013001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T18:44:09.976Z","updated_at":"2025-04-08T17:16:40.638Z","avatar_url":"https://github.com/corincerami.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Mars Rover Photo API\n\nAPI Version: [![Version](https://img.shields.io/badge/version-1.1.2-brightgreen.svg)](http://github.com/chrisccerami/mars-photo-api)\n\nBuild status: [![CircleCI](https://dl.circleci.com/status-badge/img/gh/corincerami/mars-photo-api/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/corincerami/mars-photo-api/tree/master)\n\nTest coverage: [![Test Coverage](https://codeclimate.com/github/chrisccerami/mars-photo-api/badges/coverage.svg)](https://codeclimate.com/github/chrisccerami/mars-photo-api/coverage)\n\n\nThis API is designed to collect image data gathered by NASA's Perseverance, Curiosity, Opportunity, and Spirit rovers on Mars and make it more easily available to other developers, educators, and citizen scientists.\n\n## API Keys\n\nYou can use the API key *DEMO_KEY* to check things out. However, if you will be intensively using the APIs to, say, support a mobile application, then you should sign up for a [NASA developer key](https://api.nasa.gov/index.html#apply-for-an-api-key). You can include this API key in a request with a query parameter `api_key=\u003cYOUR_KEY\u003e`.\n\n## Photo Attributes\n\nEach 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.\n\nAlong with querying by date, results can also be filtered by the camera with which it was taken. Each camera has a unique function and perspective, and they are named as follows:\n\n### Cameras\n#### Perseverance rover\n\n  Abbreviation | Camera\n  ------------ | ------------------------------\n   EDL_RUCAM|Rover Up-Look Camera\n   EDL_RDCAM|Rover Down-Look Camera\n   EDL_DDCAM|Descent Stage Down-Look Camera\n   EDL_PUCAM1|Parachute Up-Look Camera A\n   EDL_PUCAM2|Parachute Up-Look Camera B\n   NAVCAM_LEFT|Navigation Camera - Left\n   NAVCAM_RIGHT|Navigation Camera - Right\n   MCZ_RIGHT|Mast Camera Zoom - Right\n   MCZ_LEFT|Mast Camera Zoom - Left\n   FRONT_HAZCAM_LEFT_A|Front Hazard Avoidance Camera - Left\n   FRONT_HAZCAM_RIGHT_A|Front Hazard Avoidance Camera - Right\n   REAR_HAZCAM_LEFT|Rear Hazard Avoidance Camera - Left\n   REAR_HAZCAM_RIGHT|Rear Hazard Avoidance Camera - Right\n   SKYCAM|MEDA Skycam\n   SHERLOC_WATSON|SHERLOC WATSON Camera\n\n#### Other rovers\n\n  Abbreviation | Camera                         | Curiosity | Opportunity | Spirit\n  ------------ | ------------------------------ | --------  | ----------- | ------ |\n   FHAZ|Front Hazard Avoidance Camera|✔|✔|✔|\n   RHAZ|Rear Hazard Avoidance Camera|✔|✔|✔|\n   MAST|Mast Camera| ✔||\n   CHEMCAM|Chemistry and Camera Complex  |✔||\n   MAHLI|Mars Hand Lens Imager|✔||\n   MARDI|Mars Descent Imager|✔||\n   NAVCAM|Navigation Camera|✔|✔|✔|\n   PANCAM|Panoramic Camera| |✔|✔|\n   MINITES|Miniature Thermal Emission Spectrometer (Mini-TES)| |✔|✔|\n\n## Querying the API\n\nSubstitute `https://api.nasa.gov/mars-photos/` with `https://mars-photos.herokuapp.com/` if you want to query the API from a web application. The heroku version allows cross-origin requests and *doesnt require an API key*.\n\nThe API can be queried in the following format:\n\n### Photo Endpoint\n\n#### Queries by Martian sol:\n\nQueries by sol can range from 0, which is the date of landing, up to the current maximum in the database. The current max sol for each rover can be found at that rover's endpoint.\n\nhttps://api.nasa.gov/mars-photos/api/v1/rovers/curiosity/photos?api_key=DEMO_KEY\u0026sol=1000\n\n#### Querying by Earth date:\n\nDates should be formatted as 'yyyy-mm-dd'. The earliest date available is the date of landing for each rover.\n\nhttps://api.nasa.gov/mars-photos/api/v1/rovers/curiosity/photos?api_key=DEMO_KEY\u0026earth_date=2015-6-3\n\n#### Filtering Queries by Camera:\n\nThe camera parameter is not case sensitive, but must be one of the camera abbreviations listed in the table above for the respective rover.\n\nhttps://api.nasa.gov/mars-photos/api/v1/rovers/curiosity/photos?api_key=DEMO_KEY\u0026sol=1000\u0026camera=fhaz\n\nhttps://api.nasa.gov/mars-photos/api/v1/rovers/opportunity/photos?api_key=DEMO_KEY\u0026earth_date=2015-6-3\u0026camera=pancam\n\n#### Query For Latest Photos\n\nIf you just want to receive photo data for the most recent Sol for which photos exist for a particular rover, you can visit the `/latest_photos` endpoint.\n\nhttps://api.nasa.gov/mars-photos/api/v1/rovers/curiosity/latest_photos?api_key=DEMO_KEY\n\n### Mission Manifest Endpoint\n\nA mission manifest is available for each Rover at the `/manifests/\u003crover_name\u003e`. 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:\n\n- name\n- landing_date\n- launch_date\n- status\n- max_sol\n- max_date\n- total_photos\n\nIt also includes a list of objects under the `photos` key which are grouped by `sol`, and each of which contains:\n\n- sol\n- total_photos\n- cameras\n\nAn example entry from `/manifests/Curiosity` might look like:\n\n```\n{\n  sol: 0,\n  earth_date: \"2012-08-06\"\n  total_photos: 3702,\n  cameras: [\n    \"CHEMCAM\",\n    \"FHAZ\",\n    \"MARDI\",\n    \"RHAZ\"\n  ]\n}\n```\n\nThis would tell you that this rover, on sol 0, took 3702 photos, and those are from among the CHEMCAM, FHAZ, MARDI, and RHAZ cameras.\n\nThe database will be updated regularly with the latest photos from the red planet.\n\n## Contributing\n\nIf you would like to contribute to Mars Rover Photo API, feel free to create a pull request. If you'd like to contact me, you can reach me at chrisccerami@gmail.com or on Twitter [@chrisccerami](https://twitter.com/chrisccerami).\n\n1. Fork it ( https://github.com/chrisccerami/mars-photo-api/fork )\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am 'Add some feature')\n4. Push to the branch (git push origin my-new-feature)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorincerami%2Fmars-photo-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorincerami%2Fmars-photo-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorincerami%2Fmars-photo-api/lists"}