Discover/NASA API
live

NASA APIimages.nasa.gov

Search and retrieve NASA media: images, videos, audio, HD assets, captions, metadata, and trending items via a structured JSON API.

Endpoint health
verified 7d ago
get_hd_image_url
get_item_details
get_trending_and_popular
get_top3_trending_images
get_newest_uploads
10/10 passing latest checkself-healing
Endpoints
10
Updated
21d ago

What is the NASA API?

This API exposes 10 endpoints covering the NASA Image and Video Library at images.nasa.gov, giving you access to search results, trending and newest uploads, full-resolution assets, EXIF/XMP metadata, and video captions. The get_item_details endpoint returns a single structured object combining the item's descriptive data, all asset URLs at every available resolution, and embedded technical metadata fields — making it the primary endpoint for building media-detail views.

Try it
Page number for pagination (1-based).
Search query text (e.g. 'Mars', 'Apollo 11'). If omitted, returns all items matching other filters.
NASA center that published the item (e.g. 'JPL', 'GSFC', 'JSC').
Comma-separated keywords to filter results.
Filter results to items created on or before this year (4-digit year, e.g. '2025').
Number of results per page (max 100).
Comma-separated media types to include. Accepted values: image, video, audio.
Filter results to items created on or after this year (4-digit year, e.g. '2020').
api.parse.bot/scraper/d4074a66-699d-4314-ad64-6f0c3c2f25e2/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/d4074a66-699d-4314-ad64-6f0c3c2f25e2/search?q=Apollo&page=1&query=Mars&center=JPL&keywords=Moon&year_end=2025&page_size=5&media_type=image&year_start=2020' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace images-nasa-gov-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: NASA Image and Video Library SDK — bounded, re-runnable."""
from parse_apis.nasa_image_and_video_library_api import NASAMedia, MediaType, ItemNotFound

nasa = NASAMedia()

# Search for Mars images using the MediaType enum, capped at 3 results
for item in nasa.mediaitems.search(query="Mars", media_type=MediaType.IMAGE, limit=3):
    print(item.nasa_id, item.title, item.media_type)

# Browse popular items
for item in nasa.mediaitems.list_popular(limit=3):
    print(item.nasa_id, item.title, item.date_created)

# Drill-down: take ONE item, refresh for full details, walk assets
item = nasa.mediaitems.search(query="Apollo 11", limit=1).first()
if item:
    detail = item.refresh()
    print(detail.nasa_id, detail.hd_url)
    for asset in item.assets.list(limit=5):
        print(asset.href)

# Browse trending images with HD URLs
for img in nasa.trendingimages.list_top3(limit=3):
    print(img.nasa_id, img.title, img.hd_url)

# Get captions for a video via sub-resource navigation
video = nasa.mediaitem("172_ISS-Slosh")
caption = video.caption.get()
print(caption.location)

# Typed error handling: catch ItemNotFound for a bad NASA ID
try:
    detail = nasa.mediaitems.get(nasa_id="NONEXISTENT_ID_XYZ")
    print(detail.nasa_id)
except ItemNotFound as exc:
    print(f"Item not found: {exc.nasa_id}")

print("exercised: search / list_popular / refresh / assets.list / list_top3 / caption.get / get")
All endpoints · 10 totalmissing one? ·

Search the NASA media library by keyword with optional filtering by media type, year range, keywords, and center. Returns paginated results with metadata and preview links. Pagination uses a page counter; each item carries data (title, nasa_id, media_type, date_created, description, keywords) and links (preview thumbnails). Server-side filtering covers query text, media type, year range, keywords, and center. Total hits are in metadata.total_hits.

Input
ParamTypeDescription
pageintegerPage number for pagination (1-based).
querystringSearch query text (e.g. 'Mars', 'Apollo 11'). If omitted, returns all items matching other filters.
centerstringNASA center that published the item (e.g. 'JPL', 'GSFC', 'JSC').
keywordsstringComma-separated keywords to filter results.
year_endstringFilter results to items created on or before this year (4-digit year, e.g. '2025').
page_sizestringNumber of results per page (max 100).
media_typestringComma-separated media types to include. Accepted values: image, video, audio.
year_startstringFilter results to items created on or after this year (4-digit year, e.g. '2020').
Response
{
  "type": "object",
  "fields": {
    "items": "array of media items with nasa_id, title, center, media_type, date_created, description, keywords, and links",
    "links": "array of pagination links (next/prev)",
    "metadata": "object with total_hits count"
  },
  "sample": {
    "data": {
      "items": [
        {
          "links": [
            {
              "rel": "preview",
              "href": "https://images-assets.nasa.gov/image/PIA24567/PIA24567~thumb.jpg",
              "render": "image"
            }
          ],
          "title": "NASA Integrates Gear Motors for Robotic Arm on Future Lunar Missions",
          "center": "JPL",
          "nasa_id": "PIA24567",
          "keywords": [
            "Moon"
          ],
          "media_type": "image",
          "description": "In early 2022, the Cold Operable Lunar Deployable Arm project...",
          "date_created": "2022-02-01T00:00:00Z"
        }
      ],
      "links": [],
      "metadata": {
        "total_hits": 4
      }
    },
    "status": "success"
  }
}

About the NASA API

Search and Discovery

The search endpoint accepts a free-text query string alongside optional filters: media_type (image, video, or audio, comma-separated), center (NASA publishing center such as JPL or GSFC), keywords, year_start, and year_end. Results are paginated — use page and page_size (up to 100 per page) to walk through the collection object returned, which includes a total_hits count and navigation links. If you omit query, the endpoint returns all items matching the remaining filters. The get_trending_and_popular and get_newest_uploads endpoints take no parameters and return ordered collections with nasa_id, title, media_type, and date_created for each item.

Asset Resolution and HD Retrieval

Every media item is identified by a nasa_id string (e.g. PIA12235). The get_asset endpoint returns the full manifest of file URLs for that ID, which may include original (~orig), medium, small, and thumbnail variants, plus a metadata.json link. The get_hd_image_url endpoint distills that manifest to a single hd_url string pointing to the highest available resolution — falling back from ~orig to ~large to ~medium when a lower tier is the best available. The get_top3_trending_images endpoint combines trending discovery with asset resolution, returning nasa_id, title, thumbnail, and hd_url for the top three results in one call.

Detailed Item Metadata

The get_item_details endpoint is the richest response shape available. For a given nasa_id it returns a data object with title, description, keywords, center, date_created, and media_type; a links array of preview URLs; a full assets array; the resolved hd_url; and a metadata object containing EXIF, XMP, and AVAIL fields extracted from the image file itself. This makes it suitable for applications that need both editorial context and technical imaging data in a single request.

Captions and Convenience Endpoints

For video assets, the get_captions endpoint accepts a nasa_id and returns a location string pointing to the .srt subtitle file for that video. The get_trending_images_only and get_all_trending_image_urls endpoints filter the trending collection to images exclusively, returning arrays of nasa_id, title, and thumbnail URLs — useful for feed widgets or gallery prefetching without needing to filter media_type client-side.

Reliability & maintenanceVerified

The NASA API is a managed, monitored endpoint for images.nasa.gov — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when images.nasa.gov changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official images.nasa.gov API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
7d ago
Latest check
10/10 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a NASA media gallery that surfaces trending images with HD download links using get_top3_trending_images.
  • Populate an educational content platform with the latest NASA uploads by polling get_newest_uploads on a schedule.
  • Index NASA video content with synchronized subtitles by pairing search (media_type=video) with get_captions per result.
  • Display full technical provenance for a spacecraft image — EXIF, XMP, and editorial description — using get_item_details.
  • Filter historical Apollo-era imagery by querying search with year_start=1961, year_end=1972, and keywords=Apollo.
  • Generate a center-specific media feed by passing center=JPL or center=JSC to the search endpoint.
  • Resolve the highest-quality download URL for any NASA asset by calling get_hd_image_url with its nasa_id.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does NASA provide an official developer API for images.nasa.gov?+
Yes. NASA maintains the public Images API at https://images-api.nasa.gov. It covers search, asset retrieval, and metadata for the same library. This Parse API exposes that data as structured endpoints with convenience wrappers like HD-URL resolution and trending-only filters.
What does `get_item_details` return that `get_asset` does not?+
get_asset returns only the array of file-resolution URLs for a given nasa_id. get_item_details combines those asset URLs with the item's editorial data (title, description, keywords, center, date_created, media_type), a links array, the resolved hd_url, and a metadata object containing EXIF, XMP, and AVAIL fields — so it aggregates what would otherwise require two or three separate calls.
Does the `search` endpoint support full-text search across item descriptions and keywords?+
The query parameter matches against the NASA library's title, description, and keyword fields. You can also pass a separate keywords filter alongside query to narrow by explicit tags. There is no dedicated field-scoped search (e.g. title-only or description-only queries) — both inputs apply broadly. Pagination is controlled by page and page_size (max 100 per page); total_hits in the response tells you the full result count.
Can I retrieve user-uploaded or community-contributed media through this API?+
The API covers only content published through official NASA centers — items include a center field (e.g. JPL, GSFC, JSC) identifying the publishing organization. Community or third-party uploads are not part of the NASA Image and Video Library and are not accessible here. You can fork this API on Parse and revise it to add endpoints pulling from other public NASA data sources if needed.
Are audio assets accessible the same way as images and videos?+
Audio items appear in search results when media_type includes audio, and their asset URLs are returned by get_asset and get_item_details like any other media type. However, the convenience endpoints (get_trending_images_only, get_all_trending_image_urls, get_top3_trending_images, get_hd_image_url) are scoped to images only and will not surface audio items. You can fork this API on Parse and revise it to add audio-specific convenience endpoints.
Page content last updated . Spec covers 10 endpoints from images.nasa.gov.
Related APIs in Government PublicSee all →
api.nasa.gov API
Access NASA's suite of open data APIs — including the Astronomy Picture of the Day, Near Earth Object tracking, DONKI space weather events, EPIC Earth imagery, Mars weather, the NASA Image and Video Library, the Exoplanet Archive, and EONET natural events.
mars.nasa.gov API
Explore real-time images, weather data, and location tracking from NASA's Perseverance and Curiosity rovers on Mars, while discovering mission details, rock sample findings, and the latest news from the Mars Exploration Program. Access rover photos, scientific discoveries, and multimedia content to stay updated on current Mars exploration activities.
ntrs.nasa.gov API
Search and retrieve NASA technical reports, preprints, and conference papers to find scientific publications across NASA's research archives. Get detailed citation information and discovery capabilities across decades of NASA's technical documentation and scientific findings.
pexels.com API
Search and browse millions of free stock photos and videos on Pexels. Access trending content, photographer galleries, photo/video challenges, and search suggestions via a clean API.
unsplash.com API
Search Unsplash photos by keyword and retrieve image URLs, photographer info, and detailed photo metadata such as tags, EXIF, location, and related collections.
sentinel-hub.com API
Access satellite imagery from around the world and retrieve spectral band data, timestamps, and geographic coverage information to analyze Earth observation data. Process and generate statistics from satellite images for your specific areas of interest using powerful image processing tools.
payloadspace.com API
Search and retrieve space industry news articles, company information, funding rounds, contract awards, and events from Payload Space's comprehensive database. Stay updated on latest developments across commercial space, military space, European space news, and industry events like webinars and podcasts.
spatial.nsw.gov.au API
Search and retrieve spatial data, publications, news, and information from NSW Spatial Services, including portal items, data packs, and groups. Access detailed information about spatial datasets and resources available through the NSW Spatial Services Portal.