GnistAI GnistAI
Log in

NASA

NASA open APIs — Astronomy Picture of the Day, Near Earth Objects, Mars Rover Photos, EPIC Earth imagery, and DONKI space weather events.

Overview   |   MCP   |   REST API   |   OpenAPI   |   CLI   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 6 tools tools 6 6 type: api wrapper type type api wrapper api wrapper lifecycle: maintained lifecycle lifecycle maintained maintained Science

Data source: NASA Open APIs (api.nasa.gov)

REST Bridge Endpoint https://context.gnist.ai/rest/nasa/
Authentication

All requests require a Gnist-API-Key header (or api_key query parameter).

Free tier: 100 calls/day. Get your API key.

Tools (6)

search_apod

Get NASA's Astronomy Picture of the Day with scientific explanations.

Returns high-quality astronomy images or videos with detailed explanations
from professional astronomers. Data goes back to June 1995.

Examples:
search_apod() -> today's picture
search_apod(date="2024-01-01") -> specific date
search_apod(start_date="2024-01-01", end_date="2024-01-07") -> date range
search_apod(count=5) -> 5 random pictures

ParameterTypeRequiredDescription
dateanyoptionalSpecific date (YYYY-MM-DD). Omit for today's picture.
start_dateanyoptionalStart date for a date range (YYYY-MM-DD).
end_dateanyoptionalEnd date for a date range (YYYY-MM-DD).
countanyoptionalReturn N random APOD entries (1-100). Cannot combine with date/start_date.
Request Body
{
  "query": "example"
}
search_neo

Search Near Earth Objects (asteroids and comets) by date range.

Returns orbital data, size estimates, close approach distances, velocities,
and whether each object is classified as potentially hazardous.

Maximum 7-day range per query. Use for asteroid tracking, impact risk
assessment, and space situational awareness.

Examples:
search_neo("2024-01-01", "2024-01-07") -> week of NEO data

ParameterTypeRequiredDescription
start_datestringrequiredStart date (YYYY-MM-DD).
end_datestringrequiredEnd date (YYYY-MM-DD), max 7 days from start.
Request Body
{
  "start_date": "example",
  "end_date": "example"
}
search_mars_photos

Search Mars Rover photos from Curiosity, Opportunity, Spirit, and Perseverance.

Each rover has different cameras. Common cameras:
- FHAZ/RHAZ: Front/Rear Hazard Avoidance (all rovers)
- NAVCAM: Navigation Camera (all rovers)
- MAST: Mast Camera (Curiosity)
- PANCAM: Panoramic Camera (Opportunity, Spirit)

Examples:
search_mars_photos("curiosity", sol=1000) -> Curiosity photos from sol 1000
search_mars_photos("perseverance", earth_date="2024-01-15", camera="NAVCAM")

ParameterTypeRequiredDescription
roverstringrequiredRover name: curiosity, opportunity, spirit, or perseverance.
solanyoptionalMartian sol (day) number. Default 1000 if neither sol nor earth_date given.
earth_dateanyoptionalEarth date (YYYY-MM-DD). Alternative to sol.
cameraanyoptionalCamera abbreviation: FHAZ, RHAZ, MAST, CHEMCAM, MAHLI, NAVCAM, PANCAM, etc.
pageintegeroptionalPage number (25 results per page). Default 1. (default: 1)
Request Body
{
  "rover": "example"
}
get_epic_imagery

Get NASA EPIC full-disc Earth photographs from DSCOVR satellite at L1 point.

Returns metadata and image URLs for full-color photographs of the
sunlit side of Earth, taken from 1 million miles away. Available in
natural color and contrast-enhanced versions.

Examples:
get_epic_imagery() -> most recent natural color images
get_epic_imagery(collection="enhanced") -> enhanced images
get_epic_imagery(date="2024-01-15") -> specific date

ParameterTypeRequiredDescription
collectionstringoptionalImage collection: 'natural' (color) or 'enhanced' (contrast-enhanced). (default: "natural")
dateanyoptionalDate (YYYY-MM-DD). Omit for most recent images.
Request Body
{
  "query": "example"
}
search_space_weather

Search NASA DONKI space weather events.

The Space Weather Database Of Notifications, Knowledge, Information
(DONKI) tracks solar and geomagnetic events that affect Earth.

Event types:
- CME: Coronal Mass Ejections — solar plasma eruptions
- GST: Geomagnetic Storms — disturbances in Earth's magnetosphere
- FLR: Solar Flares — electromagnetic radiation bursts
- IPS: Interplanetary Shocks — shock waves in solar wind
- SEP: Solar Energetic Particles — high-energy particle events
- MPC: Magnetopause Crossings
- RBE: Radiation Belt Enhancements
- HSS: High Speed Streams — fast solar wind streams

Examples:
search_space_weather("CME", "2024-01-01", "2024-01-31")
search_space_weather("FLR", "2024-03-01", "2024-03-15")

ParameterTypeRequiredDescription
event_typestringrequiredEvent type: CME (Coronal Mass Ejection), GST (Geomagnetic Storm), FLR (Solar Flare), IPS (Interplanetary Shock), SEP (Solar Energetic Particle), MPC (Magnetopause Crossing), RBE (Radiation Belt Enhancement), HSS (High Speed Stream).
start_datestringrequiredStart date (YYYY-MM-DD).
end_datestringrequiredEnd date (YYYY-MM-DD).
Request Body
{
  "event_type": "example",
  "start_date": "example",
  "end_date": "example"
}
report_feedback

Report a bug, feature request, or general feedback for this data source.

Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.

Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")
Request Body
{
  "feedback": "example"
}

Quick Start

Shell
curl -X POST "https://context.gnist.ai/rest/nasa/search_neo" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"start_date": "example", "end_date": "example"}'
Python
import httpx

resp = httpx.post(
    "https://context.gnist.ai/rest/nasa/search_neo",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={
  "start_date": "example",
  "end_date": "example"
},
)
print(resp.json())

Related Toolkits (Science)

Resources