National Vulnerability Database API

Beginner's Pick Security / No Auth Required Beginner HTTPS
Free to Use
68 C
Measured Score 0 50 100 Speed 8/30 Consistency 17/20 Security 20/20 Browser access 15/15 Transparency 8/15 TESTED 2026-08-10

Overview

The National Vulnerability Database (NVD) API gives you access to the U.S. government's comprehensive catalog of known cybersecurity vulnerabilities. Each entry (CVE) includes severity scores, affected software, and remediation details. It's a go-to source for building security dashboards or checking whether software you use has known flaws.

Beginner Tip

Use the resultsPerPage and startIndex parameters to paginate through results — the default page size is 2,000 entries, which can be slow; start with resultsPerPage=20 while exploring.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://services.nvd.nist.gov/rest/json/cves/2.0?keywordSearch=apache&resultsPerPage=5
Result
HTTP 200 · application/json · 12,276 bytes · compressed
Response time
373 ms (median of 3) · fastest 346 ms
Transport
TLSv1.3 · TLS_AES_256_GCM_SHA384 · certificate issued by Let's Encrypt
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Served by
cloudflare
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
resultsPerPage integer 5
startIndex integer 0
totalResults integer 3511
format string NVD_CVE
version string 2.0
timestamp string (date) 2026-08-10T19:53:35.432
vulnerabilities array [1 item]

Captured Response

Captured from a real request to https://services.nvd.nist.gov/rest/json/cves/2.0?keywordSearch=apache&resultsPerPage=5 on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
{
  "resultsPerPage": 5,
  "startIndex": 0,
  "totalResults": 3511,
  "format": "NVD_CVE",
  "version": "2.0",
  "timestamp": "2026-08-10T19:53:35.432",
  "vulnerabilities": [
    {
      "cve": {
        "…": "(12 more fields)"
      }
    }
  ]
}

Field Reference

resultsPerPage Number of CVE records returned in this response page.
startIndex Zero-based offset used for pagination.
totalResults Total number of CVEs matching your query.
vulnerabilities List of CVE objects, each containing ID, description, severity, and affected product details.

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://services.nvd.nist.gov/rest/json/cves/2.0?keywordSearch=apache&resultsPerPage=5";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 404 Requesting a path that does not exist text/html

Returned an HTML error page rather than JSON — worth knowing if your client assumes every response can be parsed as JSON.

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

403 Forbidden or rate limit errors NVD enforces a rate limit of 5 requests per 30 seconds for unauthenticated requests.
Add a 6-second delay between requests, or register for a free API key at nvd.nist.gov to get a higher rate limit.
Very slow response times Requesting too many results at once strains the API.
Lower resultsPerPage to 20-100 and paginate through results with startIndex.
400 Bad Request on date filters Date parameters must follow ISO 8601 format with timezone offset.
Use the format pubStartDate=2024-01-01T00:00:00.000+00:00 for date range queries.

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 8/30
Consistency 17/20
Security 20/20
Browser access 15/15
Transparency 8/15
Endpoint Response Time 373ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Security
Difficulty Beginner
Endpoint last called: 2026-08-10

Related Tags

Similar APIs

View All →