apyhub
Back
▣ VERIFICATION KIT · SAFETY KIT

Check Package Vulnerabilities API

What it does

The Package Vulnerability API returns OSV.dev advisories for a package. Send a package URL in purl, or use package with an optional version. You can also set ecosystem to limit the search to npm, PyPI, Go, Maven, crates.io, RubyGems, or NuGet. Use maxItems to cap the list, from 1 to 100, with 20 as the default.

The response gives you a JSON object with the row count and the advisories that matched. Each advisory can include its ID, link, CVEs, aliases, summary, dates, severity, references, fixed versions, and exploit signals such as EPSS and known exploited status.

Teams use the Package Vulnerability API to check risky dependencies during builds. They also use it in security dashboards and package review tools. It helps them spot fixes before they ship new code.

POST
Package Vulnerabilities - OSV.dev advisories
https://api.eu.apyhub.com/martin10291/check-package-vulnerabilities

QUICKSTART

GUIDE

Quickstart

Look up OSV vulnerabilities for a package name, package URL, and version.

curl -X POST "https://api.eu.apyhub.com/martin10291/check-package-vulnerabilities" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"package":"lodash","version":"4.17.15","ecosystem":"npm","maxItems":20}'

What you'll get back

Returns a JSON object with billed and count integers, plus an items array of vulnerability objects.

Each item may include fields such as id, url, cves, epss, aliases, summary, modified, severity, published, references, kevDateAdded, fixedVersions, epssPercentile, knownExploited, upgradeToFixAll, and upgradeVerified.

{
  "billed": 1,
  "count": 1,
  "items": [
    {
      "id": "OSV-2021-1234",
      "url": "https://osv.dev/vulnerability/OSV-2021-1234",
      "cves": ["CVE-2021-1234"],
      "severity": "HIGH"
    }
  ]
}
TRY ITLIVE · 100 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body
Or a package URL, e.g. pkg:npm/[email protected]
Package name, e.g. lodash
Version, e.g. 4.17.15 (empty = all known)

About this endpoint

What it does

Looks up OSV.dev vulnerability advisories for a package identified by package URL, package name, and/or version, with optional ecosystem filtering. It returns a JSON object containing billing and result metadata plus an array of matching advisory items.

Request Body

ParameterTypeMandatoryDescription
purlStringNoPackage URL, e.g. pkg:npm/[email protected].
packageStringNoPackage name, e.g. lodash.
versionStringNoVersion, e.g. 4.17.15 (empty = all known).
maxItemsIntegerNoMax results. Default: 20; minimum: 1; maximum: 100.
ecosystemStringNoEcosystem filter. Supported values: npm, PyPI, Go, Maven, crates.io, RubyGems, NuGet.

Response

Returns a JSON object with billed and count integer fields, plus an items array of advisory objects. Each item may include identifiers, URLs, CVEs, EPSS data, aliases, summary text, timestamps, severity, references, fixed versions, exploitability flags, and upgrade information.

ParameterTypeMandatoryDescription
billedIntegerNoUnits charged for this call: result rows only; not-found / unavailable / invalid rows are free.
countIntegerNoNumber of rows in items.
itemsObject ArrayNoArray of advisory objects. Each object may include: id, url, cves, epss, aliases, summary, modified, severity, published, references, kevDateAdded, fixedVersions, epssPercentile, knownExploited, upgradeToFixAll, upgradeVerified.

Notes

maxItems is capped at 100, and defaults to 20 when omitted.

▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.