NVD

NVD CPE API

Common Platform Enumeration product dictionary

OpenAPI Specification

nvd-cpe-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: NVD CVE CPE API
  description: 'The NVD CVE API provides programmatic access to CVE (Common Vulnerabilities and Exposures) records including CVSS severity scores, affected product lists, CWE classifications, and reference links. Without an API key: 5 requests per 30 seconds; with key: 50 requests per 30 seconds.'
  version: 2.0.0
  contact:
    name: NVD Support
    url: https://nvd.nist.gov/general/contact
  license:
    name: Public Domain (US Government)
    url: https://nvd.nist.gov/developers/terms-of-use
servers:
- url: https://services.nvd.nist.gov/rest/json
  description: NVD REST API v2
security:
- {}
- APIKey: []
tags:
- name: CPE
  description: Common Platform Enumeration product dictionary
paths:
  /cpes/2.0:
    get:
      operationId: getCPEs
      summary: Get CPE (Common Platform Enumeration) records
      description: Query the NVD CPE dictionary for software and hardware product identifiers. Supports filtering by CPE name, keyword, and modification date. Returns up to 10,000 results per page.
      tags:
      - CPE
      parameters:
      - name: cpeNameId
        in: query
        schema:
          type: string
          format: uuid
        description: CPE UUID identifier
      - name: cpeMatchString
        in: query
        schema:
          type: string
        description: CPE 2.3 match string (wildcards supported)
      - name: keywordSearch
        in: query
        schema:
          type: string
      - name: keywordExactMatch
        in: query
        schema:
          type: boolean
      - name: lastModStartDate
        in: query
        schema:
          type: string
          format: date-time
      - name: lastModEndDate
        in: query
        schema:
          type: string
          format: date-time
      - name: matchCriteriaId
        in: query
        schema:
          type: string
          format: uuid
      - name: resultsPerPage
        in: query
        schema:
          type: integer
          default: 10000
          maximum: 10000
      - name: startIndex
        in: query
        schema:
          type: integer
          default: 0
      responses:
        '200':
          description: CPE records
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CPEResponse'
components:
  schemas:
    CPE:
      type: object
      properties:
        deprecated:
          type: boolean
        cpeName:
          type: string
          description: CPE 2.3 formatted string
        cpeNameId:
          type: string
          format: uuid
        lastModified:
          type: string
          format: date-time
        created:
          type: string
          format: date-time
        titles:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
              lang:
                type: string
        refs:
          type: array
          items:
            type: object
            properties:
              ref:
                type: string
                format: uri
              type:
                type: string
    CPEResponse:
      type: object
      properties:
        resultsPerPage:
          type: integer
        startIndex:
          type: integer
        totalResults:
          type: integer
        format:
          type: string
        version:
          type: string
        timestamp:
          type: string
          format: date-time
        products:
          type: array
          items:
            type: object
            properties:
              cpe:
                $ref: '#/components/schemas/CPE'
  securitySchemes:
    APIKey:
      type: apiKey
      in: header
      name: apiKey
      description: 'NVD API key (optional but recommended). Without a key: 5 requests/30s. With a key: 50 requests/30s. Request at https://nvd.nist.gov/developers/request-an-api-key'
externalDocs:
  description: NVD Developer Documentation
  url: https://nvd.nist.gov/developers/vulnerabilities