NASA Pics

Get data from NASAs API

Overview

This node retrieves photos taken by NASA's Mars Rovers on a specified Earth date. It is useful for space enthusiasts, researchers, educators, or developers who want to access and display authentic Mars surface images captured by different rovers. For example, you can use this node to fetch the latest photos from the Curiosity rover to analyze Martian terrain changes or to create educational content showcasing Mars exploration.

Properties

Name Meaning
Rover Name Choose which Mars Rover to get a photo from. Options: Curiosity, Opportunity, Perseverance, Spirit
Date The Earth date for which to retrieve Mars Rover photos. The date is formatted as YYYY-MM-DD

Output

The node outputs JSON data containing an array of photos taken by the selected Mars Rover on the specified Earth date. Each photo object typically includes metadata such as the image URL, camera details, and the date the photo was taken. This allows downstream nodes or workflows to process, display, or store these images. The node does not output binary data directly but provides URLs to the images.

Dependencies

  • Requires an API key credential for NASA's public API.
  • The node makes HTTP GET requests to NASA's Mars Rover Photos API endpoint at https://api.nasa.gov/mars-photos/api/v1/rovers/{roverName}/photos.
  • The user must configure the node with a valid NASA API key credential in n8n.

Troubleshooting

  • No photos returned: If no photos are returned for a given date and rover, it may be because the rover did not capture any images on that Earth date. Try selecting a different date or rover.
  • Invalid API key or authentication errors: Ensure the NASA API key credential is correctly configured and active.
  • Date format issues: The date input is automatically converted to ISO format (YYYY-MM-DD). Providing invalid dates may cause errors.
  • API rate limits: NASA's API has usage limits; excessive requests may result in temporary blocking. Consider adding delays or caching results.

Links and References

Discussion