NASA Search API

The Search API from NASA — 1 operation(s) for search.

OpenAPI Specification

nasa-search-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: NASA Astronomy Picture of the Day (APOD) Asset Search API
  description: The Astronomy Picture of the Day (APOD) API provides access to NASA's popular APOD service, returning the astronomy picture or video of the day along with a brief explanation written by a professional astronomer.
  version: 1.0.0
  contact:
    name: NASA API Support
    url: https://api.nasa.gov
servers:
- url: https://api.nasa.gov
tags:
- name: Search
paths:
  /search:
    get:
      operationId: searchMedia
      summary: Search the NASA media library
      description: Perform a search across the NASA Image and Video Library.
      parameters:
      - name: q
        in: query
        required: false
        description: Free text search terms.
        schema:
          type: string
      - name: center
        in: query
        required: false
        description: NASA center that published the media.
        schema:
          type: string
      - name: description
        in: query
        required: false
        schema:
          type: string
      - name: keywords
        in: query
        required: false
        description: Comma-separated list of keywords.
        schema:
          type: string
      - name: media_type
        in: query
        required: false
        description: Filter by media type.
        schema:
          type: string
          enum:
          - image
          - video
          - audio
      - name: nasa_id
        in: query
        required: false
        schema:
          type: string
      - name: page
        in: query
        required: false
        schema:
          type: integer
          default: 1
      - name: photographer
        in: query
        required: false
        schema:
          type: string
      - name: title
        in: query
        required: false
        schema:
          type: string
      - name: year_start
        in: query
        required: false
        schema:
          type: string
      - name: year_end
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResult'
      tags:
      - Search
components:
  schemas:
    MediaItem:
      type: object
      properties:
        href:
          type: string
          format: uri
        data:
          type: array
          items:
            type: object
            properties:
              center:
                type: string
              title:
                type: string
              nasa_id:
                type: string
              date_created:
                type: string
                format: date-time
              keywords:
                type: array
                items:
                  type: string
              media_type:
                type: string
              description:
                type: string
              description_508:
                type: string
              photographer:
                type: string
        links:
          type: array
          items:
            type: object
            properties:
              href:
                type: string
                format: uri
              rel:
                type: string
              render:
                type: string
    SearchResult:
      type: object
      properties:
        collection:
          type: object
          properties:
            href:
              type: string
              format: uri
            items:
              type: array
              items:
                $ref: '#/components/schemas/MediaItem'
            metadata:
              type: object
              properties:
                total_hits:
                  type: integer
            links:
              type: array
              items:
                type: object
                properties:
                  rel:
                    type: string
                  prompt:
                    type: string
                  href:
                    type: string
                    format: uri