disease.sh COVID-19: NYT API

(COVID-19 data sourced from the New York Times, updated every 24 hours)

OpenAPI Specification

disease-sh-covid-19-nyt-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: 3.0.0
  title: 'disease.sh Docs - An open API for disease-related statistics COVID-19: Apple COVID-19: NYT API'
  description: Third Party API for reliable global disease information
  license:
    name: GNU V3
    url: https://github.com/disease-sh/API/blob/master/LICENSE
host: disease.sh
basePath: /
schemes:
- https
- http
consumes:
- application/json
produces:
- application/json
tags:
- name: 'COVID-19: NYT'
  description: (COVID-19 data sourced from the New York Times, updated every 24 hours)
paths:
  /v3/covid-19/nyt/states:
    get:
      tags:
      - 'COVID-19: NYT'
      parameters:
      - name: lastdays
        in: query
        default: 30
        description: Number of days to return. Use 'all' for the full data set (e.g. 15, all, 24)
        type: string
      summary: Get COVID-19 time series data for all states, with an entry for each day since the pandemic began
      responses:
        '200':
          description: Status Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/covidNYTState'
  /v3/covid-19/nyt/states/{state}:
    get:
      tags:
      - 'COVID-19: NYT'
      parameters:
      - name: state
        in: path
        required: true
        description: State name(s), separated by commas (e.g. 'Illinois, California')
        type: string
      - name: lastdays
        in: query
        default: 30
        description: Number of days to return. Use 'all' for the full data set (e.g. 15, all, 24)
        type: string
      summary: Get COVID-19 time series data for a state or set of states, with an entry for each day since the pandemic began
      responses:
        '200':
          description: Status Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/covidNYTState'
  /v3/covid-19/nyt/counties:
    get:
      tags:
      - 'COVID-19: NYT'
      parameters:
      - name: lastdays
        in: query
        default: 30
        description: Number of days to return. Use 'all' for the full data set (e.g. 15, all, 24)
        type: string
      summary: Get COVID-19 time series data for all available US counties, with an entry for each day since the pandemic began
      responses:
        '200':
          description: Status Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/covidNYTCounty'
  /v3/covid-19/nyt/counties/{county}:
    get:
      tags:
      - 'COVID-19: NYT'
      parameters:
      - name: county
        in: path
        required: true
        description: County name(s), separated by commas (e.g. 'Alameda, Humboldt')
        type: string
      - name: lastdays
        in: query
        default: 30
        description: Number of days to return. Use 'all' for the full data set (e.g. 15, all, 24)
        type: string
      summary: Get COVID-19 time series data for a county or set of counties, with an entry for each day since the pandemic began
      responses:
        '200':
          description: Status Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/covidNYTCounty'
  /v3/covid-19/nyt/usa:
    get:
      tags:
      - 'COVID-19: NYT'
      summary: Get COVID-19 time series data for the entire USA, with an entry for each day since the pandemic began
      responses:
        '200':
          description: Status Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/covidNYTUSA'
components:
  schemas:
    covidNYTCounty:
      type: array
      items:
        type: object
        properties:
          date:
            type: string
            format: date
          county:
            type: string
          state:
            type: string
          fips:
            type: string
          cases:
            type: number
          deaths:
            type: number
    covidNYTUSA:
      type: array
      items:
        properties:
          date:
            type: string
            format: date
          cases:
            type: number
          deaths:
            type: number
    covidNYTState:
      type: array
      items:
        type: object
        properties:
          date:
            type: string
            format: date
          state:
            type: string
          fips:
            type: string
          cases:
            type: number
          deaths:
            type: number
externalDocs:
  description: Find out more about this API
  url: https://github.com/disease-sh/API