Data source: NASA Open APIs (api.nasa.gov)
https://context.gnist.ai/rest/nasa/
AuthenticationAll requests require a Gnist-API-Key header (or api_key query parameter).
Free tier: 100 calls/day. Get your API key.
Tools (6)
search_apodGet 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
| Parameter | Type | Required | Description |
|---|---|---|---|
date | any | optional | Specific date (YYYY-MM-DD). Omit for today's picture. |
start_date | any | optional | Start date for a date range (YYYY-MM-DD). |
end_date | any | optional | End date for a date range (YYYY-MM-DD). |
count | any | optional | Return N random APOD entries (1-100). Cannot combine with date/start_date. |
{
"query": "example"
}search_neoSearch 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
| Parameter | Type | Required | Description |
|---|---|---|---|
start_date | string | required | Start date (YYYY-MM-DD). |
end_date | string | required | End date (YYYY-MM-DD), max 7 days from start. |
{
"start_date": "example",
"end_date": "example"
}search_mars_photosSearch 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")
| Parameter | Type | Required | Description |
|---|---|---|---|
rover | string | required | Rover name: curiosity, opportunity, spirit, or perseverance. |
sol | any | optional | Martian sol (day) number. Default 1000 if neither sol nor earth_date given. |
earth_date | any | optional | Earth date (YYYY-MM-DD). Alternative to sol. |
camera | any | optional | Camera abbreviation: FHAZ, RHAZ, MAST, CHEMCAM, MAHLI, NAVCAM, PANCAM, etc. |
page | integer | optional | Page number (25 results per page). Default 1. (default: 1) |
{
"rover": "example"
}get_epic_imageryGet 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
| Parameter | Type | Required | Description |
|---|---|---|---|
collection | string | optional | Image collection: 'natural' (color) or 'enhanced' (contrast-enhanced). (default: "natural") |
date | any | optional | Date (YYYY-MM-DD). Omit for most recent images. |
{
"query": "example"
}search_space_weatherSearch 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")
| Parameter | Type | Required | Description |
|---|---|---|---|
event_type | string | required | Event 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_date | string | required | Start date (YYYY-MM-DD). |
end_date | string | required | End date (YYYY-MM-DD). |
{
"event_type": "example",
"start_date": "example",
"end_date": "example"
}report_feedbackReport 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'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |
{
"feedback": "example"
}Quick Start
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"}'
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())