NASA Pics icon

NASA Pics

Get data from NASAs API

Actions2

  • Astronomy Picture of the Day Actions
  • Mars Rover Photo Actions

Overview

The "Astronomy Picture of the Day" (APOD) node fetches NASA's daily astronomy image along with its metadata. It is useful for applications that want to display or process NASA’s official daily space-related images, such as educational platforms, astronomy blogs, or digital signage showing daily space facts and images.

A practical example: Automatically retrieving the APOD each day to post on a social media channel or to include in a daily newsletter about space and astronomy.

Properties

Name Meaning
Additional Fields A collection of optional fields to customize the request.
└─ Date The specific date for which to retrieve the Astronomy Picture of the Day. Format: date.
  • The Date field allows fetching the APOD for a particular day instead of the current day. The date is sent as a query parameter formatted as YYYY-MM-DD.

Output

The node outputs JSON data representing the Astronomy Picture of the Day. This typically includes:

  • Image URL(s)
  • Title of the picture
  • Explanation or description text
  • Date of the picture
  • Media type (image or video)
  • Possibly other metadata provided by NASA’s APOD API

No binary data output is indicated in the source code.

Dependencies

  • Requires an API key credential for NASA’s API.
  • The base URL used for requests is https://api.nasa.gov.
  • The node sends HTTP GET requests to the /planetary/apod endpoint.
  • Proper configuration of the NASA API key credential in n8n is necessary.

Troubleshooting

  • Common issues:

    • Missing or invalid API key will cause authentication errors.
    • Requesting a date outside the valid range supported by NASA’s APOD API may result in errors or empty responses.
    • Network connectivity problems can prevent successful API calls.
  • Error messages:

    • Authentication errors usually indicate an invalid or missing API key; ensure the API key credential is correctly set up.
    • Date format errors occur if the date is not properly formatted as YYYY-MM-DD; verify the input date.
    • Rate limiting errors from NASA’s API may require waiting before retrying or upgrading API access.

Links and References

Discussion