---
title: "Search vulnerabilities"
method: POST
path: "/api/v2/vulnerabilities/search"
tags: ["Vulnerabilities"]
---

# Search vulnerabilities

`POST /api/v2/vulnerabilities/search`

## Request

- Base URL: `https://zeropath.com`
- URL: `https://zeropath.com/api/v2/vulnerabilities/search`
- Auth: API key in header `X-ZeroPath-API-Token-Id` and API key in header `X-ZeroPath-API-Token-Secret`

Semantic search across all active vulnerabilities in an organization to find security issues that match a natural-language query. Useful when you know what kind of vulnerability you're looking for (e.g. "SQL injection in API endpoints", "hardcoded credentials", "missing authentication checks") but don't know which repository it's in. Returns ranked results from the latest completed scan of each repository, with similarity scores. Use the `id` from results to fetch full details with `issues.get`, including remediation and patch suggestion data when a patch exists.

## Request body

- VulnerabilitySearchRequest
  - `organizationId` string: Organization to search within. Limits results to repositories the caller can access in this org.
  - `query` string, required: Natural-language search query matched against vulnerability descriptions using semantic similarity (e.g. "SQL injection in user input", "authentication bypass", "insecure deserialization").
  - `limit` integer: Maximum number of results to return. Defaults to 10.

## Response `200`

Search results

- VulnerabilitySearchResult[]
  - `id` string, required: Unique ID of the vulnerability.
  - `repositoryId` string, required: ID of the repository containing this vulnerability.
  - `repositoryName` string, required: Display name of the repository.
  - `title` string, required: Generated title summarizing the vulnerability.
  - `description` string, required: Generated description of the vulnerability and its impact.
  - `vulnClass` string, required: Vulnerability classification (e.g. "SQL Injection", "Cross-Site Scripting", "Path Traversal").
  - `severity` number, required: Severity score (higher is more severe).
  - `affectedFile` string, required: File path where the vulnerability was detected.
  - `startLine` integer, required: Start line number of the vulnerable code.
  - `endLine` integer, required: End line number of the vulnerable code.
  - `score` number, required: Semantic similarity score between 0 and 1. Higher means a closer match to the query.

## Other responses

- `400`: Error Response
- `401`: Error Response

---

[API](https://skmtc.dev/zeropath/apis/zeropath-api.md) - [All operations](https://skmtc.dev/zeropath/apis/zeropath-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zeropath/apis/zeropath-api/revisions/126e9c80ba0d?raw)
