NASA APIapi.nasa.gov ↗
Access NASA's APOD, Near Earth Objects, EPIC Earth imagery, Exoplanet Archive, EONET natural events, and Mars weather data via a single structured API.
What is the NASA API?
This API exposes 9 endpoints covering NASA's core open data services, from daily astronomy imagery to asteroid tracking and natural event feeds. The get_apod endpoint returns the Astronomy Picture of the Day with title, explanation, media URL, and HD image link. Other endpoints cover Near Earth Object orbital data, EPIC Earth photos from the DSCOVR spacecraft, exoplanet records queried via ADQL, and geolocated natural events from the EONET tracker.
curl -X GET 'https://api.parse.bot/scraper/6db36254-5228-41a6-82a1-a7102cd098e8/get_apod?date=2026-09-06&end_date=2026-09-08&start_date=2026-09-06' \ -H 'X-API-Key: $PARSE_API_KEY'
Get the Astronomy Picture of the Day (APOD) metadata. Returns a single APOD object when date is specified, or a wrapped array ({items: [...]}) when start_date/end_date or count is used. The primary use case is fetching by a single date. Parameters date, count, and start_date/end_date are mutually exclusive; date takes priority. Every record carries updated_at, an ISO-8601 UTC timestamp of when NASA's API served the record (taken from the response's Date header; NASA publishes no per-record modification time), so it reflects the moment of retrieval rather than an editorial change date. Dates outside NASA's published range (Jun 16, 1995 to today) return an upstream error with NASA's message.
| Param | Type | Description |
|---|---|---|
| date | string | Date of the APOD image in YYYY-MM-DD format. Cannot be used with start_date/end_date or count. Takes priority if multiple are provided. |
| count | integer | Return a specified number of random APOD images wrapped in {items: [...]}. Cannot be used with date or start_date/end_date. |
| thumbs | boolean | Return URL of video thumbnail if media_type is video. |
| end_date | string | End date for a range of APODs in YYYY-MM-DD format. Used with start_date. Cannot be used with date or count. |
| start_date | string | Start date for a range of APODs in YYYY-MM-DD format. Used with end_date. Cannot be used with date or count. |
{
"type": "object",
"fields": {
"url": "string — URL of the image or video",
"date": "string — date of the APOD in YYYY-MM-DD format",
"hdurl": "string — high-definition image URL (null for videos)",
"title": "string — title of the APOD",
"media_type": "string — 'image' or 'video'",
"updated_at": "string — ISO-8601 UTC timestamp (YYYY-MM-DDTHH:MM:SSZ) of when NASA's API served this record; also present on each item in {items: [...]} range/count responses",
"explanation": "string — description of the image"
},
"sample": {
"data": {
"url": "https://apod.nasa.gov/apod/image/2608/Comet220P_SA_960.jpg",
"date": "2026-08-24",
"hdurl": "https://apod.nasa.gov/apod/image/2608/Comet220P_SA_4104.jpg",
"title": "Comet 220P in Outburst",
"copyright": "Spilios Asimakopoulos",
"media_type": "image",
"updated_at": "2026-09-24T10:50:43Z",
"explanation": "Comet 220P is unexpectedly bright. Normally, periodic Comet 220P/McNaught is so dim that to see it requires a telescope.",
"service_version": "v1"
},
"status": "success"
}
}About the NASA API
Astronomy and Earth Imagery
The get_apod endpoint accepts a single date (YYYY-MM-DD), a start_date/end_date range, or a random count. A single-date request returns one object with url, hdurl, title, explanation, and media_type (image or video). Range and count requests return {items: [...]}. The thumbs parameter adds a video thumbnail URL when media_type is video. The get_epic_images endpoint returns metadata from the DSCOVR spacecraft's Earth Polychromatic Imaging Camera, including identifier, image filename, caption, and centroid_coordinates. Pass category as natural or enhanced; omit date to get the most recent available set.
Asteroid and Space Object Data
get_neo_feed returns Near Earth Objects grouped by date under near_earth_objects, covering up to a 7-day window between start_date and end_date. get_neo_lookup accepts a NASA JPL SPK-ID (e.g. 2000433 for Eros) and returns full detail: estimated_diameter in four units, close_approach_data with velocities and miss distances, absolute_magnitude_h, and the is_potentially_hazardous_asteroid flag. get_neo_browse pages through the full asteroid database with orbital summaries.
Exoplanets, Weather, and Natural Events
get_exoplanet_data queries the NASA Exoplanet Archive via ADQL. Use the query parameter for full control (e.g. select top 10 pl_name,hostname from ps where disc_year > 2020), or provide table and where separately. Note: SQL LIMIT is not supported — use ADQL TOP syntax. Results arrive in a results array. get_eonet_events returns active or closed natural events (wildfires, storms, eruptions) with GeoJSON geometry, filterable by status and limit. get_insight_mars_weather returns historical InSight lander data for sols 675–681 (October 2020); the mission ended November 2022, so no new data will be added.
NASA Image and Video Library
search_nasa_library takes a required q query string and optional media_type filter (image, video, or audio). Results come back under collection.items, each with associated metadata and asset links. Pagination is controlled via the page parameter (1-based). The metadata.total_hits field in the response tells you how many total records match.
The NASA API is a managed, monitored endpoint for api.nasa.gov — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when api.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 api.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.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a daily astronomy feed app using
get_apodwithtitle,explanation, andhdurlfields - Track potentially hazardous asteroids by polling
get_neo_feedand filtering onis_potentially_hazardous_asteroid - Map active wildfires and storm events with GeoJSON geometry from
get_eonet_events - Query confirmed exoplanets discovered after a given year using ADQL TOP syntax in
get_exoplanet_data - Display real-time Earth imagery from the DSCOVR spacecraft via
get_epic_imagescentroid coordinates and filenames - Build a NASA media search tool using
search_nasa_libraryfiltered bymedia_typeand paginated results - Look up orbital and close-approach history for a specific asteroid using its SPK-ID in
get_neo_lookup
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does NASA have an official developer API?+
What does `get_neo_feed` return and how do I narrow the date range?+
near_earth_objects keyed by date string, plus an element_count and navigation links. Provide start_date and end_date in YYYY-MM-DD format; the window must be 7 days or fewer. If you omit end_date, it defaults to start_date plus 7 days.Is InSight Mars weather data current?+
get_insight_mars_weather endpoint returns historical data for sols 675–681 from October 2020. The sol_keys array tells you which sols are in the response, and validity_checks provides per-sol metadata.Does the API return DONKI space weather events (solar flares, CMEs, geomagnetic storms)?+
Can I filter `get_exoplanet_data` by planet name or host star?+
where parameter or a full query string using ADQL syntax. For example, set where to pl_name like '%Kepler%' or write a full query like select top 20 pl_name,hostname from ps where hostname = 'Kepler-90'. Use ADQL TOP instead of SQL LIMIT — LIMIT is not supported by the Exoplanet Archive TAP service.