Use the NASA CLI from KosmoKrator to call NASA tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.
NASA can be configured headlessly with `kosmokrator integrations:configure nasa`.
# Install KosmoKrator first if it is not available on PATH.curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash# Configure and verify this integration.kosmokrator integrations:configure nasa --enable --read allow --write ask --jsonkosmokrator integrations:doctor nasa --jsonkosmokrator integrations:status --json
Credentials
Authentication type: API keyapi_key. Configure credentials once, then use the same stored profile from
scripts, coding CLIs, Lua code mode, and the MCP gateway.
Key
Env var
Type
Required
Label
api_key
NASA_API_KEY
Secret secret
no
API Key
url
NASA_URL
URL url
no
Base URL
Call NASA Headlessly
Use the generic call form when another coding CLI or script needs a stable universal interface.
Every function below can be called headlessly. The generic form is stable across all integrations;
the provider shortcut is shorter but specific to NASA.
nasa.nasa_get_apod
Read read
Get the NASA Astronomy Picture of the Day (APOD). Returns the daily astronomical image or photo along with an explanation written by a professional astronomer. You can request a specific date or a range of dates.
Get detailed information about a specific Near Earth Object (asteroid) by its NASA ID. Returns orbital data, estimated diameter, close approach history, and hazard assessment.
Get Near Earth Objects (asteroids) for a date range from NASA. Returns a list of asteroids with their estimated diameter, velocity, distance from Earth, and whether they are potentially hazardous.
Get information about the current NASA API configuration. The NASA API is public and does not require user authentication — this tool returns the API key status and available endpoints.
Get photos from NASA Mars rovers (Curiosity, Opportunity, Spirit, Perseverance). Query by sol (Martian day) or Earth date, and optionally filter by camera. Returns photo URLs and metadata.
Search the NASA Image and Video Library for space, astronomy, and mission imagery. Returns image URLs, titles, descriptions, and metadata from NASA's vast collection.
Use these parameter tables when building CLI payloads without calling integrations:schema first.
nasa.nasa_get_apod
Get the NASA Astronomy Picture of the Day (APOD). Returns the daily astronomical image or photo along with an explanation written by a professional astronomer. You can request a specific date or a range of dates.
A specific date in YYYY-MM-DD format (defaults to today).
start_date
string
no
Start date for a date range in YYYY-MM-DD format. Use with end_date to get multiple APOD entries.
end_date
string
no
End date for a date range in YYYY-MM-DD format. Must be used together with start_date.
nasa.nasa_get_asteroid
Get detailed information about a specific Near Earth Object (asteroid) by its NASA ID. Returns orbital data, estimated diameter, close approach history, and hazard assessment.
The asteroid's unique NASA ID (e.g., "2534304"). You can find IDs using the nasa_get_asteroids tool.
nasa.nasa_get_asteroids
Get Near Earth Objects (asteroids) for a date range from NASA. Returns a list of asteroids with their estimated diameter, velocity, distance from Earth, and whether they are potentially hazardous.
Start date in YYYY-MM-DD format (defaults to today).
end_date
string
no
End date in YYYY-MM-DD format (max 7 days after start_date).
nasa.nasa_get_current_user
Get information about the current NASA API configuration. The NASA API is public and does not require user authentication — this tool returns the API key status and available endpoints.
Get photos from NASA Mars rovers (Curiosity, Opportunity, Spirit, Perseverance). Query by sol (Martian day) or Earth date, and optionally filter by camera. Returns photo URLs and metadata.
Rover name: "curiosity", "opportunity", "spirit", or "perseverance".
sol
integer
no
The sol (Martian day) number. Use this OR earth_date, not both.
earth_date
string
no
Earth date in YYYY-MM-DD format. Use this OR sol, not both.
camera
string
no
Camera abbreviation: FHAZ, RHAZ, MAST, CHEMCAM, MAHLI, MARDI, NAVCAM, PANCAM, MINITES, etc.
page
integer
no
Page number for pagination (default 1, 25 photos per page).
nasa.nasa_search_images
Search the NASA Image and Video Library for space, astronomy, and mission imagery. Returns image URLs, titles, descriptions, and metadata from NASA's vast collection.
Filter by media type: "image", "video", or "audio". Defaults to all types.
page
integer
no
Page number for pagination (default 1).
Permissions
Headless calls still follow the integration read/write permission policy. Configure read/write defaults
with integrations:configure. Add --force only for trusted automation that should bypass that policy.