Discover/NASA API
live

NASA APImars.nasa.gov

Access NASA Mars rover images, weather data, location tracking, rock samples, mission details, news, and planetary facts via 12 structured endpoints.

Endpoint health
verified 6h ago
list_mars_missions
get_curiosity_location
get_perseverance_rock_samples
get_perseverance_raw_images
get_mars_overview
12/12 passing latest checkself-healing
Endpoints
12
Updated
21d ago

What is the NASA 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.

Try it

No input parameters required.

api.parse.bot/scraper/29bc9970-6740-474d-aad0-d77e3d8e4483/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/29bc9970-6740-474d-aad0-d77e3d8e4483/get_mars_overview' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace mars-nasa-gov-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: NASA Mars Exploration SDK — bounded, re-runnable; every call capped."""
from parse_apis.nasa_mars_exploration_api import NasaMars, Rover, MissionSlug, MissionNotFound

nasa = NasaMars()

# Get mission detail for Perseverance
mission = nasa.missions.get(slug=MissionSlug.MARS_2020_PERSEVERANCE)
print(mission.slug, mission.type)

# List Perseverance raw images, capped
for image in nasa.perseveranceimages.list(sol=100, num=5, limit=3):
    print(image.imageid, image.sol, image.date_taken_utc)

# List Curiosity images filtered by sol
for image in nasa.curiosityimages.list(sol=1000, per_page=5, limit=3):
    print(image.id, image.instrument, image.title)

# Get Mars weather for Perseverance
for sol in nasa.weathersols.list(rover=Rover.PERSEVERANCE, limit=5):
    print(sol.terrestrial_date, sol.season, sol.min_temp, sol.max_temp)

# Search news articles
for article in nasa.newsarticles.search(query="perseverance", limit=3):
    print(article.title, article.publish_date, article.post_type)

# Get rover location data
location = nasa.roverlocations.get_perseverance()
print(location.traverse)

# Typed error handling: catch a bad mission slug
try:
    nasa.missions.get(slug="nonexistent-mission-xyz")
except MissionNotFound as exc:
    print(f"Mission not found: {exc.slug}")

print("exercised: missions.get / perseveranceimages.list / curiosityimages.list / weathersols.list / newsarticles.search / roverlocations.get_perseverance")
All endpoints · 12 totalmissing one? ·

Retrieve the NASA global navigation structure. Returns an array of top-level categories (Missions, Humans in Space, Earth & Climate, etc.) each with their menu items and links. Useful for discovering the overall content organization.

Input

No input parameters required.

Response
{
  "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 NASA API

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.

Reliability & maintenanceVerified

The NASA API is a managed, monitored endpoint for mars.nasa.gov — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when mars.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 mars.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.

Last verified
6h ago
Latest check
12/12 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • 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
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 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.

Frequently asked questions
Does NASA's Mars site have an official developer API?+
NASA offers several public APIs at api.nasa.gov, including the Mars Rover Photos API. However, that official API covers a narrower set of data — notably excluding live weather, GeoJSON traverse paths, rock samples, and the full editorial content available through this Parse API.
How do I filter rover images by camera and sol?+
Both 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?+
The 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?+
Not currently. The API covers Perseverance and Curiosity rover imagery, location, weather, and rock samples. Ingenuity-specific flight logs, altitude data, or dedicated helicopter images are not included. You can fork this API on Parse and revise it to add an endpoint targeting Ingenuity mission data.
Are historic rover missions like Opportunity or Spirit covered?+
The active endpoints focus on Perseverance (M20) and Curiosity (MSL). The 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.
Page content last updated . Spec covers 12 endpoints from mars.nasa.gov.
Related APIs in Government PublicSee all →
api.nasa.gov API
Access NASA's suite of open data APIs — including the Astronomy Picture of the Day, Near Earth Object tracking, DONKI space weather events, EPIC Earth imagery, Mars weather, the NASA Image and Video Library, the Exoplanet Archive, and EONET natural events.
images.nasa.gov API
images.nasa.gov API
spaceweather.com API
Monitor real-time space weather conditions including solar wind, sunspots, and flares, plus track near-Earth asteroids and access daily or historical reports. Stay informed about current space weather events and search through archived data to understand patterns and trends over time.
global-warming.org API
Access real-time climate and environmental data including temperature, CO2, methane, nitrous oxide levels, arctic sea ice coverage, and ocean warming metrics. Browse climate news updates and explore detailed information on deforestation trends through an integrated environmental monitoring platform.
zoom.earth API
Search Zoom Earth for places and get live environmental data including weather forecasts by coordinates, satellite imagery timestamps, active tropical storm tracks, active fires, and current platform status.
forecast.weather.gov API
Get National Weather Service station metadata plus the latest and recent weather observations (temperature, wind, pressure, humidity, and METAR text) for a specified station ID.
sentinel-hub.com API
Access satellite imagery from around the world and retrieve spectral band data, timestamps, and geographic coverage information to analyze Earth observation data. Process and generate statistics from satellite images for your specific areas of interest using powerful image processing tools.
payloadspace.com API
Search and retrieve space industry news articles, company information, funding rounds, contract awards, and events from Payload Space's comprehensive database. Stay updated on latest developments across commercial space, military space, European space news, and industry events like webinars and podcasts.