NASA Pics

Get data from NASAs API

Actions2

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

Overview

The "NASA Pics" node allows users to retrieve data from NASA's public APIs. Specifically, for the "Astronomy Picture of the Day" resource with the "Get" operation, it fetches the Astronomy Picture of the Day (APOD) from NASA's API. This is useful for scenarios where users want to display or process daily astronomy images and their descriptions, such as in educational apps, websites, or automated social media posts featuring space-related content.

For example, a user can configure this node to get the APOD for a specific date or the current day, then use the image URL and explanation in their workflow.

Properties

Name Meaning
Additional Fields Optional extra parameters for the request. Currently supports:
- Date The specific date for which to retrieve the APOD. Format: ISO date (YYYY-MM-DD). If not set, defaults to the current date.

Output

The node outputs JSON data representing the Astronomy Picture of the Day information returned by NASA's API. This typically includes fields such as:

  • date: The date of the APOD.
  • explanation: A description of the image.
  • hdurl: URL to the high-definition image.
  • media_type: Type of media (usually "image" or "video").
  • service_version: API service version.
  • title: Title of the APOD.
  • url: URL to the image or video.

If the media is an image, the URLs point to the picture; if it's a video, the URL points to the video source.

The node does not output binary data directly but provides URLs that can be used to download or embed the media.

Dependencies

  • Requires an API key credential for NASA's API to authenticate requests.
  • The node makes HTTP GET requests to NASA's public API endpoint at https://api.nasa.gov/planetary/apod.
  • No additional environment variables are required beyond the API key configuration.

Troubleshooting

  • Common Issues:

    • Missing or invalid API key: The node will fail to authenticate with NASA's API.
    • Invalid date format: Providing a date not in ISO format may cause the API to reject the request.
    • Rate limiting: NASA's API enforces rate limits; excessive requests may result in errors.
  • Error Messages:

    • Authentication errors usually indicate issues with the provided API key. Verify the key is correct and active.
    • HTTP 400 errors may indicate malformed requests, often due to incorrect date formatting.
    • HTTP 429 errors indicate too many requests; consider adding delays or reducing request frequency.

Links and References

Discussion