# /nvd/cves/search

`POST /api/nvd/cves/search`

Price: 20 credits

Search NVD CVE vulnerability records by keyword, severity, CWE, CPE, dates and more

## How to use it

Search the NVD (National Vulnerability Database) for CVE vulnerability records. Combine a free-text keyword with structured filters — CVSS v2/v3/v4 severity or vector, CWE weakness id, an exact CPE name or a partial CPE match with a version range, published or last-modified date ranges, source/CNA, a CVE tag, and presence flags (in the CISA KEV catalog, US-CERT alerts, CERT/CC notes, OVAL). Each result is a full CVE record (same shape as the cves endpoint).

## Parameters

- `access-token` (string, required)

## Request body

- `timeout` (integer) — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)
- `keyword` (string, nullable) — Free-text query across CVE descriptions and references (examples: "apache log4j")
- `keyword_exact_match` (boolean) — Match the keyword as an exact phrase rather than individual words (default: false)
- `cvss_v2_severity` (string, nullable) — Restrict to this CVSS v2.0 qualitative severity (one of: "LOW", "MEDIUM", "HIGH")
- `cvss_v3_severity` (string, nullable) — Restrict to this CVSS v3.x qualitative severity (one of: "LOW", "MEDIUM", "HIGH", "CRITICAL")
- `cvss_v4_severity` (string, nullable) — Restrict to this CVSS v4.0 qualitative severity (one of: "LOW", "MEDIUM", "HIGH", "CRITICAL")
- `cvss_v2_metrics` (string, nullable) — Full or partial CVSS v2.0 vector string to match (examples: "AV:N/AC:L/Au:N/C:P/I:P/A:P")
- `cvss_v3_metrics` (string, nullable) — Full or partial CVSS v3.x vector string to match (examples: "CVSS:3.1/AV:N/AC:L")
- `cvss_v4_metrics` (string, nullable) — Full or partial CVSS v4.0 vector string to match (examples: "CVSS:4.0/AV:N/AC:L")
- `cwe_id` (string, nullable) — Restrict to CVEs with this CWE weakness id (examples: "CWE-79", "CWE-502")
- `cpe_name` (string, nullable) — Restrict to CVEs applicable to this exact CPE 2.3 name (examples: "cpe:2.3:a:apache:log4j:2.0:*:*:*:*:*:*:*")
- `is_vulnerable` (boolean) — Only return CVEs where the given CPE name is marked vulnerable (requires cpe_name) (default: false)
- `virtual_match_string` (string, nullable) — Partial CPE 2.3 string to match applicable CVEs, with optional version range (examples: "cpe:2.3:a:apache:log4j")
- `version_start` (string, nullable) — Lower version bound for virtual_match_string (examples: "2.0")
- `version_start_type` (string, nullable) — Whether version_start is inclusive or exclusive (one of: "including", "excluding")
- `version_end` (string, nullable) — Upper version bound for virtual_match_string (examples: "2.17.0")
- `version_end_type` (string, nullable) — Whether version_end is inclusive or exclusive (one of: "including", "excluding")
- `pub_start_date` (string, nullable) — Published from (ISO-8601); requires pub_end_date (examples: "2021-12-01")
- `pub_end_date` (string, nullable) — Published to (ISO-8601); requires pub_start_date (examples: "2021-12-31")
- `last_mod_start_date` (string, nullable) — Last modified from (ISO-8601); requires last_mod_end_date (examples: "2024-01-01")
- `last_mod_end_date` (string, nullable) — Last modified to (ISO-8601); requires last_mod_start_date (examples: "2024-03-01")
- `has_kev` (boolean) — Only CVEs in the CISA Known Exploited Vulnerabilities catalog (default: false)
- `has_cert_alerts` (boolean) — Only CVEs with a US-CERT Technical Alert (default: false)
- `has_cert_notes` (boolean) — Only CVEs with a CERT/CC Vulnerability Note (default: false)
- `has_oval` (boolean) — Only CVEs with an associated OVAL record (default: false)
- `cve_tag` (string, nullable) — Restrict to CVEs carrying this tag (one of: "disputed", "unsupported-when-assigned", "exclusively-hosted-service")
- `source_identifier` (string, nullable) — Restrict to CVEs published by this source (CNA email or UUID) (examples: "security@apache.org")
- `no_rejected` (boolean) — Exclude rejected CVE records (default: false)
- `count` (integer, required) — Number of CVE records to return (min: 1)

## Response

### 200 — Successful Response

- `@type` (string) (default: "NvdCve")
- `id` (string, required)
- `source_identifier` (string, nullable)
- `published_at` (string, nullable)
- `last_modified_at` (string, nullable)
- `vuln_status` (string, nullable)
- `description` (string, nullable)
- `cve_tags` (array) (default: [])
- `evaluator_comment` (string, nullable)
- `evaluator_solution` (string, nullable)
- `evaluator_impact` (string, nullable)
- `cwe_ids` (array) (default: [])
- `weaknesses` (array) (default: [])
  - `@type` (string) (default: "NvdWeakness")
  - `source` (string, nullable)
  - `type` (string, nullable)
  - `cwe_ids` (array) (default: [])
- `cvss_metrics` (array) (default: [])
  - `@type` (string) (default: "NvdCvssMetric")
  - `version` (string, required)
  - `source` (string, nullable)
  - `type` (string, nullable)
  - `vector_string` (string, nullable)
  - `base_score` (number, nullable)
  - `base_severity` (string, nullable)
  - `exploitability_score` (number, nullable)
  - `impact_score` (number, nullable)
  - `attack_vector` (string, nullable)
  - `attack_complexity` (string, nullable)
  - `attack_requirements` (string, nullable)
  - `privileges_required` (string, nullable)
  - `user_interaction` (string, nullable)
  - `authentication` (string, nullable)
  - `scope` (string, nullable)
  - `confidentiality_impact` (string, nullable)
  - `integrity_impact` (string, nullable)
  - `availability_impact` (string, nullable)
  - `sub_confidentiality_impact` (string, nullable)
  - `sub_integrity_impact` (string, nullable)
  - `sub_availability_impact` (string, nullable)
- `ssvc` (array) (default: [])
  - `@type` (string) (default: "NvdSsvc")
  - `source` (string, nullable)
  - `role` (string, nullable)
  - `version` (string, nullable)
  - `computed_at` (string, nullable)
  - `exploitation` (string, nullable)
  - `automatable` (string, nullable)
  - `technical_impact` (string, nullable)
- `configurations` (array) (default: [])
  - `@type` (string) (default: "NvdConfiguration")
  - `operator` (string, nullable)
  - `negate` (boolean) (default: false)
  - `nodes` (array) (default: [])
    - `@type` (string) (default: "NvdConfigNode")
    - `operator` (string, nullable)
    - `negate` (boolean) (default: false)
    - `cpe_matches` (array) (default: [])
- `references` (array) (default: [])
  - `@type` (string) (default: "NvdReference")
  - `url` (string, required)
  - `source` (string, nullable)
  - `tags` (array) (default: [])
- `affected` (array) (default: [])
  - `@type` (string) (default: "NvdAffectedProduct")
  - `source` (string, nullable)
  - `vendor` (string, nullable)
  - `product` (string, nullable)
  - `versions` (array) (default: [])
    - `@type` (string) (default: "NvdAffectedVersion")
    - `version` (string, nullable)
    - `status` (string, nullable)
    - `version_type` (string, nullable)
    - `less_than` (string, nullable)
    - `less_than_or_equal` (string, nullable)
- `vendor_comments` (array) (default: [])
  - `@type` (string) (default: "NvdVendorComment")
  - `organization` (string, nullable)
  - `text` (string, nullable)
  - `last_modified` (string, nullable)
- `is_kev` (boolean) (default: false)
- `cisa_exploit_add` (string, nullable)
- `cisa_action_due` (string, nullable)
- `cisa_required_action` (string, nullable)
- `cisa_vulnerability_name` (string, nullable)
- `web_url` (string) (default: "")

## Errors

### 422 — Validation Error

The request body did not validate

What to do: Check the fields against this schema. A URN with the wrong prefix is the most common cause.

- `detail` (array)
  - `loc` (array, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (object)

### 408

The request ran past its time limit

What to do: Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.

### 412

The entity was not found, or a precondition failed

What to do: Retrying will not help: either the entity does not exist, or the input points at a different one.

### 429

Too many requests: a rate limit or a usage window is exhausted

What to do: When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.

### 500

Something broke on our side

What to do: Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.

### 529

Rate limit reached, or the endpoint is overloaded

What to do: Wait at least 30 seconds, then retry.

## Response envelope

Success: Array of objects (may be empty if no results)

Error: Error may coexist with partial results if it occurs mid-execution. Check X-Error header and status code.

Every response carries these headers:

- `X-Error` — Error message text (present only on error)
- `X-Request-ID` — Unique request identifier
- `X-Execution-Time` — Execution time in seconds
- `X-Result-Count` — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.
- `X-Total-Available-Results` — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.
- `X-Warning` — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.
- `X-Retry-After` — Seconds to wait before retrying. Present only on 429.

