mars.nasa.gov APImars.nasa.gov ↗
Access NASA Mars rover images, weather data, location tracking, rock samples, mission details, news, and planetary facts via 12 structured endpoints.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/29bc9970-6740-474d-aad0-d77e3d8e4483/get_mars_overview' \ -H 'X-API-Key: $PARSE_API_KEY'
Get an overview of NASA content from the global navigation structure, including links for missions, humans in space, earth & climate, and other top-level categories.
No input parameters required.
{
"type": "object",
"fields": {
"type": "string identifier for the nav type (e.g. 'global-nav')",
"value": "array of navigation category objects each containing id, title, slug, location, and menu_items"
},
"sample": {
"data": {
"type": "global-nav",
"value": [
{
"id": 3850,
"slug": "missions",
"title": "Missions",
"location": "global-nav-missions",
"menu_items": [
{
"id": 131284,
"url": "https://www.nasa.gov/missions/",
"order": 1,
"title": "Search All NASA Missions"
}
]
}
]
},
"status": "success"
}
}About the mars.nasa.gov API
This API covers NASA's Mars Exploration Program across 12 endpoints, returning rover imagery, environmental data, GeoJSON traverse paths, rock sample collections, and editorial content. The get_perseverance_raw_images endpoint alone exposes per-image metadata including sol, camera name, UTC date, and image files, with filtering by camera instrument and pagination by sol. Coverage spans both Perseverance and Curiosity missions plus static Mars planetary facts.
Rover Imagery
get_perseverance_raw_images and get_curiosity_raw_images return arrays of image objects filterable by Martian sol, camera instrument name, and page number. Perseverance camera codes include NAVCAM_LEFT and FRONT_HAZCAM_LEFT_A; Curiosity supports instruments like NAV_LEFT_B and CHEMCAM_RMI. Each image record carries sol, date_taken_utc, camera, image_files, and caption. The total_results (Perseverance) or total (Curiosity) field lets you calculate pages before fetching.
Location and Samples
get_perseverance_location and get_curiosity_location return GeoJSON FeatureCollection objects. Perseverance data includes a traverse path with per-segment sol and distance, plus a current_location point with elevation and cumulative distance traveled. Curiosity returns the same traverse structure alongside a waypoints collection that adds drive_type per stop. get_perseverance_rock_samples returns every collected sample as a GeoJSON Feature with sample_name, sample_type, rock_type, sol, date, and coordinates — useful for mapping sample sites against the traverse path.
Weather and Environmental Data
get_mars_weather accepts a rover parameter (perseverance or curiosity) and returns an array of sol objects each containing terrestrial_date, sol, ls (solar longitude), season, min_temp, max_temp, pressure, sunrise, and sunset. This makes it straightforward to correlate image capture dates with surface conditions.
News, Multimedia, and Facts
get_mars_news and get_mars_multimedia both support page, limit, and query parameters and return paginated content arrays with pagination_meta. get_mars_facts returns a sections array organized by topic — Introduction, Atmosphere, Surface, Moons, and more — each with content paragraphs, plus a total_sections count. Mission context comes from list_mars_missions (active rover codes like M20 and MSL plus mission link objects) and get_mission_detail, which takes a slug such as mars-2020-perseverance and returns navigation links and post details.
- Build a sol-by-sol Perseverance image browser filtered by specific camera instruments like NAVCAM_LEFT
- Plot the Curiosity rover's full traverse path and waypoints on an interactive map using the GeoJSON FeatureCollection
- Overlay Perseverance rock sample collection sites on the rover's traverse path for geological analysis
- Correlate rover image capture dates with surface weather data (temperature, pressure, season) from get_mars_weather
- Display a live Mars news feed with search filtering using get_mars_news pagination and query parameters
- Generate a Mars facts reference page organized by topic sections returned from get_mars_facts
- Track active mission codes and navigation structure for both Perseverance and Curiosity using list_mars_missions
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does NASA's Mars site have an official developer API?+
How do I filter rover images by camera and sol?+
get_perseverance_raw_images and get_curiosity_raw_images accept sol (Martian sol number) and camera (instrument name string) as optional parameters. Perseverance uses codes like NAVCAM_LEFT or FRONT_HAZCAM_LEFT_A; Curiosity uses names like NAV_LEFT_B or CHEMCAM_RMI. You can paginate results using the page parameter alongside the total_results or total field to determine how many pages exist.Does the weather endpoint return forecast data, or only historical sol records?+
get_mars_weather endpoint returns recorded per-sol data — each object includes terrestrial_date, sol, min_temp, max_temp, pressure, sunrise, and sunset for completed sols. It does not return predictive forecast data. The rover parameter lets you switch between Perseverance and Curiosity records.Does the API expose Ingenuity helicopter flight data or images?+
Are historic rover missions like Opportunity or Spirit covered?+
list_mars_missions endpoint returns mission links that may reference past missions in navigation context, but there are no dedicated image, weather, or location endpoints for Opportunity, Spirit, or other completed missions. You can fork the API on Parse and revise it to add endpoints covering those missions.