OSV Package Vulnerability Query API

Use the OSV Package Vulnerability Query API to find known vulnerabilities affecting an open source package version or Git commit. Identify a package with its name and ecosystem or a Package URL, or provide a commit hash, then continue with a page token when more results are available. Review affected version ranges, published advisories, and available fix references to check dependency updates, investigate a vulnerable release, or add checks to a build workflow. Results reflect the indexed database rather than a scan of your source code. The detail page includes request and response examples, supported parameters, and per-request pricing.

Selected price
$0.005 / callPublished pricing
Sellers / implementations
1 / 1
Requests · 30d
—Loading...
Success rate · 30d
—Loading...

Run sends a real API request. Charges follow the published API contract.

Request parameters
body* object
The commit hash to query for. If specified, `version` should not be set.
package object
Required. The ecosystem for this package. For the complete list of valid ecosystem names, see <https://ossf.github.io/osv-schema/#affectedpackage-field>.
Required. Name of the package. Should match the name used in the package ecosystem (e.g. the npm package name). For C/C++ projects integrated in OSS-Fuzz, this is the name used for the integration.
Optional. The package URL for this package.
The package to query against. When a `commit` hash is given, this is optional. Use name AND ecosystem OR purl. Do not combine purl with name or ecosystem. OSV validates these semantic combinations.
Continuation token from the prior result. In a batch, use the token belonging to the same query item.
The version string to query for. A fuzzy match is done against upstream versions. If specified, `commit` should not be set. Do not combine top-level version with a version embedded in package.purl; OSV returns 400 for that combination.
Query format.

Sample response

vulns [1]
[0] {}
"affected": [
  {
    "database_specific": {
      "source": "https://github.com/google/oss-fuzz-vulns/blob/main/vulns/mruby/OSV-2020-744.yaml"
    },
    "ecosystem_specific": {
      "severity": "HIGH"
    },
    "package": {
      "ecosystem": "OSS-Fuzz",
      "name": "mruby",
      "purl": "pkg:generic/mruby"
    },
    "ranges": [
      {
        "events": [
          {
            "introduced": "9cdf439db52b66447b4e37c61179d54fad6c8f33"
          },
          {
            "fixed": "97319697c8f9f6ff27b32589947e1918e3015503"
          }
        ],
        "repo": "https://github.com/mruby/mruby",
        "type": "GIT"
      }
    ],
    "versions": [
      "2.1.2",
      "2.1.2-rc",
      "2.1.2-rc2"
    ]
  }
]
detailsString · text preview
vulns[0].details
OSS-Fuzz report: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23801

```
Crash type: Heap-double-free
Crash state:
mrb_default_allocf
mrb_free
obj_free
```
"id": "OSV-2020-744"
"modified": "2022-04-13T03:04:39.780694Z"
"published": "2020-07-04T00:00:01.948828Z"
"references": [
  {
    "type": "REPORT",
    "url": "https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23801"
  }
]
"schema_version": "1.7.3"
"summary": "Heap-double-free in mrb_default_allocf"

Response result

Response structure

Inferred from examples
  • vulnsobject[]
    • affectedobject[]
      • database_specificobject
        • sourcestring
      • ecosystem_specificobject
        • severitystring
      • packageobject
        • ecosystemstring
        • namestring
        • purlstring
      • rangesobject[]
        • eventsobject[]
          • introducedstring
          • fixedstring
        • repostring
        • typestring
      • versionsstring[]
    • detailsstring
    • idstring
    • modifiedstring
    • publishedstring
    • referencesobject[]
      • typestring
      • urlstring
    • schema_versionstring
    • summarystring

Loading related APIs…

Common questions

Do I need a separate key for every provider?

Use your OpenAny API key for standard API access. Read it from OPENANY_API_KEY in your environment and keep it out of prompts, source code and logs.

Are these providers interchangeable?

No. Each offering has its own inputs, pricing and response contract. Selecting a catalog offering does not establish automatic routing or fallback. Confirm the service contract before calling.

How is this API billed?

API-key calls use your shared balance at the selected implementation's published rate. Check the billing unit and request-specific pricing rules before making a paid call. Recorded usage determines the final charge under that contract.

Where do the price and contract come from?

The selected implementation publishes its provider, request contract, revision and billing rules through OpenAny's public API catalog. A revision number identifies a contract version, not a price update date. A price update timestamp is not supplied; do not treat a page date as one.

How do OpenAny Balance and x402 differ?

OpenAny Balance uses an API key and one shared balance. Card, USDC and x402 top-ups, card auto top-up and USDC subscriptions fund that balance; available routes appear on the Credits page. Direct x402 is a separate pay-per-request flow, available only on listings that show it and requiring an authorized payment client.

Does Playground send a paid request?

Yes. After you sign in, Run sends a real API request using an active OpenAny API key. Charges follow the published API contract and use your shared balance. Selecting an implementation, editing inputs and viewing sample responses do not send requests.

Use OSV Package Vulnerability Query API with your agent

Inspect endpoint contracts and confirm availability and pricing before a paid call.