deps.dev API

Overview

The deps.dev API provides access to Open Source Insights data. It can be used by tool builders, researchers, and tinkerers who want to answer questions like:

The API can be accessed in two ways: as JSON over HTTP, which is described on this page, as well as via gRPC. For more information about accessing the API via gRPC, please visit github.com/google/deps.dev.

Using the API

You can access the API using any HTTP client. To quickly get started, you can use the curl command-line tool.

The methods of the API accept parameters. Required parameters are passed as part of the request path, while optional parameters are passed as part of the query string.

All parameters must be encoded so that they can be safely included in a URL, by replacing special characters (e.g. /) with their percent-encoded forms (e.g. %2F). This can be done using functions such as encodeURIComponent in JavaScript, url.PathEscape and url.QueryEscape in Go, or the equivalent in your programming language of choice.

For example, to get information about the npm package @colors/colors:

curl 'https://api.deps.dev/v3alpha/systems/npm/packages/%40colors%2Fcolors'

Note that the @ and / in the package name have been percent-encoded.

Parameters representing data blobs, such as hash values, are passed as base64 strings.

For example, to use the Query API method to look up package versions by file content hash:

curl -G \
  --data-urlencode 'hash.type=SHA1' \
  --data-urlencode 'hash.value=ulXBPXrC/UTfnMgHRFVxmjPzdbk=' \
  'https://api.deps.dev/v3alpha/query'

Note that we use the --data-urlencode flag as a convenient way to construct a query string with percent-encoded values.

To compute a base64-encoded hash from a file’s contents suitable for use as a hash.value query parameter you can use the openssl and base64 commands:

openssl sha1 -binary <file> | base64

Package names

In general, the API refers to packages by the names used within their ecosystem, including details such as capitalization.

Exceptions:

Coverage

In general, the service collects all publicly-available data from each source (for example, it gathers all npm packages hosted by registry.npmjs.org).

Exceptions:

API reference

GetPackage

GET /v3alpha/systems/{packageKey.system}/packages/{packageKey.name}

GetPackage returns information about a package, including a list of its available versions, with the default version marked if known.

Example: /v3alpha/systems/npm/packages/%40colors%2Fcolors

Path parameters

packageKey.system: string

The package management system containing the package.

Can be one of GO, NPM, CARGO, MAVEN, PYPI, NUGET.

packageKey.name: string

The name of the package.

Response

packageKey: object

The name of the package. Note that it may differ from the name in the request, due to canonicalization.

packageKey.system: string

The package management system containing the package.

Can be one of GO, NPM, CARGO, MAVEN, PYPI, NUGET.

packageKey.name: string

The name of the package.

versions[]: object[]

The available versions of the package.

versions[].versionKey: object

The name of the version. Note that the package name may differ from the name in the request, due to canonicalization.

versions[].versionKey.system: string

The package management system containing the package.

Can be one of GO, NPM, CARGO, MAVEN, PYPI, NUGET.

versions[].versionKey.name: string

The name of the package.

versions[].versionKey.version: string

The version of the package.

versions[].publishedAt: string

The time when this package version was published, if available, as reported by the package management authority.

versions[].isDefault: boolean

If true, this is the default version of the package: the version that is installed when no version is specified. The precise meaning of this is system-specific, but it is commonly the version with the greatest version number, ignoring pre-release versions.

GetVersion

GET /v3alpha/systems/{versionKey.system}/packages/{versionKey.name}/versions/{versionKey.version}

GetVersion returns information about a specific package version, including its licenses and any security advisories known to affect it.

Example: /v3alpha/systems/npm/packages/%40colors%2Fcolors/versions/1.5.0

Path parameters

versionKey.system: string

The package management system containing the package.

Can be one of GO, NPM, CARGO, MAVEN, PYPI, NUGET.

versionKey.name: string

The name of the package.

versionKey.version: string

The version of the package.

Response

versionKey: object

The name of the package version. Note that the package and version name may differ from names specified in requests, if applicable, due to canonicalization.

versionKey.system: string

The package management system containing the package.

Can be one of GO, NPM, CARGO, MAVEN, PYPI, NUGET.

versionKey.name: string

The name of the package.

versionKey.version: string

The version of the package.

publishedAt: string

The time when this package version was published, if available, as reported by the package management authority.

isDefault: boolean

If true, this is the default version of the package: the version that is installed when no version is specified. The precise meaning of this is system-specific, but it is commonly the version with the greatest version number, ignoring pre-release versions.

licenses[]: string[]

The licenses governing the use of this package version.

We identify licenses as SPDX 2.1 expressions. When there is no associated SPDX identifier, we identify a license as “non-standard”. When we are unable to obtain license information, this field is empty. When more than one license is listed, their relationship is unspecified.

For Cargo, Maven, npm, and PyPI, license information is read from the package metadata. For Go, license information is determined using the licensecheck package.

License information is not intended to be legal advice, and you should independently verify the license or terms of any software for your own needs.

advisoryKeys[]: object[]

Security advisories known to affect this package version. Further information can be requested using the Advisory method.

advisoryKeys[].id: string

The OSV identifier for the security advisory.

links[]: object[]

Links declared by or derived from package version metadata, to external web resources such as a homepage or source code repository. Note that these links are not verified for correctness.

links[].label: string

A label describing the resource that the link points to.

links[].url: string

The URL of the link.

slsaProvenances[]: object[]

SLSA provenances for this version if they are available.

slsaProvenances[].sourceRepository: string

The source code repository used to build the version.

slsaProvenances[].commit: string

The commit of the source code repository the version was built from.

slsaProvenances[].url: string

The URL of the provenance statement if there is one.

slsaProvenances[].verified: boolean

The Sigstore bundle containing this attestation was verified using the sigstore-go library.

registries[]: string[]

URLs for the package management registries this package version is available from. Only set for systems that use a central repository for package distribution: Cargo, Maven, npm, NuGet, and PyPI.

relatedProjects[]: object[]

Projects that are related to this package version.

relatedProjects[].projectKey: object

The identifier for the project.

relatedProjects[].projectKey.id: string

A project identifier of the form github.com/user/repo, gitlab.com/user/repo, or bitbucket.org/user/repo.

relatedProjects[].relationProvenance: string

How the mapping between project and package version was discovered.

Can be one of SLSA_ATTESTATION, GO_ORIGIN, UNVERIFIED_METADATA.

relatedProjects[].relationType: string

What the relationship between the project and the package version is.

Can be one of SOURCE_REPO, ISSUE_TRACKER.

GetRequirements

GET /v3alpha/systems/{versionKey.system}/packages/{versionKey.name}/versions/{versionKey.version}:requirements

GetRequirements returns the requirements for a given version in a system-specific format. Requirements are currently available for Maven, npm and NuGet.

Requirements are the dependency constraints specified by the version.

Example: /v3alpha/systems/nuget/packages/castle.core/versions/5.1.1:requirements

Path parameters

versionKey.system: string

The package management system containing the package.

Can be one of GO, NPM, CARGO, MAVEN, PYPI, NUGET.

versionKey.name: string

The name of the package.

versionKey.version: string

The version of the package.

Response

nuget: object

The NuGet-specific representation of the version’s requirements.

Note that the term “dependency” is used here to mean “a single unresolved requirement” to be consistent with how the term is used in the NuGet ecosystem. This is different to how it is used elsewhere in the deps.dev API.

nuget.dependencyGroups[]: object[]

The requirements grouped by target framework.

nuget.dependencyGroups[].targetFramework: string

The target framework that this dependency group is for.

nuget.dependencyGroups[].dependencies[]: object[]

The requirements belonging to this dependency group.

nuget.dependencyGroups[].dependencies[].name: string

The name of the package.

nuget.dependencyGroups[].dependencies[].requirement: string

The requirement on the package.

npm: object

The npm-specific representation of the version’s requirements.

Note that the term “dependency” is used here to mean “a single unresolved requirement” to be consistent with how the term is used in the npm ecosystem. This is different to how it is used elsewhere in the deps.dev API.

npm.dependencies: object

The dependency-related fields declared in the requested package version’s package.json.

npm.dependencies.dependencies[]: object[]

The “dependencies” field of a package.json, represented as a list of name, requirement pairs.

npm.dependencies.dependencies[].name: string

The name of the package, the key in the original object.

npm.dependencies.dependencies[].requirement: string

The requirement, the corresponding value from the original object.

npm.dependencies.devDependencies[]: object[]

The “devDependencies” field of a package.json. The format is the same as “dependencies”.

npm.dependencies.devDependencies[].name: string

The name of the package, the key in the original object.

npm.dependencies.devDependencies[].requirement: string

The requirement, the corresponding value from the original object.

npm.dependencies.optionalDependencies[]: object[]

The “optionalDependencies” field of a package.json. The format is the same as “dependencies”.

npm.dependencies.optionalDependencies[].name: string

The name of the package, the key in the original object.

npm.dependencies.optionalDependencies[].requirement: string

The requirement, the corresponding value from the original object.

npm.dependencies.peerDependencies[]: object[]

The “peerDependencies” field of a package.json. The format is the same as “dependencies”.

npm.dependencies.peerDependencies[].name: string

The name of the package, the key in the original object.

npm.dependencies.peerDependencies[].requirement: string

The requirement, the corresponding value from the original object.

npm.dependencies.bundleDependencies[]: string[]

The “bundleDependencies” field of a package.json: a list of package names. In the package.json this may also just be the boolean value “true”, in which case this field will contain the names of all the dependencies from the “dependencies” field.

npm.bundled[]: object[]

Contents of any additional package.json files found inside the “node_modules” folder of the version’s tarball, including nested “node_modules”.

npm.bundled[].path: string

The path inside the tarball where this dependency was found.

npm.bundled[].name: string

The name of the bundled package, as declared inside the bundled package.json.

npm.bundled[].version: string

The version of this package, as declared inside the bundled package.json.

npm.bundled[].dependencies: object

The dependency-related fields from the bundled package.json.

npm.bundled[].dependencies.dependencies[]: object[]

The “dependencies” field of a package.json, represented as a list of name, requirement pairs.

npm.bundled[].dependencies.dependencies[].name: string

The name of the package, the key in the original object.

npm.bundled[].dependencies.dependencies[].requirement: string

The requirement, the corresponding value from the original object.

npm.bundled[].dependencies.devDependencies[]: object[]

The “devDependencies” field of a package.json. The format is the same as “dependencies”.

npm.bundled[].dependencies.devDependencies[].name: string

The name of the package, the key in the original object.

npm.bundled[].dependencies.devDependencies[].requirement: string

The requirement, the corresponding value from the original object.

npm.bundled[].dependencies.optionalDependencies[]: object[]

The “optionalDependencies” field of a package.json. The format is the same as “dependencies”.

npm.bundled[].dependencies.optionalDependencies[].name: string

The name of the package, the key in the original object.

npm.bundled[].dependencies.optionalDependencies[].requirement: string

The requirement, the corresponding value from the original object.

npm.bundled[].dependencies.peerDependencies[]: object[]

The “peerDependencies” field of a package.json. The format is the same as “dependencies”.

npm.bundled[].dependencies.peerDependencies[].name: string

The name of the package, the key in the original object.

npm.bundled[].dependencies.peerDependencies[].requirement: string

The requirement, the corresponding value from the original object.

npm.bundled[].dependencies.bundleDependencies[]: string[]

The “bundleDependencies” field of a package.json: a list of package names. In the package.json this may also just be the boolean value “true”, in which case this field will contain the names of all the dependencies from the “dependencies” field.

maven: object

The Maven-specific representation of the version’s requirements.

Note that the term “dependency” is used here to mean “a single unresolved requirement” to be consistent with how the term is used in the Maven ecosystem. This is different to how it is used elsewhere in the deps.dev API.

This data is as it is declared in a version POM file. The data in parent POMs are not merged. Any string field may contain references to properties, and the properties are not interpolated.

maven.parent: object

The direct parent of a package version.

maven.parent.system: string

The package management system containing the package.

Can be one of GO, NPM, CARGO, MAVEN, PYPI, NUGET.

maven.parent.name: string

The name of the package.

maven.parent.version: string

The version of the package.

maven.dependencies[]: object[]

The list of dependencies.

maven.dependencies[].name: string

The name of the package.

maven.dependencies[].version: string

The version requirement of the dependency.

maven.dependencies[].classifier: string

The classifier of the dependency, which distinguishes artifacts that differ in content.

maven.dependencies[].type: string

The type of the dependency, defaults to jar.

maven.dependencies[].scope: string

The scope of the dependency, specifies how to limit the transitivity of a dependency.

maven.dependencies[].optional: string

Whether the dependency is optional or not.

maven.dependencies[].exclusions[]: string[]

The dependencies to be excluded, in the form of a list of package names. Exclusions may contain wildcards in both groupID and artifactID.

maven.dependencyManagement[]: object[]

The list of dependency management. The format is the same as dependencies.

maven.dependencyManagement[].name: string

The name of the package.

maven.dependencyManagement[].version: string

The version requirement of the dependency.

maven.dependencyManagement[].classifier: string

The classifier of the dependency, which distinguishes artifacts that differ in content.

maven.dependencyManagement[].type: string

The type of the dependency, defaults to jar.

maven.dependencyManagement[].scope: string

The scope of the dependency, specifies how to limit the transitivity of a dependency.

maven.dependencyManagement[].optional: string

Whether the dependency is optional or not.

maven.dependencyManagement[].exclusions[]: string[]

The dependencies to be excluded, in the form of a list of package names. Exclusions may contain wildcards in both groupID and artifactID.

maven.properties[]: object[]

The list of properties, used to resolve placeholders.

maven.properties[].name: string

The name of the property.

maven.properties[].value: string

The value of the property.

maven.repositories[]: object[]

The list of repositories.

maven.repositories[].id: string

The ID of the repository.

maven.repositories[].url: string

The URL of the repository.

maven.repositories[].layout: string

Whether the description of the repository follows a common layout.

maven.repositories[].releasesEnabled: string

Whether the repository is enabled for release downloads.

maven.repositories[].snapshotsEnabled: string

Whether the repository is enabled for snapshot downloads.

maven.profiles[]: object[]

The list of profiles.

maven.profiles[].id: string

The ID of the profile.

maven.profiles[].activation: object

The activation requirement of the profile.

maven.profiles[].activation.activeByDefault: string

Whether the profile is active by default.

maven.profiles[].activation.jdk: object

The JDK requirement of the activation.

maven.profiles[].activation.jdk.jdk: string

The JDK requirement to activate the profile.

maven.profiles[].activation.os: object

The operating system requirement of the activation.

maven.profiles[].activation.os.name: string

The name of the operating system.

maven.profiles[].activation.os.family: string

The family of the operating system.

maven.profiles[].activation.os.arch: string

The CPU architecture of the operating system,

maven.profiles[].activation.os.version: string

The version of the operating system.

maven.profiles[].activation.property: object

The property requirement of the activation.

maven.profiles[].activation.property.property: object

The property requirement to activate the profile. This can be a system property or CLI user property.

maven.profiles[].activation.property.property.name: string

The name of the property.

maven.profiles[].activation.property.property.value: string

The value of the property.

maven.profiles[].activation.file: object

The file requirement of the activation.

maven.profiles[].activation.file.exists: string

The name of the file that its existence activates the profile.

maven.profiles[].activation.file.missing: string

The name of the file, activate the profile if the file is missing.

maven.profiles[].dependencies[]: object[]

The dependencies specified in the profile.

maven.profiles[].dependencies[].name: string

The name of the package.

maven.profiles[].dependencies[].version: string

The version requirement of the dependency.

maven.profiles[].dependencies[].classifier: string

The classifier of the dependency, which distinguishes artifacts that differ in content.

maven.profiles[].dependencies[].type: string

The type of the dependency, defaults to jar.

maven.profiles[].dependencies[].scope: string

The scope of the dependency, specifies how to limit the transitivity of a dependency.

maven.profiles[].dependencies[].optional: string

Whether the dependency is optional or not.

maven.profiles[].dependencies[].exclusions[]: string[]

The dependencies to be excluded, in the form of a list of package names. Exclusions may contain wildcards in both groupID and artifactID.

maven.profiles[].dependencyManagement[]: object[]

The dependency management specified in the profile.

maven.profiles[].dependencyManagement[].name: string

The name of the package.

maven.profiles[].dependencyManagement[].version: string

The version requirement of the dependency.

maven.profiles[].dependencyManagement[].classifier: string

The classifier of the dependency, which distinguishes artifacts that differ in content.

maven.profiles[].dependencyManagement[].type: string

The type of the dependency, defaults to jar.

maven.profiles[].dependencyManagement[].scope: string

The scope of the dependency, specifies how to limit the transitivity of a dependency.

maven.profiles[].dependencyManagement[].optional: string

Whether the dependency is optional or not.

maven.profiles[].dependencyManagement[].exclusions[]: string[]

The dependencies to be excluded, in the form of a list of package names. Exclusions may contain wildcards in both groupID and artifactID.

maven.profiles[].properties[]: object[]

The properties specified in the profile.

maven.profiles[].properties[].name: string

The name of the property.

maven.profiles[].properties[].value: string

The value of the property.

maven.profiles[].repositories[]: object[]

The repositories specified in the profile.

maven.profiles[].repositories[].id: string

The ID of the repository.

maven.profiles[].repositories[].url: string

The URL of the repository.

maven.profiles[].repositories[].layout: string

Whether the description of the repository follows a common layout.

maven.profiles[].repositories[].releasesEnabled: string

Whether the repository is enabled for release downloads.

maven.profiles[].repositories[].snapshotsEnabled: string

Whether the repository is enabled for snapshot downloads.

GetDependencies

GET /v3alpha/systems/{versionKey.system}/packages/{versionKey.name}/versions/{versionKey.version}:dependencies

GetDependencies returns a resolved dependency graph for the given package version. Dependencies are currently available for Go, npm, Cargo, Maven and PyPI.

Dependencies are the resolution of the requirements (dependency constraints) specified by a version.

The dependency graph should be similar to one produced by installing the package version on a generic 64-bit Linux system, with no other dependencies present. The precise meaning of this varies from system to system.

Example: /v3alpha/systems/npm/packages/react/versions/18.2.0:dependencies

Path parameters

versionKey.system: string

The package management system containing the package.

Can be one of GO, NPM, CARGO, MAVEN, PYPI, NUGET.

versionKey.name: string

The name of the package.

versionKey.version: string

The version of the package.

Response

nodes[]: object[]

The nodes of the dependency graph. The first node is the root of the graph.

nodes[].versionKey: object

The package version represented by this node. Note that the package and version name may differ from the names in the request, if provided, due to canonicalization.

For some systems, a graph may contain multiple nodes for the same package version.

nodes[].versionKey.system: string

The package management system containing the package.

Can be one of GO, NPM, CARGO, MAVEN, PYPI, NUGET.

nodes[].versionKey.name: string

The name of the package.

nodes[].versionKey.version: string

The version of the package.

nodes[].bundled: boolean

If true, this is a bundled dependency. For bundled dependencies, the package name in the version key encodes how the dependency is bundled.

As an example, a bundled dependency with a name like “a>1.2.3>b>c” is part of the dependency graph of package “a” at version “1.2.3”, and has the local name “c”. It may or may not be the same as a package with the global name “c”.

nodes[].relation: string

Whether this node represents a direct or indirect dependency within this dependency graph. Note that it’s possible for a dependency to be both direct and indirect; if so, it is marked as direct.

Can be one of SELF, DIRECT, INDIRECT.

nodes[].errors[]: string[]

Errors associated with this node of the graph, such as an unresolved dependency requirement. An error on a node may imply the graph as a whole is incorrect. These error messages have no defined format and are intended for human consumption.

edges[]: object[]

The edges of the dependency graph.

edges[].fromNode: number

The node declaring the dependency, specified as an index into the list of nodes.

edges[].toNode: number

The node resolving the dependency, specified as an index into the list of nodes.

edges[].requirement: string

The requirement resolved by this edge, as declared by the “from” node. The meaning of this field is system-specific. As an example, in npm, the requirement “^1.0.0” may be resolved by the version “1.2.3”.

error: string

Any error associated with the dependency graph that is not specific to a node. An error here may imply the graph as a whole is incorrect. This error message has no defined format and is intended for human consumption.

GetProject

GET /v3alpha/projects/{projectKey.id}

GetProject returns information about projects hosted by GitHub, GitLab, or BitBucket, when known to us.

Example: /v3alpha/projects/github.com%2Ffacebook%2Freact

Path parameters

projectKey.id: string

A project identifier of the form github.com/user/repo, gitlab.com/user/repo, or bitbucket.org/user/repo.

Response

projectKey: object

The identifier for the project. Note that this may differ from the identifier in the request, due to canonicalization.

projectKey.id: string

A project identifier of the form github.com/user/repo, gitlab.com/user/repo, or bitbucket.org/user/repo.

openIssuesCount: string

The number of open issues reported by the project host. Only available for GitHub and GitLab.

starsCount: string

The number of stars reported by the project host. Only available for GitHub and GitLab.

forksCount: string

The number of forks reported by the project host. Only available for GitHub and GitLab.

license: string

The license reported by the project host.

description: string

The description reported by the project host.

homepage: string

The homepage reported by the project host.

scorecard: object

An OpenSSF Scorecard for the project, if one is available.

scorecard.date: string

The date at which the scorecard was produced. The time portion of this field is midnight UTC.

scorecard.repository: object

The source code repository and commit the scorecard was produced from.

scorecard.repository.name: string

The source code repository the scorecard was produced from.

scorecard.repository.commit: string

The source code commit the scorecard was produced from.

scorecard.scorecard: object

The version and commit of the Scorecard program used to produce the scorecard.

scorecard.scorecard.version: string

The version of the Scorecard program used to produce the scorecard.

scorecard.scorecard.commit: string

The commit of the Scorecard program used to produce the scorecard.

scorecard.checks[]: object[]

The results of the Scorecard Checks performed on the project.

scorecard.checks[].name: string

The name of the check.

scorecard.checks[].documentation: object

Human-readable documentation for the check.

scorecard.checks[].documentation.shortDescription: string

A short description of the check.

scorecard.checks[].documentation.url: string

A link to more details about the check.

scorecard.checks[].score: string

A score in the range [0,10]. A higher score is better. A negative score indicates that the check did not run successfully.

scorecard.checks[].reason: string

The reason for the score.

scorecard.checks[].details[]: string[]

Further details regarding the check.

scorecard.overallScore: number

A weighted average score in the range [0,10]. A higher score is better.

scorecard.metadata[]: string[]

Additional metadata associated with the scorecard.

ossFuzz: object

Details of this project’s testing by the OSS-Fuzz service. Only set if the project is tested by OSS-Fuzz.

ossFuzz.lineCount: string

The number of lines of code in the project.

ossFuzz.lineCoverCount: string

How many lines of code are covered by fuzzing.

ossFuzz.date: string

The date the fuzz test that produced the coverage information was run against this project. The time portion of this field is midnight UTC.

ossFuzz.configUrl: string

The URL containing the configuration for the project in the OSS-Fuzz repository.

GetProjectPackageVersions

GET /v3alpha/projects/{projectKey.id}:packageversions

GetProjectPackageVersions returns known mappings between the requested project and package versions. At most 1500 package versions are returned. Mappings which were derived from a SLSA provenance attestation attestation are served first.

Path parameters

projectKey.id: string

A project identifier of the form github.com/user/repo, gitlab.com/user/repo, or bitbucket.org/user/repo.

Response

versions[]: object[]

The versions that were built from the source code contained in this project.

versions[].versionKey: object

The identifier for the version.

versions[].versionKey.system: string

The package management system containing the package.

Can be one of GO, NPM, CARGO, MAVEN, PYPI, NUGET.

versions[].versionKey.name: string

The name of the package.

versions[].versionKey.version: string

The version of the package.

versions[].slsaProvenances[]: object[]

The SLSA provenance statements that link the version to the project.

versions[].slsaProvenances[].sourceRepository: string

The source code repository used to build the version.

versions[].slsaProvenances[].commit: string

The commit of the source code repository the version was built from.

versions[].slsaProvenances[].url: string

The URL of the provenance statement if there is one.

versions[].slsaProvenances[].verified: boolean

The Sigstore bundle containing this attestation was verified using the sigstore-go library.

versions[].relationType: string

What the relationship between the project and the package version is.

Can be one of SOURCE_REPO, ISSUE_TRACKER.

versions[].relationProvenance: string

How the mapping between project and package version was discovered.

Can be one of SLSA_ATTESTATION, GO_ORIGIN, UNVERIFIED_METADATA.

GetAdvisory

GET /v3alpha/advisories/{advisoryKey.id}

GetAdvisory returns information about security advisories hosted by OSV.

Example: /v3alpha/advisories/GHSA-2qrg-x229-3v8q

Path parameters

advisoryKey.id: string

The OSV identifier for the security advisory.

Response

advisoryKey: object

The identifier for the security advisory. Note that this may differ from the identifier in the request, due to canonicalization.

advisoryKey.id: string

The OSV identifier for the security advisory.

url: string

The URL of the security advisory.

title: string

A brief human-readable description.

aliases[]: string[]

Other identifiers used for the advisory, including CVEs.

cvss3Score: number

The severity of the advisory as a CVSS v3 score in the range [0,10]. A higher score represents greater severity.

cvss3Vector: string

The severity of the advisory as a CVSS v3 vector string.

Query

GET /v3alpha/query

Query returns information about multiple package versions, which can be specified by name, content hash, or both.

Querying by content hash is currently supported for npm, Cargo, Maven, and NuGet. It is typical for hash queries to return many results; hashes are matched against multiple release artifacts (such as JAR files) that comprise package versions, and any given artifact may appear in many package versions.

Examples:

Query parameters

hash.type: string

The function used to produce this hash.

Can be one of MD5, SHA1, SHA256, SHA512.

hash.value: string

A hash value.

versionKey.system: string

The package management system containing the package.

Can be one of GO, NPM, CARGO, MAVEN, PYPI, NUGET.

versionKey.name: string

The name of the package.

versionKey.version: string

The version of the package.

Response

versions[]: object[]

Package versions matching the query. At most 1000 versions are returned.

versions[].versionKey: object

The name of the package version. Note that the package and version name may differ from names specified in requests, if applicable, due to canonicalization.

versions[].versionKey.system: string

The package management system containing the package.

Can be one of GO, NPM, CARGO, MAVEN, PYPI, NUGET.

versions[].versionKey.name: string

The name of the package.

versions[].versionKey.version: string

The version of the package.

versions[].publishedAt: string

The time when this package version was published, if available, as reported by the package management authority.

versions[].isDefault: boolean

If true, this is the default version of the package: the version that is installed when no version is specified. The precise meaning of this is system-specific, but it is commonly the version with the greatest version number, ignoring pre-release versions.

versions[].licenses[]: string[]

The licenses governing the use of this package version.

We identify licenses as SPDX 2.1 expressions. When there is no associated SPDX identifier, we identify a license as “non-standard”. When we are unable to obtain license information, this field is empty. When more than one license is listed, their relationship is unspecified.

For Cargo, Maven, npm, and PyPI, license information is read from the package metadata. For Go, license information is determined using the licensecheck package.

License information is not intended to be legal advice, and you should independently verify the license or terms of any software for your own needs.

versions[].advisoryKeys[]: object[]

Security advisories known to affect this package version. Further information can be requested using the Advisory method.

versions[].advisoryKeys[].id: string

The OSV identifier for the security advisory.

versions[].links[]: object[]

Links declared by or derived from package version metadata, to external web resources such as a homepage or source code repository. Note that these links are not verified for correctness.

versions[].links[].label: string

A label describing the resource that the link points to.

versions[].links[].url: string

The URL of the link.

versions[].slsaProvenances[]: object[]

SLSA provenances for this version if they are available.

versions[].slsaProvenances[].sourceRepository: string

The source code repository used to build the version.

versions[].slsaProvenances[].commit: string

The commit of the source code repository the version was built from.

versions[].slsaProvenances[].url: string

The URL of the provenance statement if there is one.

versions[].slsaProvenances[].verified: boolean

The Sigstore bundle containing this attestation was verified using the sigstore-go library.

versions[].registries[]: string[]

URLs for the package management registries this package version is available from. Only set for systems that use a central repository for package distribution: Cargo, Maven, npm, NuGet, and PyPI.

versions[].relatedProjects[]: object[]

Projects that are related to this package version.

versions[].relatedProjects[].projectKey: object

The identifier for the project.

versions[].relatedProjects[].projectKey.id: string

A project identifier of the form github.com/user/repo, gitlab.com/user/repo, or bitbucket.org/user/repo.

versions[].relatedProjects[].relationProvenance: string

How the mapping between project and package version was discovered.

Can be one of SLSA_ATTESTATION, GO_ORIGIN, UNVERIFIED_METADATA.

versions[].relatedProjects[].relationType: string

What the relationship between the project and the package version is.

Can be one of SOURCE_REPO, ISSUE_TRACKER.

Data

deps.dev aggregates data from a number of sources:

For details on using the data from these sources, please consult their documentation.

As well as aggregating data, deps.dev generates additional data, including resolved dependencies, advisory statistics, associations between entities, etc. This generated data is available under a CC-BY 4.0 license.

Terms

Use of the deps.dev API is subject to the Google API Terms of Service.

Clients are expressly permitted to cache data served by the API.

Contact us

If you have questions about the API, or want to report a problem, please create an issue or contact us at depsdev@google.com.