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 Docs   |   API Docs   |   OpenAPI   |   Playground   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 6 tools tools 6 6 Science

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

MCP MCP Protocol

Endpoint https://context.gnist.ai/mcp/nasa/
claude_desktop_config.json
{
  "mcpServers": {
    "gnist-nasa": {
      "url": "https://context.gnist.ai/mcp/nasa/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}
Shell
curl -X POST "https://context.gnist.ai/mcp/nasa/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_neo", "arguments": {"start_date": "example", "end_date": "example"}}}'

API REST API

API Root https://context.gnist.ai/rest/nasa/

6 endpoints available:

Shell
curl "https://context.gnist.ai/rest/nasa/search_neo?start_date=example&end_date=example" \
  -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx

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

OpenAPI Spec  ·  Full API Docs

CLI Command Line

Command gc nasa

CLI documentation will be available when the GnistAI SDK is published.

Install
pip install gnistai

Available Tools (6)

search_apod
Get NASA's Astronomy Picture of the Day with scientific explanations.
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.
search_neo
Search Near Earth Objects (asteroids and comets) by date range.
ParameterTypeRequiredDescription
start_datestringrequiredStart date (YYYY-MM-DD).
end_datestringrequiredEnd date (YYYY-MM-DD), max 7 days from start.
search_mars_photos
Search Mars Rover photos from Curiosity, Opportunity, Spirit, and Perseverance.
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)
get_epic_imagery
Get NASA EPIC full-disc Earth photographs from DSCOVR satellite at L1 point.
ParameterTypeRequiredDescription
collectionstringoptionalImage collection: 'natural' (color) or 'enhanced' (contrast-enhanced). (default: "natural")
dateanyoptionalDate (YYYY-MM-DD). Omit for most recent images.
search_space_weather
Search NASA DONKI space weather events.
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).
report_feedback
Report a bug, feature request, or general feedback for this data source.
ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")

Related