Search nasa images by keyword

When the user asks to find NASA imagery — mission photos, telescope captures, audio clips — by keyword, center, date range, or media type, reach for the NASA Image and Video Library search endpoint. No auth required.

search-nasa-images-by-keyword · v1 · updated 2026-04-16

Agents: This page is a SKILL.md-style capability guide. For JSON, call GET /api/skills/search-nasa-images-by-keyword. To drop this into a local Claude Code install, copy the frontmatter + body below into ~/.claude/skills/search-nasa-images-by-keyword/SKILL.md.

When to use this skill

When the user asks to find NASA imagery — mission photos, telescope captures, engineering diagrams, audio clips — by keyword, NASA center, date range, or media type. This is the primary entry point into NASA's media archive; pass a keyword and get back metadata plus pre-sized image links. For fetching the full-resolution original of an image you already have the nasa_id for, use the /asset/{nasa_id} endpoint instead. For browsing a known curated album, use /album/{album_name}.

Your best first call

curl "https://images-api.nasa.gov/search?q=bootprint&media_type=image"

No auth. No key. The q parameter is the keyword filter — always pass one. media_type narrows to image, video, or audio. The response wraps results in collection.items, where each item has a data array (always length 1 — access as item.data[0], not item.data) and a links array with pre-sized image variants using tilde suffixes (~thumb, ~small, ~medium, ~large, ~orig).

Key fields from data[0]: - nasa_id — unique identifier, the join key to /asset and /metadata endpoints - title — human-readable title - description — detailed caption - center — NASA facility code (JPL for Mars rovers, GSFC for Hubble, KSC for launches) - date_created — ISO timestamp - keywords — array of topic tags - media_typeimage, video, or audio

The links array provides direct URLs to sized variants, each with width and height.

Fallbacks (when the best call isn't enough)

Pitfalls

One-line summary for the user

I can search NASA's image and video library by keyword, center, or date range — no auth required — and return titles, descriptions, and sized image links using the nasa_id as a key into the full-resolution asset pipeline.

APIs this skill uses

NASA Image and Video Library API · primary · verified

Search and retrieve NASA images, videos, and audio from the NASA Image and Video Library. This API provides access to NASA's media collection with rich metadata.

Generated from

NASA Image and Video Library API tutorial Getting Started with NASA Image and Video Library

SKILL.md source (frontmatter + body)
---
name: search-nasa-images-by-keyword
description: When the user asks to find NASA imagery — mission photos, telescope captures, audio clips — by keyword, center, date range, or media type, reach for the NASA Image and Video Library search endpoint. No auth required.
---

## When to use this skill

When the user asks to find NASA imagery — mission photos, telescope captures, engineering diagrams, audio clips — by keyword, NASA center, date range, or media type. This is the primary entry point into NASA's media archive; pass a keyword and get back metadata plus pre-sized image links. For fetching the full-resolution original of an image you already have the `nasa_id` for, use the `/asset/{nasa_id}` endpoint instead. For browsing a known curated album, use `/album/{album_name}`.

## Your best first call

```bash
curl "https://images-api.nasa.gov/search?q=bootprint&media_type=image"
```

No auth. No key. The `q` parameter is the keyword filter — always pass one. `media_type` narrows to `image`, `video`, or `audio`. The response wraps results in `collection.items`, where each item has a `data` array (always length 1 — access as `item.data[0]`, not `item.data`) and a `links` array with pre-sized image variants using tilde suffixes (`~thumb`, `~small`, `~medium`, `~large`, `~orig`).

Key fields from `data[0]`:
- `nasa_id` — unique identifier, the join key to `/asset` and `/metadata` endpoints
- `title` — human-readable title
- `description` — detailed caption
- `center` — NASA facility code (JPL for Mars rovers, GSFC for Hubble, KSC for launches)
- `date_created` — ISO timestamp
- `keywords` — array of topic tags
- `media_type` — `image`, `video`, or `audio`

The `links` array provides direct URLs to sized variants, each with `width` and `height`.

## Fallbacks (when the best call isn't enough)

- **Full-resolution original needed** → `https://images-api.nasa.gov/asset/{nasa_id}` lists every available size including `~orig`. Use when the user needs print-quality output, not just the screen-sized previews from search.
- **EXIF or geographic detail needed** → `https://images-api.nasa.gov/metadata/{nasa_id}` returns extended metadata beyond what search provides.
- **Known album name** → `https://images-api.nasa.gov/album/{album_name}` returns items from a curated NASA collection. Only useful when you know the album slug — there is no endpoint to list available albums, but the `album` field sometimes appears in search results.

## Pitfalls

- **A bare `/search` with no `q` parameter returns the entire collection** — over 140,000 items. Always narrow with at least a keyword or center filter.
- **The `data` field is a single-element array**, not a flat object. Code that accesses `item.data.title` will fail — use `item.data[0].title`.
- **Overfiltering returns zero results silently.** Combining `center`, `keywords`, `photographer`, and date ranges can produce an empty `items` array with `total_hits: 0` and no error. Remove filters one at a time to find the restrictive one.
- **The `center` filter is a hidden power tool.** The same keyword with `center=JPL` surfaces Mars rover imagery, `center=GSFC` surfaces Hubble and Earth science, and `center=KSC` surfaces launch-pad photography — completely different perspectives on the same mission.

## One-line summary for the user

I can search NASA's image and video library by keyword, center, or date range — no auth required — and return titles, descriptions, and sized image links using the nasa_id as a key into the full-resolution asset pipeline.

« Back to all skills