# NIST CPE Scraper - Software Product Dictionary (No Key) (`ninhothedev/nist-cpe-scraper`) Actor

$0.5/1K 🔥 NIST CPE scraper! Official software product dictionary with vendor, product & version IDs. No key. JSON, CSV, Excel or API in seconds. Power asset inventory & SBOM matching ⚡

- **URL**: https://apify.com/ninhothedev/nist-cpe-scraper.md
- **Developed by:** [ninhothedev](https://apify.com/ninhothedev) (community)
- **Categories:** Developer tools, Automation, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## NIST CPE Scraper - Software Product Dictionary (No API Key)

Scrape the **official NIST CPE dictionary** - the canonical list of software and hardware
product identifiers maintained inside the National Vulnerability Database (NVD). Every
record gives you a machine-readable `vendor / product / version` identity for a piece of
software, an operating system or a device, ready for **asset inventory**, **SBOM
enrichment**, **vulnerability matching** and **software asset management**.

No API key, no login, no proxies required.

### What is a CPE?

A **CPE (Common Platform Enumeration)** is a standardised naming scheme for IT products,
written as a 13-part string such as
`cpe:2.3:a:openssl:openssl:1.1.1w:*:*:*:*:*:*:*` - part, vendor, product, version, update,
edition, language, sw\_edition, target\_sw, target\_hw, other. Security tooling uses these
identifiers as the join key between "what software do I run" and "which advisories apply
to it", which is exactly why NVD publishes the dictionary separately from the vulnerability
feed.

### This is the product dictionary, not a CVE feed

| | This Actor | [circl-cve-scraper](https://apify.com/ninhothedev/circl-cve-scraper) / CVE-style actors |
|---|---|---|
| Object | **Products** (`cpe:2.3:a:openssl:openssl:3.0.13`) | **Vulnerabilities** (`CVE-2024-XXXX`) |
| Answers | "What is the exact identifier for this software/version?" | "Which flaws affect this software?" |
| Typical use | Asset inventory, CMDB normalisation, SBOM enrichment | Alerting, patch prioritisation, risk scoring |
| Key fields | vendor, product, version, part, titles, deprecation | CVE id, CVSS, description, affected ranges |

In short: **CPE = the noun, CVE = the problem with the noun.** You normalise your inventory
against this Actor's output, then feed those CPE names into a CVE source to get matches
with far fewer false positives than fuzzy name matching.

### Modes

| Mode | What it does | Input used |
|---|---|---|
| `search` | Keyword queries against titles and CPE names | `keywords` (e.g. `openssl`, `apache http server`) |
| `match` | Expands a CPE match string, e.g. a whole vendor namespace | `matchStrings` (e.g. `cpe:2.3:a:microsoft:*`) |
| `recent` | Everything modified inside the last N days | `lastModDays` (1-120) |

### Input

```json
{
  "mode": "search",
  "keywords": ["apache http server", "openssl"],
  "matchStrings": ["cpe:2.3:a:microsoft:*"],
  "lastModDays": 30,
  "includeDeprecated": false,
  "maxItems": 200
}
```

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | select | `search` | `search`, `match` or `recent` |
| `keywords` | array | `["apache http server","openssl"]` | Free-text product queries (search mode) |
| `matchStrings` | array | - | CPE 2.3 match strings (match mode) |
| `lastModDays` | integer | `30` | Look-back window, max 120 (recent mode) |
| `includeDeprecated` | boolean | `false` | Keep superseded dictionary entries |
| `maxItems` | integer | `200` | Cap on dataset items, max 5000 |

### Output

One item per CPE product. Every field is nullable.

```json
{
  "cpe_name": "cpe:2.3:a:openssl:openssl:0.9.1c:*:*:*:*:*:*:*",
  "cpe_name_id": "AC31DD13-D8A9-44DD-B735-C2A75C2BF249",
  "part": "a",
  "part_label": "application",
  "vendor": "openssl",
  "product": "openssl",
  "version": "0.9.1c",
  "update": null,
  "edition": null,
  "language": null,
  "sw_edition": null,
  "target_sw": null,
  "target_hw": null,
  "other": null,
  "title": "OpenSSL Project OpenSSL 0.9.1c",
  "all_titles": [{ "lang": "en", "title": "OpenSSL Project OpenSSL 0.9.1c" }],
  "is_deprecated": false,
  "deprecated_by": null,
  "created": "2007-08-23T21:05:57.937Z",
  "last_modified": "2011-01-12T14:35:43.723Z",
  "reference_count": 2,
  "references": [{ "type": "Product", "ref": "https://www.openssl.org/" }],
  "source": "nvd-cpe",
  "scraped_at": "2026-07-28T17:50:28+00:00"
}
```

#### Correct CPE parsing (this matters)

- The 13 components are split on **unescaped** colons only. A naive `split(":")` corrupts
  every name containing an escaped colon (`foo\:bar`, Debian epoch versions like `1\:2.3`).
- Escapes are removed for the parsed fields, so `xerces-c\+\+` becomes `xerces-c++`, while
  `cpe_name` keeps the original string.
- A component that is `*` (ANY) or `-` (NA) is emitted as **`null`**, never as the literal
  `"*"`. An escaped `\*` stays a literal asterisk.
- `part` gives the raw letter (`a`, `o`, `h`) and `part_label` the readable form
  (`application`, `operating_system`, `hardware`).

### Rate limits (important)

The NVD API allows roughly **5 requests per rolling 30 seconds without an API key**. This
Actor therefore spaces requests **6.5 seconds apart** and backs off automatically on HTTP
403/429. A **free NVD API key** (https://nvd.nist.gov/developers/request-an-api-key) raises
that ceiling to about 50 requests per 30 seconds - if you need to mirror large slices of the
dictionary regularly, request one and run fewer, larger pages. Each request already pulls up
to 2000 products, so the default 200-item run finishes in a single call.

### Pricing

Roughly **$0.5 per 1,000 products** on the Apify platform (pay-per-result), plus the usual
platform compute. Runs use 512 MB and no proxy, so cost is dominated by result count.

### Use cases

- **Asset inventory** - normalise messy vendor/product strings from CMDB, MDM or EDR exports
  into canonical CPE names.
- **SBOM enrichment** - attach a CPE identity to CycloneDX/SPDX components that only carry a
  purl or a free-text name.
- **Vulnerability matching** - use exact CPE names as the join key against CVE feeds instead
  of fuzzy string matching.
- **Software asset management** - track version coverage per vendor, spot deprecated
  identifiers and follow `deprecated_by` to their replacements.

### Related Actors

- [circl-cve-scraper](https://apify.com/ninhothedev/circl-cve-scraper) - CVE vulnerability records
- [software-eol-scraper](https://apify.com/ninhothedev/software-eol-scraper) - end-of-life and support dates
- [deps-dev-scraper](https://apify.com/ninhothedev/deps-dev-scraper) - open source dependency and package metadata
- [ip-threat-intel-scraper](https://apify.com/ninhothedev/ip-threat-intel-scraper) - IP reputation and threat intelligence

### Notes

- Data source: NVD CPE API 2.0 (`services.nvd.nist.gov/rest/json/cpes/2.0`), public domain
  US government data.
- Deprecated entries are excluded by default; enable `includeDeprecated` to audit legacy
  identifiers and their replacements.
- The Actor fails with a distinct `RATE LIMIT` error message if it collected nothing because
  NVD answered 403/429, so you can tell throttling apart from an empty query.

# Actor input Schema

## `mode` (type: `string`):

How to query the NVD CPE dictionary. 'search' runs keyword queries (keywords field), 'match' expands CPE match strings such as a whole vendor namespace (matchStrings field), 'recent' returns dictionary entries modified inside the last N days (lastModDays field).

## `keywords` (type: `array`):

Free-text product queries used in 'search' mode, e.g. 'openssl' or 'apache http server'. Each keyword is one NVD query; matches are made against the CPE titles and names. Ignored in other modes.

## `matchStrings` (type: `array`):

CPE 2.3 match strings used in 'match' mode, e.g. 'cpe:2.3:a:microsoft:*' for every Microsoft application or 'cpe:2.3:o:linux:linux\_kernel:*' for all kernel versions. Ignored in other modes.

## `lastModDays` (type: `integer`):

Size of the look-back window for 'recent' mode. The Actor requests every dictionary entry modified between now minus N days and now. NVD limits a single window to 120 days, so values above 120 are clamped. Ignored in other modes.

## `includeDeprecated` (type: `boolean`):

Keep entries NVD has marked as deprecated (they carry a 'deprecated\_by' pointer to their replacement). Off by default so you only get currently valid identifiers.

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

Hard cap on the number of CPE products written to the dataset across all queries. Keyless NVD access is throttled to roughly 5 requests per 30 seconds, so large caps take longer.

## Actor input object example

```json
{
  "mode": "search",
  "keywords": [
    "apache http server",
    "openssl"
  ],
  "matchStrings": [
    "cpe:2.3:a:microsoft:*"
  ],
  "lastModDays": 30,
  "includeDeprecated": false,
  "maxItems": 200
}
```

# Actor output Schema

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

No description

# 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 = {
    "keywords": [
        "apache http server",
        "openssl"
    ],
    "matchStrings": [
        "cpe:2.3:a:microsoft:*"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ninhothedev/nist-cpe-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 = {
    "keywords": [
        "apache http server",
        "openssl",
    ],
    "matchStrings": ["cpe:2.3:a:microsoft:*"],
}

# Run the Actor and wait for it to finish
run = client.actor("ninhothedev/nist-cpe-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 '{
  "keywords": [
    "apache http server",
    "openssl"
  ],
  "matchStrings": [
    "cpe:2.3:a:microsoft:*"
  ]
}' |
apify call ninhothedev/nist-cpe-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ninhothedev/nist-cpe-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/WG33z5siPZY1lRDXx/builds/0BmIgrbd2gRNQdpeo/openapi.json
