Space

NASA Astronomy Picture of the Day viewer

Browse NASA's APOD by date, with explanation text, favourites, and a random button.

The promptPaste into Cursor, Claude Code, Codex, Lovable, Bolt, Replit or v0
Build a NASA Astronomy Picture of the Day (APOD) viewer using NASA's public APOD API (api.nasa.gov).

- Show today's image (or video embed) with title, date, explanation, and credit/copyright when provided.
- Date picker, previous/next, and random-day buttons.
- Favourites saved in localStorage.
- Call the API from a small server route so my API key isn't exposed; cache responses per date.
- Handle days where the media is a video, and API errors/rate limits gracefully.
Use DEMO_KEY only for local testing; get a free key at api.nasa.gov for production.

Tips

  • Check api.nasa.gov for current rate limits and endpoint details.

Works with: Cursor, Claude Code, Codex, Replit, Lovable, Bolt, v0. Last reviewed 2026-11-13.

← All prompts · Something broke? Fix library