# OSV Dependency Batch Scan

> OSV Dependency Batch Scan is a paid API for AI agents from 1gateway.dev, paid per call via x402, $0.0045/call, status unknown (last checked 2026-12-02).

Scans up to 20 packages across multiple ecosystems for known vulnerabilities using OSV.dev data, returning severity-bucketed advisory summaries with CVEs and fix versions.

## Facts

- Endpoint: GET https://1gateway.dev/v1/dev/vulnerabilities/batch?utm_source=zero.xyz
- Price: $0.0045/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/osv-dependency-batch-scan-b3a7083a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wiS8mB7NlfpAWJVEnG3j2

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability osv-dependency-batch-scan-b3a7083a
```

Example prompt: Before I install these packages, can you check them for known vulnerabilities: npm:lodash@4.17.15, pypi:django@3.2.0, and go:golang.org/x/net@0.17.0? I need severity breakdowns and any CVEs with fixed versions.

## When to prefer this

Use this endpoint when you need a quick, multi-ecosystem vulnerability scan of specific versioned packages without signing up for a dedicated security tool. It is ideal for pre-install, pre-merge, or pre-deploy checks in agentic CI/CD pipelines. It supports heterogeneous stacks (npm, pypi, go, cargo, maven, nuget) in a single call, making it superior to single-ecosystem scanners when projects mix languages. Prefer it over full SBOM scanning tools when you have a known list of up to 20 packages and need fast, structured CVE output with fix versions.

## Known failure modes

- Missing or malformed packages parameter returns a 400 error
- More than 20 packages in one request may be rejected or truncated
- Unknown ecosystem prefix causes that package entry to fail or be skipped
- Version string format errors (e.g. missing @ separator) result in parse failures
- Payment not settled (x402) causes 402 response before scan executes
- OSV.dev upstream outage may result in 503 or empty advisory data

## How this service works

Use when an agent must scan a project's dependencies before install, upgrade or merge. Input: packages, up to 20 ecosystem:name@version, comma-separated (npm, pypi, go, cargo/crates.io, maven, nuget...). Output: JSON summary (vulnerable count, critical/high/moderate/low), per package vulnerable yes/no, counts, top advisories with CVE, severity, fixed versions, osv.dev links. Data: OSV.dev, CC BY 4.0. Example: ?packages=npm:lodash@4.17.15,pypi:django@3.2.0

## Output

A JSON object with a summary (total packages checked, counts of critical/high/moderate/low advisories) and per-package results including: vulnerable true/false, total advisory count, severity breakdown by bucket, top advisories with CVE ID, severity label, short summary, fixed versions array, and a direct osv.dev link. Attribution to OSV.dev under CC BY 4.0 is included.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "packages"
     ],
     "properties": {
      "packages": {
       "type": "string",
       "maxLength": 4000,
       "description": "1-20 packages as ecosystem:name@version, comma-separated (npm:lodash@4.17.15, pypi:django@3.2.0, go…"
      },
      "ecosystem": {
       "type": "string",
       "maxLength": 20,
       "description": "Default ecosystem for items written as name@version"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "summary",
      "results",
      "attribution",
      "note"
     ],
     "properties": {
      "note": {
       "type": "string"
      },
      "results": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "top": {
          "type": "array"
         },
         "count": {
          "type": "integer"
         },
         "package": {
          "type": "object",
          "additionalProperties": true
         },
         "bySeverity": {
          "type": "object",
          "additionalProperties": true
         },
         "vulnerable": {
          "type": "boolean"
         },
         "fixedVersionsMentioned": {
          "type": "array"
         }
        },
        "additionalProperties": true
       }
      },
      "summary": {
       "type": "object",
       "properties": {
        "low": {
         "type": "integer"
        },
        "high": {
         "type": "integer"
        },
        "checked": {
         "type": "integer"
        },
        "critical": {
         "type": "integer"
        },
        "moderate": {
         "type": "integer"
        },
        "packages": {
         "type": "integer"
        },
        "advisories": {
         "type": "integer"
        },
        "vulnerable": {
         "type": "integer"
        }
       },
       "additionalProperties": true
      }
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/osv-dependency-batch-scan-b3a7083a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 1gateway.dev](https://www.zero.xyz/host/1gateway.dev/llms.txt)
