Department of the Interior Alerts API

Park alerts and emergencies

OpenAPI Specification

department-of-the-interior-alerts-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: National Park Service (NPS) Data Alerts API
  description: The National Park Service Data API provides programmatic access to information about U.S. national parks - park overviews, alerts, events, visitor centers, campgrounds, things to do, news releases, articles, people, places, and more. The API is REST-based and returns JSON.
  version: '1'
  contact:
    name: NPS Developer Resources
    url: https://www.nps.gov/subjects/developer/
  license:
    name: Public Domain
    url: https://creativecommons.org/publicdomain/mark/1.0/
servers:
- url: https://developer.nps.gov/api/v1
  description: Production
security:
- ApiKeyAuth: []
tags:
- name: Alerts
  description: Park alerts and emergencies
paths:
  /alerts:
    get:
      tags:
      - Alerts
      summary: List park alerts
      operationId: listAlerts
      parameters:
      - $ref: '#/components/parameters/parkCode'
      - $ref: '#/components/parameters/stateCode'
      - $ref: '#/components/parameters/q'
      responses:
        '200':
          description: Alerts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertResponse'
components:
  parameters:
    q:
      name: q
      in: query
      schema:
        type: string
      description: Free-text search
    parkCode:
      name: parkCode
      in: query
      schema:
        type: string
      description: Comma-separated four-letter park codes (e.g. yose,grca)
    stateCode:
      name: stateCode
      in: query
      schema:
        type: string
        pattern: ^[A-Z]{2}(,[A-Z]{2})*$
  schemas:
    AlertResponse:
      type: object
      properties:
        total:
          type: string
        data:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              url:
                type: string
              title:
                type: string
              parkCode:
                type: string
              description:
                type: string
              category:
                type: string
                enum:
                - Caution
                - Danger
                - Information
                - Park Closure
              lastIndexedDate:
                type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: query
      name: api_key
externalDocs:
  description: NPS API documentation
  url: https://www.nps.gov/subjects/developer/api-documentation.htm