NASA Open APIs Asteroids API

The Asteroids API from NASA Open APIs — 3 operation(s) for asteroids.

OpenAPI Specification

nasa-gov-asteroids-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: NASA Astronomy Picture of the Day (APOD) Album Asteroids 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: Asteroids
paths:
  /neo/rest/v1/feed:
    get:
      summary: Get Near Earth Object Feed
      description: Retrieve a list of asteroids based on closest approach date to Earth. Maximum date range is 7 days.
      operationId: getNeoFeed
      tags:
      - Asteroids
      parameters:
      - name: start_date
        in: query
        description: Start date of the feed (YYYY-MM-DD). Defaults to today.
        schema:
          type: string
          format: date
      - name: end_date
        in: query
        description: End date of the feed (YYYY-MM-DD). Defaults to 7 days after start_date.
        schema:
          type: string
          format: date
      - name: api_key
        in: query
        required: true
        schema:
          type: string
          default: DEMO_KEY
      responses:
        '200':
          description: Feed of near earth objects keyed by date.
          content:
            application/json:
              schema:
                type: object
  /neo/rest/v1/neo/{asteroid_id}:
    get:
      summary: Lookup a Specific Asteroid by NeoWs ID
      operationId: getNeoLookup
      tags:
      - Asteroids
      parameters:
      - name: asteroid_id
        in: path
        required: true
        description: SPK-ID (small body identifier).
        schema:
          type: string
      - name: api_key
        in: query
        required: true
        schema:
          type: string
          default: DEMO_KEY
      responses:
        '200':
          description: Detailed asteroid record including orbital and close-approach data.
          content:
            application/json:
              schema:
                type: object
  /neo/rest/v1/neo/browse:
    get:
      summary: Browse the Overall Asteroid Dataset
      operationId: browseNeo
      tags:
      - Asteroids
      parameters:
      - name: page
        in: query
        schema:
          type: integer
          minimum: 0
      - name: size
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 20
      - name: api_key
        in: query
        required: true
        schema:
          type: string
          default: DEMO_KEY
      responses:
        '200':
          description: Paged list of near earth objects.
          content:
            application/json:
              schema:
                type: object
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: query
      name: api_key