# Get NASA Astronomy Picture of the Day API

> Fetch NASA's Astronomy Picture of the Day (APOD). Today's by default, or any date from 1995-06-16 onwards. Returns title, explanation, media URL (+ HD variant), copyright. Uses DEMO_KEY by default; set NASA_API_KEY env for higher rate limits.

Category: [Media APIs](https://upapi.io/apis/media) · Last updated 2026-06-12

## How to call it

- Endpoint: `POST https://api.upapi.io/nasa-apod.get`, key in the `X-Api-Key` header, JSON body.
- Cost: 1 weighted unit per call.
- Timeout: 25 seconds.
- Cache: identical requests are served from cache for 3600 seconds, unbilled.
- Try it without writing code: https://app.upapi.io/try/nasa-apod.get

```bash
curl -X POST https://api.upapi.io/nasa-apod.get \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{ "hd": true, "date": "2024-07-04" }'
```

## Request parameters

- `hd` (boolean) — Include high-resolution URL when available
- `date` (string) — YYYY-MM-DD; omit for today. Must be on or after 1995-06-16.

## Response fields

- `url` (string, required)
- `date` (string, required)
- `hdurl` (string, required)
- `title` (string, required)
- `copyright` (string, required)
- `fetchedAt` (string, required)
- `mediaType` (string, required)
- `explanation` (string, required)

## Example request and response

The example response is generated from the published output schema: it shows the shape and field names, not values from a recorded call.

```json
{
  "hd": true,
  "date": "2024-07-04"
}
```

```json
{
  "url": "https://github.com",
  "date": "2024-07-04",
  "hdurl": "example",
  "title": "Alan Turing",
  "copyright": "example",
  "fetchedAt": "example",
  "mediaType": "example",
  "explanation": "example"
}
```

## Frequently asked questions

### How much does the Get NASA Astronomy Picture of the Day API cost per call?

Each call spends 1 weighted unit of your plan's monthly quota. Full pricing is at https://upapi.io/pricing.

### How do I authenticate to the Get NASA Astronomy Picture of the Day API?

Send your key in the X-Api-Key header. A free guest key is available without creating an account.

### Are Get NASA Astronomy Picture of the Day API responses cached?

Yes — identical requests are served from cache for 3600 seconds, and a cache hit is not billed.

## More Media APIs

- [Get Pokemon](https://upapi.io/apis/media/pokeapi-pokemon)
- [Get Transcription Result](https://upapi.io/apis/media/audio-transcribe-result)
- [Transcribe Audio or Video](https://upapi.io/apis/media/audio-transcribe)
