# NVD CVE Vulnerability Database Scraper (`ahmdshrif/nvd-cve-vulnerability-scraper`) Actor

Exports CVE records from NIST's official NVD JSON API including CVSS scores, severity, CWE weaknesses, and affected vendor/product data.

- **URL**: https://apify.com/ahmdshrif/nvd-cve-vulnerability-scraper.md
- **Developed by:** [Ahmed](https://apify.com/ahmdshrif) (community)
- **Categories:** Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 1,000 actor runs

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## NVD CVE Vulnerability Database Scraper

Exports CVE (Common Vulnerabilities and Exposures) records from NIST's official NVD JSON API, including CVSS base scores, severity ratings, CWE weakness classifications, and affected vendor/product data. Built for security teams, vulnerability management tools, and developers who need structured CVE data for dependency scanning, threat intelligence feeds, or compliance reporting without manually parsing the NVD web UI.

### Why this scraper

- Reads NVD's official JSON API endpoints directly rather than scraping rendered HTML pages, so the data matches NIST's source records without layout-parsing errors.
- Returns 17 flat, typed fields per CVE — CVSS version, base score, severity, vector string, exploitability/impact sub-scores, CWE ID, vendor, product, and reference data — in one record instead of requiring separate lookups.
- Charges a flat $0.01 per run regardless of how many CVE records are returned, so pulling 20 or 500 records costs the same.

### Output fields

| Field | Type | Description |
|---|---|---|
| cveId | string | CVE identifier, e.g. CVE-1999-0095 |
| sourceIdentifier | string | Organization that submitted the CVE |
| published | string | Publication date/time (ISO 8601) |
| lastModified | string | Last modification date/time (ISO 8601) |
| vulnStatus | string | NVD workflow status, e.g. Modified, Analyzed |
| description | string | English-language description of the vulnerability |
| cvssVersion | string | CVSS metric version used, e.g. 3.1, 2.0 |
| baseScore | number | CVSS base score |
| baseSeverity | string | CVSS severity rating, e.g. HIGH, CRITICAL |
| vectorString | string | Full CVSS vector string |
| exploitabilityScore | number | CVSS exploitability sub-score |
| impactScore | number | CVSS impact sub-score |
| cweId | string | Primary CWE weakness identifier or description |
| vendor | string | Affected vendor name if listed |
| product | string | Affected product name if listed |
| referenceUrl | string | First reference URL for the CVE |
| referenceCount | integer | Total number of reference URLs listed for the CVE |

### Input

```json
{
  "startUrls": [
    { "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?resultsPerPage=20" }
  ],
  "maxItems": 1000
}
```

You can point `startUrls` at any NVD `cves/2.0` query, including filters like `keywordSearch=apache` or `cvssV3Severity=CRITICAL`.

### Output

```json
{
  "cveId": "CVE-1999-0095",
  "sourceIdentifier": "cve@mitre.org",
  "published": "1988-10-01T04:00:00.000",
  "lastModified": "2026-06-16T21:47:34.460",
  "vulnStatus": "Modified",
  "description": "The debug command in Sendmail is enabled, allowing attackers to execute commands as root.",
  "cvssVersion": "2.0",
  "baseScore": 10,
  "baseSeverity": "HIGH",
  "vectorString": "AV:N/AC:L/Au:N/C:C/I:C/A:C",
  "exploitabilityScore": 10,
  "impactScore": 10,
  "cweId": "NVD-CWE-Other",
  "vendor": "n/a",
  "product": "n/a",
  "referenceUrl": "http://seclists.org/fulldisclosure/2019/Jun/16",
  "referenceCount": 10
}
```

### Pricing

$0.01 per actor run, charged once regardless of how many CVE records `maxItems` returns. A typical run pulling 20-500 CVE records costs $0.01 total.

### Use cases

- Feeding a vulnerability management dashboard with CVSS scores and severity ratings for tracked vendor/product combinations.
- Building a CWE-tagged dataset to prioritize which weakness classes to fix first in a codebase.
- Monitoring newly published CRITICAL and HIGH severity CVEs for a specific keyword (e.g., a vendor or product name) as part of a security bulletin process.

# Actor input Schema

## `startUrls` (type: `array`):

Pages to export.

## `maxItems` (type: `integer`):

Stop after this many records in total, across all URLs. Each URL returns every record on its page, so leave this high to get complete results.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?resultsPerPage=20"
    },
    {
      "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?resultsPerPage=20&keywordSearch=apache"
    },
    {
      "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?resultsPerPage=20&cvssV3Severity=CRITICAL"
    }
  ],
  "maxItems": 1000
}
```

# Actor output Schema

## `results` (type: `string`):

One structured record per input URL.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?resultsPerPage=20"
        },
        {
            "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?resultsPerPage=20&keywordSearch=apache"
        },
        {
            "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?resultsPerPage=20&cvssV3Severity=CRITICAL"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ahmdshrif/nvd-cve-vulnerability-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "startUrls": [
        { "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?resultsPerPage=20" },
        { "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?resultsPerPage=20&keywordSearch=apache" },
        { "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?resultsPerPage=20&cvssV3Severity=CRITICAL" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("ahmdshrif/nvd-cve-vulnerability-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?resultsPerPage=20"
    },
    {
      "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?resultsPerPage=20&keywordSearch=apache"
    },
    {
      "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?resultsPerPage=20&cvssV3Severity=CRITICAL"
    }
  ]
}' |
apify call ahmdshrif/nvd-cve-vulnerability-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ahmdshrif/nvd-cve-vulnerability-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/8imq2jPORvYHAF3jF/builds/KGHgCEhsNJbxt3SVc/openapi.json
