Skip to content

API Overview

The Vulnpatch API provides programmatic access to vulnerability data aggregated from multiple sources.

Base URL

https://api.vulnpatch.dev/api/v1/

Endpoints Summary

MethodEndpointDescription
GET/statsGet vulnerability statistics
GET/issuesList tracked CVE issues
GET/repology/:packageGet package version info from Repology
GET/osv/:packageGet vulnerabilities from OSV.dev
GET/vulns/:packageGet CVE matches with confidence scores
GET/osv-details/:idGet detailed vulnerability information

Common Parameters

Query Parameters

ParameterTypeDescription
ecosystemstringFilter by ecosystem (e.g., npm, PyPI, Debian)
versionstringFilter by package version

Headers

HeaderDescription
AcceptAlways returns application/json

Response Format

Success Response

json
{
  "success": true,
  "data": {
    // Endpoint-specific data
  },
  "timestamp": "2024-01-15T12:00:00.000Z"
}

Error Response

json
{
  "success": false,
  "error": "Error message describing what went wrong"
}

HTTP Status Codes

CodeDescription
200Success
400Bad request (invalid parameters)
404Resource not found
429Rate limit exceeded
500Internal server error

CORS

The API supports CORS for browser-based applications. All origins are allowed for read-only endpoints.

Caching

Responses include cache headers:

HeaderDescription
X-CacheHIT if served from cache, MISS otherwise
Cache-ControlBrowser caching directives

SDKs & Libraries

Currently, there are no official SDKs. The API is designed to be easily consumed with standard HTTP clients:

bash
curl https://api.vulnpatch.dev/api/v1/stats
javascript
const response = await fetch('https://api.vulnpatch.dev/api/v1/stats');
const data = await response.json();
python
import requests
response = requests.get('https://api.vulnpatch.dev/api/v1/stats')
data = response.json()

Helping secure open source