
NVD Has a Free API — Search 250,000+ Vulnerabilities Programmatically
The National Vulnerability Database (NVD) is the U.S. government's repository of vulnerability data. It contains 250,000+ CVEs — and it has a completely free API. No API key required for basic queries. No authentication. Just HTTP requests. Why This Matters A security researcher I know was manually searching NVD's website for vulnerabilities affecting their stack. Copy-pasting CVE details into spreadsheets. It took hours every week. Then they discovered the NVD API. Now a single script checks their entire dependency list against known vulnerabilities in seconds. Quick Start — Search Vulnerabilities Find all critical vulnerabilities from the last 7 days: \ `python import requests from datetime import datetime, timedelta base_url = " https://services.nvd.nist.gov/rest/json/cves/2.0 " Last 7 days of critical CVEs end = datetime.utcnow() start = end - timedelta(days=7) params = { "pubStartDate": start.strftime("%Y-%m-%dT00:00:00.000"), "pubEndDate": end.strftime("%Y-%m-%dT23:59:59.999"), "
Continue reading on Dev.to Python
Opens in a new tab



