NASA Mars Photos API

The Mars Photos API from NASA — 3 operation(s) for mars photos.

Operations 3

GET /mars-photos/api/v1/rovers/{rover}/photos NASA Get photos from a Mars rover #
GET /mars-photos/api/v1/rovers/{rover}/latest_photos NASA Get the latest photos from a Mars rover #
GET /mars-photos/api/v1/manifests/{rover} NASA Get mission manifest for a rover #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/nasa-mars-photos-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

nasa-mars-photos-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: NASA Mars Rover Photos Mars Photos API
  description: The Mars Rover Photos API provides access to images collected by NASA's Curiosity, Opportunity, and Spirit rovers on Mars. Photos are organized by sol (Martian day) or Earth date and can be filtered by camera.
  version: 1.0.0
  contact:
    name: NASA API Support
    url: https://api.nasa.gov
servers:
- url: https://api.nasa.gov
tags:
- name: Mars Photos
paths:
  /mars-photos/api/v1/rovers/{rover}/photos:
    get:
      operationId: getRoverPhotos
      summary: NASA Get photos from a Mars rover
      description: Returns photos taken by the specified Mars rover, filtered by sol or Earth date and optionally by camera.
      parameters:
      - name: rover
        in: path
        required: true
        description: The name of the rover.
        schema:
          type: string
          enum:
          - curiosity
          - opportunity
          - spirit
      - name: sol
        in: query
        required: false
        description: Martian sol (day) on which photos were taken.
        schema:
          type: integer
      - name: earth_date
        in: query
        required: false
        description: Earth date on which photos were taken (YYYY-MM-DD).
        schema:
          type: string
          format: date
      - name: camera
        in: query
        required: false
        description: Abbreviation of the camera used to take the photo.
        schema:
          type: string
          enum:
          - FHAZ
          - RHAZ
          - MAST
          - CHEMCAM
          - MAHLI
          - MARDI
          - NAVCAM
          - PANCAM
          - MINITES
      - name: page
        in: query
        required: false
        description: Page number for paginated results (25 items per page).
        schema:
          type: integer
          default: 1
      - name: api_key
        in: query
        required: true
        schema:
          type: string
          default: DEMO_KEY
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  photos:
                    type: array
                    items:
                      $ref: '#/components/schemas/RoverPhoto'
      tags:
      - Mars Photos
  /mars-photos/api/v1/rovers/{rover}/latest_photos:
    get:
      operationId: getLatestRoverPhotos
      summary: NASA Get the latest photos from a Mars rover
      description: Returns the most recently available photos for a rover.
      parameters:
      - name: rover
        in: path
        required: true
        schema:
          type: string
          enum:
          - curiosity
          - opportunity
          - spirit
      - name: api_key
        in: query
        required: true
        schema:
          type: string
          default: DEMO_KEY
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  latest_photos:
                    type: array
                    items:
                      $ref: '#/components/schemas/RoverPhoto'
      tags:
      - Mars Photos
  /mars-photos/api/v1/manifests/{rover}:
    get:
      operationId: getRoverManifest
      summary: NASA Get mission manifest for a rover
      description: Returns the mission manifest including sol and photo counts.
      parameters:
      - name: rover
        in: path
        required: true
        schema:
          type: string
          enum:
          - curiosity
          - opportunity
          - spirit
      - name: api_key
        in: query
        required: true
        schema:
          type: string
          default: DEMO_KEY
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  photo_manifest:
                    $ref: '#/components/schemas/RoverManifest'
      tags:
      - Mars Photos
components:
  schemas:
    RoverPhoto:
      type: object
      properties:
        id:
          type: integer
          description: Unique identifier for the photo.
        sol:
          type: integer
          description: Martian sol on which the photo was taken.
        camera:
          $ref: '#/components/schemas/Camera'
        img_src:
          type: string
          format: uri
          description: URL of the image.
        earth_date:
          type: string
          format: date
          description: Earth date when the photo was taken.
        rover:
          $ref: '#/components/schemas/Rover'
    Rover:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        landing_date:
          type: string
          format: date
        launch_date:
          type: string
          format: date
        status:
          type: string
          enum:
          - active
          - complete
    RoverManifest:
      type: object
      properties:
        name:
          type: string
        landing_date:
          type: string
          format: date
        launch_date:
          type: string
          format: date
        status:
          type: string
        max_sol:
          type: integer
        max_date:
          type: string
          format: date
        total_photos:
          type: integer
        photos:
          type: array
          items:
            type: object
            properties:
              sol:
                type: integer
              earth_date:
                type: string
                format: date
              total_photos:
                type: integer
              cameras:
                type: array
                items:
                  type: string
    Camera:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        rover_id:
          type: integer
        full_name:
          type: string