OpenAny
Get API keyAPI Key
APIDeveloper

osv logo
OSV Package Vulnerability Query API

Find OSV vulnerabilities for a package version or Git commit via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Osv, pass parameters such as package, version, and retrieve structured data including matched vulnerability identifier, advisory summary, and affected package ecosystem for release checks and commit investigation, ready for production pipelines and AI agent automation.

Selected price
$0.005 / callPublished pricing
Sellers / APIs
1 / 1
Requests · 30d
2Selected implementation · last 30 days
Success rate · 30d
100.00%Selected implementation · last 30 days
USE THIS API

OSV Package Vulnerability Query API

Prepare your request, then continue with your agent.

Selected price

$0.005 / call

Provider
Pricing
Connect your agent
On this page

Overview

Overview
OSV Package Vulnerability Query API

OSV Package Vulnerability Query API

POST a package identity and version, a PURL, or a commit-based query. Results contain vulnerability records rather than the compact batch projection. If a next_page_token is returned, repeat the same query with page_token until pagination is complete.

Quick Facts

Fact Value
Access OpenAny REST
Authentication OpenAny API key in the Authorization header
Core inputs JSON body: package/version, PURL, or commit; optional page_token for continuation.
Selected implementation osv · OSV Package Vulnerability Query API
Billing See the pricing area for the selected implementation and request options

What You Can Build

  • Release checks: Look up known advisories for a specific package version.
  • Commit investigation: Link a selected Git commit to matching vulnerability records.

Documented Response Fields

Field Meaning
vulns[].id Matched vulnerability identifier
vulns[].summary Advisory summary
vulns[].affected[].package.ecosystem Affected package ecosystem
vulns[].affected[].ranges[].type Type used to interpret affected ranges
vulns[].references[].url Source report or advisory link

Quick Start

  1. Set OPENANY_API_KEY to your OpenAny API key.
  2. Review the selected implementation and pricing, then adapt the request below to your target.
  3. Check the HTTP response and business result before reading optional fields.
bash
curl --request POST \
  https://api.openany.si/v1/agent-apis/osv/v1/query \
  -H "Authorization: Bearer ${OPENANY_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"package":{"ecosystem":"OSS-Fuzz","name":"mruby"},"version":"2.1.2"}'

Request and Response Examples

The saved examples include a prior package-query capture and a historical documentation response. The calling template is independent; use the returned package identity, affected ranges and modification time when reviewing matches.

Published OSV Package Vulnerability Query API implementation contract.

Pricing and Billing

The pricing area reflects the selected API implementation. Review its billing unit and any request-dependent rules before calling; a source service's public availability does not determine OpenAny billing.

Frequently Asked Questions

View FAQ

Related APIs

Playground

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

Run a request to see the actual response. Published samples are in Examples.

Response result

Sellers

SellerPricingRequests · 30dPerformanceAccess
osvCurrent
OSV Package Vulnerability Query API · POST · View API reference
$0.005 / call2
100.00%successP50612.5ms
Selected implementation traffic · 11/3/2026 – 12/3/2026 (UTC)
Selected pricing · osvUSD / call
Unit price
$0.005

Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 2. Price update time: not supplied.

calls

Total $0.5

API

Method
POST
Endpoint
https://api.openany.si/v1/agent-apis/osv/v1/query
Content type
application/json
Authentication
Authorization: Bearer $OPENANY_API_KEY
View request and response examples

Input parameters

Fields in this listing; additional options and input encoding can vary by provider.

ParameterLocationTypeRequiredDescription
commitJSON request bodybodystringNo

The commit hash to query for. If specified, `version` should not be set.

packageJSON request bodybodyobjectNo

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.

Nested fields and variants
body.package.ecosystem string · Optional

Parent object: body.package

Required. The ecosystem for this package. For the complete list of valid ecosystem names, see https://ossf.github.io/osv-schema/#affectedpackage-field.
body.package.name string · Optional

Parent object: body.package

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.
body.package.purl string · Optional

Parent object: body.package

Optional. The package URL for this package.
page_tokenJSON request bodybodystringNo

Continuation token from the prior result. In a batch, use the token belonging to the same query item.

versionJSON request bodybodystringNo

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.

Required markers inside a nested object or variant apply when that object or variant is used.

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

Agent integration

Copy the resource contract without sharing an API key.

Download MDView API Markdown

Error handling

StatusNext step
400Check the offering and request fields.
401 / 403Verify your credentials and access permissions.
402Inspect the selected access mode and returned payment requirements.
429Respect the returned rate limit and retry guidance.
5xxInspect the error and usage record before retrying a paid operation.

Examples

Official example · Live OSV paired capture - 2026-11-19

Example from the provider's documentation. Field values in your results will differ.

  1. Prepare your environment

    Use a terminal with cURL installed.

    Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.

    Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.

    Terminal · macOS / Linux
    printf 'OpenAny API key: '
    read -r -s OPENANY_API_KEY
    export OPENANY_API_KEY
    printf '\n'
  2. Run the request

    Paste the complete command below into your terminal.

    Values to replace before running 1

    Review these request fields before running. Keep the published provider and request method unchanged.

    body
    Query format.
    Terminal · cURL
    curl \
      'https://api.openany.si/v1/agent-apis/osv/v1/query' \
      -X POST \
      -H "Authorization: Bearer $OPENANY_API_KEY" \
      -H 'Content-Type: application/json' \
      --data-raw '{
      "package": {
        "ecosystem": "OSS-Fuzz",
        "name": "mruby"
      },
      "version": "2.1.2"
    }'
  3. Check the response

    Sample response · Documented HTTP 200

    Sample response
    {
      "vulns": [
        {
          "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"
              ]
            }
          ],
          "details": "OSS-Fuzz report: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23801\n\n```\nCrash type: Heap-double-free\nCrash state:\nmrb_default_allocf\nmrb_free\nobj_free\n```\n",
          "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"
        }
      ]
    }

Common questions

Which package identity format should I use?

Use package.name with package.ecosystem, or package.purl. Do not combine the two formats; retain ecosystem spelling such as PyPI.

Can I set commit and version together?

No. Select a commit-based query or a version-based query. A versioned PURL also must not be combined with a top-level version.

Does an empty page prove there are no matches?

Not if next_page_token is present. Continue with page_token while preserving the original query until no continuation token remains.

Is this the same output as the batch endpoint?

No. This endpoint returns advisory records; the batch endpoint returns compact id and modified matches for multiple query items.

Which API key should I use?

Use your OpenAny API key as Bearer authentication on the documented OpenAny route.

Where can I check the current request price?

Check the pricing area for the selected implementation. Follow its billing unit and any request-dependent rules before sending the request.

Use OSV Package Vulnerability Query API with your agent

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