NASA Open APIs Earth API

The Earth API from NASA Open APIs — 2 operation(s) for earth.

OpenAPI Specification

nasa-gov-earth-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: NASA Astronomy Picture of the Day (APOD) Album Earth API
  description: 'One of the most popular NASA websites, exposed as a JSON API. Returns the Astronomy Picture of the Day with

    title, explanation, image URL, HD URL, optional copyright, and media type. Supports single date, date ranges,

    random counts, and video thumbnails.

    '
  version: '1.0'
  contact:
    name: NASA Open APIs
    url: https://api.nasa.gov/
  license:
    name: US Government Work (Public Domain)
    url: https://www.nasa.gov/multimedia/guidelines/index.html
servers:
- url: https://api.nasa.gov
  description: NASA Open API gateway via api.data.gov
security:
- ApiKeyAuth: []
tags:
- name: Earth
paths:
  /planetary/earth/imagery:
    get:
      summary: Get Earth Imagery
      operationId: getEarthImagery
      tags:
      - Earth
      parameters:
      - name: lat
        in: query
        required: true
        schema:
          type: number
          format: float
      - name: lon
        in: query
        required: true
        schema:
          type: number
          format: float
      - name: dim
        in: query
        description: Width and height of image in degrees (default 0.025).
        schema:
          type: number
          format: float
      - name: date
        in: query
        description: Date of image (YYYY-MM-DD). Returns image closest to this date.
        schema:
          type: string
          format: date
      - name: api_key
        in: query
        required: true
        schema:
          type: string
          default: DEMO_KEY
      responses:
        '200':
          description: PNG image of Earth at the requested coordinate/date.
          content:
            image/png:
              schema:
                type: string
                format: binary
  /planetary/earth/assets:
    get:
      summary: Get Earth Imagery Asset Metadata
      operationId: getEarthAssets
      tags:
      - Earth
      parameters:
      - name: lat
        in: query
        required: true
        schema:
          type: number
          format: float
      - name: lon
        in: query
        required: true
        schema:
          type: number
          format: float
      - name: date
        in: query
        required: true
        schema:
          type: string
          format: date
      - name: dim
        in: query
        schema:
          type: number
          format: float
      - name: api_key
        in: query
        required: true
        schema:
          type: string
          default: DEMO_KEY
      responses:
        '200':
          description: Asset metadata for the requested coordinate.
          content:
            application/json:
              schema:
                type: object
                properties:
                  date:
                    type: string
                  id:
                    type: string
                  resource:
                    type: object
                  service_version:
                    type: string
                  url:
                    type: string
                    format: uri
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: query
      name: api_key