> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# OSV.dev

> Open source vulnerabilities by package and version, commit hash or ID (GHSA, PYSEC, RUSTSEC, Go, OSS-Fuzz and more) in the OSV format, from Google's free OSV.dev API.

![](https://mintcdn.com/webrouter/T_A5Quwg50s_JK2y/logo/data-apis/osv.webp?fit=max\&auto=format\&n=T_A5Quwg50s_JK2y\&q=85\&s=ff9433e17c579f2509d8b0dfd242fe0c)

[Web Catalog · Security](https://docs.webrouter.net/data-apis.md?category=security)

No key needed

Endpoints

3

Auth

None

[Vendor docs](https://google.github.io/osv.dev/api/)

## Notes

* Keyless and, per the docs, currently without rate limits. Responses over HTTP/1.1 are capped at 32 MiB; HTTP/2 has no cap.
* Queries are reads sent as POST with a JSON body. Values are case-sensitive: ecosystem 'PyPI', not 'pypi'.
* Give the version either in version or in a versioned purl (pkg:pypi/jinja2\@3.1.4), never both: that is a 400.

## Endpoints

POST

Find vulnerabilities for a package version or commit

Full OSV records affecting one package at one version, or one commit.

[Open](#osv-query)

POST

Find vulnerabilities for many packages at once

Vulnerability IDs and modified times for up to 1,000 package versions or commits, in input order.

[Open](#osv-querybatch)

GET

Get a vulnerability by ID

The full OSV record: summary, details, aliases, affected packages and ranges, severity, references.

[Open](#osv-vulns-get)

### Find vulnerabilities for a package version or commit

POST

`/v1/query`

`osv.query`

Full OSV records affecting one package at one version, or one commit.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`package`</td><td>object</td><td>body</td><td>The package: \{name, ecosystem} (ecosystem names are case-sensitive, e.g. PyPI, npm, Go, Maven, RubyGems, crates.io, GIT) or \{purl}. Optional when commit is given. Example `{"name": "jinja2", "ecosystem": "PyPI"}`</td></tr>
    <tr><td>`version`</td><td>string</td><td>body</td><td>Version string, fuzzy-matched against upstream versions. Do not combine with commit or a versioned purl. Example `3.1.4`</td></tr>

    <tr>
      <td>
        `commit`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        Commit hash to query instead of a version.
      </td>
    </tr>

    <tr>
      <td>
        `page_token`
      </td>

      <td>
        string
      </td>

      <td>
        body
      </td>

      <td>
        next\_page\_token from the previous response.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://google.github.io/osv.dev/post-v1-query/) · Same job: [ENISA EU Vulnerability Database (EUVD)](https://docs.webrouter.net/data-apis/enisa-euvd.md#enisa-euvd-vulns-search), [NIST National Vulnerability Database (NVD)](https://docs.webrouter.net/data-apis/nvd.md#nvd-cves-search)

```python Python theme={null}
router.call_data_api("osv.query", {'package': {'name': 'jinja2', 'ecosystem': 'PyPI'}, 'version': '3.1.4'})
```

```text MCP theme={null}
call_data_api(endpoint="osv.query", params={"package": {"name": "jinja2", "ecosystem": "PyPI"}, "version": "3.1.4"})
```

> [!NOTE]
>
> * A read over POST.
> * Pages when over 1,000 vulnerabilities or 20 seconds: repeat with page\_token until next\_page\_token is gone.

### Find vulnerabilities for many packages at once

POST

`/v1/querybatch`

`osv.querybatch`

Vulnerability IDs and modified times for up to 1,000 package versions or commits, in input order.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`queries` required</td><td>array</td><td>body</td><td>List of query objects, each shaped like the query endpoint's body (\{package, version} or \{commit}, optional page\_token). Example `[{"package": {"purl": "pkg:pypi/mlflow@0.4.0"}}, {"package": {"ecosystem": "PyPI", "name": "jinja2"}, "version": "2.4.1"}]`</td></tr>
  </tbody>
</table>

[Vendor docs](https://google.github.io/osv.dev/post-v1-querybatch/) · Same job: [ENISA EU Vulnerability Database (EUVD)](https://docs.webrouter.net/data-apis/enisa-euvd.md#enisa-euvd-vulns-search), [NIST National Vulnerability Database (NVD)](https://docs.webrouter.net/data-apis/nvd.md#nvd-cves-search)

```python Python theme={null}
router.call_data_api("osv.querybatch", {'queries': [{'package': {'purl': 'pkg:pypi/mlflow@0.4.0'}}, {'package': {'ecosystem': 'PyPI', 'name': 'jinja2'}, 'version': '2.4.1'}]})
```

```text MCP theme={null}
call_data_api(endpoint="osv.querybatch", params={"queries": [{"package": {"purl": "pkg:pypi/mlflow@0.4.0"}}, {"package": {"ecosystem": "PyPI", "name": "jinja2"}, "version": "2.4.1"}]})
```

> [!NOTE]
>
> * A read over POST. Returns only id and modified per vulnerability; fetch details with vulns.get.
> * Per-query next\_page\_token appears when one query exceeds 1,000 results or the batch exceeds 3,000; re-query just those.

### Get a vulnerability by ID

GET

`/v1/vulns/{id}`

`osv.vulns.get`

The full OSV record: summary, details, aliases, affected packages and ranges, severity, references.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`id` required</td><td>string</td><td>path</td><td>OSV ID, case-sensitive (GHSA, not ghsa). Example `OSV-2020-111`</td></tr>
  </tbody>
</table>

[Vendor docs](https://google.github.io/osv.dev/get-v1-vulns/) · Same job: [AlienVault OTX (LevelBlue Open Threat Exchange)](https://docs.webrouter.net/data-apis/alienvault-otx.md#alienvault-otx-indicators-cve), [CVE Program CVE Services](https://docs.webrouter.net/data-apis/cve-services.md#cve-services-cve-get), [ENISA EU Vulnerability Database (EUVD)](https://docs.webrouter.net/data-apis/enisa-euvd.md#enisa-euvd-vulns-get), [Red Hat Security Data API](https://docs.webrouter.net/data-apis/redhat-security.md#redhat-security-cve-get)

```python Python theme={null}
router.call_data_api("osv.vulns.get", {'id': 'OSV-2020-111'})
```

```text MCP theme={null}
call_data_api(endpoint="osv.vulns.get", params={"id": "OSV-2020-111"})
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.