# CVE & Open Source Vulnerability Scraper | 2Space (`2space/osv-cve-vulnerabilities-scraper`) Actor

Zero-browser CVE and open-source vulnerability scraper powered by Google OSV.dev. Query npm, PyPI, Go, Maven, Cargo, and NuGet packages or CVE/GHSA IDs for CVSS scores, affected ranges, fixed versions, and advisory links.

- **URL**: https://apify.com/2space/osv-cve-vulnerabilities-scraper.md
- **Developed by:** [2Space Group](https://apify.com/2space) (community)
- **Categories:** Developer tools, AI, MCP servers
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 vulnerability scraped

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/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

## CVE & Open Source Vulnerability Scraper | 2Space

> **Built by 2Space** · Zero-browser **CVE scraper**, **OSV.dev vulnerability API**, and **open-source security advisory extractor** engineered for AI coding agents, MCP clients, AppSec teams, and dependency workflows.

[![Apify Actor](https://img.shields.io/badge/Apify-osv--cve--vulnerabilities--scraper-00C853?style=flat-square)](https://apify.com/2space/osv-cve-vulnerabilities-scraper)
[![MCP Ready](https://img.shields.io/badge/MCP-Ready-2563EB?style=flat-square)](https://mcp.apify.com?tools=2space/osv-cve-vulnerabilities-scraper)
[![Zero Browser](https://img.shields.io/badge/Runtime-Pure%20HTTP-7C3AED?style=flat-square)](https://apify.com/2space/osv-cve-vulnerabilities-scraper)

Whether you need a fast **CVE & vulnerability scraper** for software supply-chain checks, an **OSV.dev package advisory API** for `npm`, `PyPI`, `Go`, `Maven`, `crates.io`, or `NuGet`, or direct **CVE / GHSA lookup** with CVSS vectors, CWE IDs, and fixed patch versions, this Actor returns clean JSON and CSV records in seconds with zero API keys.

***

### Why Choose This Scraper?

- **Pure HTTP Speed:** Queries Google's official `https://api.osv.dev/v1/query` and `/v1/vulns/{id}` endpoints directly over HTTP, finishing default runs in seconds.
- **Multi-Ecosystem + Direct CVE/GHSA Lookup:** Query by `ecosystem` + `packageName` (with optional exact `version`), or supply `vulnerabilityIds` (`CVE-*`, `GHSA-*`, `PYSEC-*`, `GO-*`) directly.
- **Actionable Patch Metadata:** Outputs normalized flat fields (`osvId`, `aliases`, `cveIds`, `ecosystem`, `packageName`, `summary`, `severityType`, `cvssVector`, `severityLabel`, `cweIds`, `introducedVersions`, `fixedVersions`, `publishedAt`, `advisoryUrl`).
- **Empty `{}` Input Ready:** Works out of the box—running `{}` queries `npm` package `lodash` and returns up to `5` deduplicated advisories.
- **No Data, No Charge (Pay-Per-Event):** Uses the single `vulnerability-scraped` event (`count: 1`), charged **only after** a validated advisory record is pushed to the dataset, protected by `maxItems` and `maxCostUsd` caps.

***

### Popular Use Cases

- **AI Coding Agents & Dependency Reviews:** Let Claude, Cursor, or ChatGPT check whether a package upgrade introduces known CVEs and immediately read `fixedVersions`.
- **SBOM & Supply-Chain Enrichment:** Enrich package inventories across `npm`, `PyPI`, `Go`, and `Maven` with CVSS vectors and CWE classifications.
- **CVE Advisory Triage:** Batch-fetch full OSV technical details, aliases, and patch commit URLs for lists of `CVE-*` or `GHSA-*` IDs.

***

### Input Parameters

| Field | Type | Default | Description |
|---|---|---|---|
| `ecosystem` | `string` | `"npm"` | OSV package ecosystem (`npm`, `PyPI`, `Go`, `Maven`, `crates.io`, `RubyGems`, `NuGet`, `Packagist`). |
| `packageName` | `string` | `"lodash"` | Package name in the selected ecosystem. |
| `version` | `string` | `""` | Optional exact version string to filter advisories affecting that release. |
| `vulnerabilityIds` | `string[]` | `[]` | Optional list of CVE, GHSA, or OSV IDs to fetch directly. |
| `maxItems` | `integer` | `5` | Hard cap on deduplicated vulnerability records pushed and billed per run (`1` to `500`). |
| `maxCostUsd` | `number` | `0.25` | Pre-charge spending safety cap in USD for Pay-Per-Event billing. |

***

### Example JSON Output

```json
{
  "osvId": "GHSA-29mw-wpgm-hmr9",
  "aliases": ["CVE-2020-28500"],
  "cveIds": ["CVE-2020-28500"],
  "ecosystem": "npm",
  "packageName": "lodash",
  "summary": "Regular Expression Denial of Service (ReDoS) in lodash",
  "details": "Versions of lodash prior to 4.17.21 are vulnerable to Regular Expression Denial of Service (ReDoS).",
  "severityType": "CVSS_V3",
  "cvssVector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L",
  "severityLabel": "MODERATE",
  "cweIds": ["CWE-1333"],
  "introducedVersions": ["0"],
  "fixedVersions": ["4.17.21"],
  "publishedAt": "2021-02-15T12:00:00Z",
  "modifiedAt": "2024-01-10T09:15:00Z",
  "referenceUrls": ["https://nvd.nist.gov/vuln/detail/CVE-2020-28500"],
  "advisoryUrl": "https://osv.dev/vulnerability/GHSA-29mw-wpgm-hmr9",
  "extractedAt": "2026-12-03T18:00:00.000Z"
}
```

Execution diagnostics are saved to the default Key-Value Store under `RUN_DIAGNOSTICS`.

***

### 1-Prompt MCP & AI Agent Setup

Connect `2space/osv-cve-vulnerabilities-scraper` to Claude Desktop, Cursor, ChatGPT, or Antigravity via the Apify MCP endpoint:

```text
https://mcp.apify.com?tools=2space/osv-cve-vulnerabilities-scraper
```

```json
{
  "mcpServers": {
    "apify-osv": {
      "url": "https://mcp.apify.com?tools=2space/osv-cve-vulnerabilities-scraper",
      "headers": {
        "Authorization": "Bearer YOUR_APIFY_TOKEN"
      }
    }
  }
}
```

***

### Pricing & No Data, No Charge

- **Event:** `vulnerability-scraped` (`count: 1` per validated pushed vulnerability record).
- **No Data, No Charge:** If a package or CVE query returns 0 advisories, `Actor.charge()` is never called.

***

New to Apify? [Create a free Apify account](https://apify.com?fpr=2space) ($5 monthly free platform credits included) to run this Actor via API or MCP.

# Actor input Schema

## `ecosystem` (type: `string`):

OSV package ecosystem (e.g., 'npm', 'PyPI', 'Go', 'Maven', 'crates.io', 'RubyGems', 'NuGet', 'Packagist').

## `packageName` (type: `string`):

Open-source package name in the chosen ecosystem (e.g., 'lodash', 'requests', 'express', 'log4j-core').

## `version` (type: `string`):

Optional exact package version (e.g., '4.17.20') to filter vulnerabilities affecting that version.

## `vulnerabilityIds` (type: `array`):

Optional list of CVE, GHSA, PYSEC, or OSV IDs to look up directly via GET /v1/vulns/{id} (e.g., \['CVE-2021-23337', 'GHSA-35jh-r3h4-6jhm']).

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

Hard cap on the maximum number of deduplicated vulnerability records to push and charge.

## `maxCostUsd` (type: `number`):

Pre-charge spending safety cap in USD for Pay-Per-Event billing.

## Actor input object example

```json
{
  "ecosystem": "npm",
  "packageName": "lodash",
  "version": "",
  "vulnerabilityIds": [],
  "maxItems": 5,
  "maxCostUsd": 0.25
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset items containing extracted CVE and open-source vulnerability records.

# 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 = {
    "ecosystem": "npm",
    "packageName": "lodash",
    "version": "",
    "vulnerabilityIds": [],
    "maxItems": 5,
    "maxCostUsd": 0.25
};

// Run the Actor and wait for it to finish
const run = await client.actor("2space/osv-cve-vulnerabilities-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 = {
    "ecosystem": "npm",
    "packageName": "lodash",
    "version": "",
    "vulnerabilityIds": [],
    "maxItems": 5,
    "maxCostUsd": 0.25,
}

# Run the Actor and wait for it to finish
run = client.actor("2space/osv-cve-vulnerabilities-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 '{
  "ecosystem": "npm",
  "packageName": "lodash",
  "version": "",
  "vulnerabilityIds": [],
  "maxItems": 5,
  "maxCostUsd": 0.25
}' |
apify call 2space/osv-cve-vulnerabilities-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,2space/osv-cve-vulnerabilities-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/KuP1W2GN3QDhj1IwJ/builds/LV9kyRvvNZuh9QBWW/openapi.json
