Overview
The "Astronomy Picture Of The Day" (APOD) Get operation node fetches the daily astronomy image and its related information from NASA's public API. This node is useful for users who want to automatically retrieve and display the featured space image of the day along with metadata such as the explanation, title, and date. Practical applications include embedding the daily astronomy picture in websites, sending it via newsletters, or using it in educational content.
Properties
| Name | Meaning |
|---|---|
| Additional Fields | Optional extra parameters to customize the request. Currently supports: |
| - Date | Specify a particular date to get the APOD for that day instead of today's picture. |
Output
The node outputs JSON data representing the Astronomy Picture of the Day. The typical structure includes fields such as:
date: The date of the APOD.explanation: A detailed description of the image.hdurl: URL to the high-definition version of the image.media_type: Type of media returned (usually "image" or sometimes "video").service_version: Version of the API service.title: Title of the APOD.url: URL to the standard resolution image or video.
If the media type is an image, the URLs point to the image files; if it's a video, the URL points to the video resource.
Dependencies
- Requires an API key credential for NASA's API to authenticate requests.
- The base URL for API requests is
https://api.nasa.gov. - The node expects the user to configure the NASA API key credential within n8n.
Troubleshooting
Common issues:
- Missing or invalid API key will cause authentication errors.
- Requesting a date outside the valid range may result in errors or empty responses.
- Network connectivity problems can prevent successful API calls.
Error messages:
- Authentication errors typically indicate an invalid or missing API key; ensure the API key credential is correctly set up.
- Date format errors occur if the provided date is not properly formatted; use ISO date format (YYYY-MM-DD).
- Rate limiting errors may happen if too many requests are made in a short time; wait and retry later.