# deps.dev API

> Returns package versions, dependency graphs, advisories, source project scorecards and dependent counts from deps.dev.

Category: Developer & Tech. Region: global. 7 endpoints at `https://api.hoshime.com/v1/depsdev/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/depsdev
## GET /v1/depsdev/package

The versions of a package in one ecosystem, with the default and deprecated flags.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `system` | string | yes | Ecosystem: npm, pypi, cargo, go, maven or nuget. (one of npm, pypi, cargo, go, maven, nuget; e.g. npm) |
| `name` | string | yes | Package name, such as react. (e.g. react) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `name` (string), `system` (string), `versions` (VersionRef[]), `versions[].isDefault` (boolean), `versions[].isDeprecated` (boolean), `versions[].publishedAt` (string), `versions[].version` (string)

```bash
curl "https://api.hoshime.com/v1/depsdev/package?system=npm&name=react" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/depsdev/version

One version of a package: publish time, licenses, deprecation and known advisories.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `system` | string | yes | Ecosystem: npm, pypi, cargo, go, maven or nuget. (one of npm, pypi, cargo, go, maven, nuget; e.g. npm) |
| `name` | string | yes | Package name, such as react. (e.g. react) |
| `version` | string | yes | Version, such as 18.3.1. (e.g. 18.3.1) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `advisories` (string[]), `deprecatedReason` (string), `isDefault` (boolean), `isDeprecated` (boolean), `licenses` (string[]), `name` (string), `publishedAt` (string), `system` (string), `version` (string)

```bash
curl "https://api.hoshime.com/v1/depsdev/version?system=npm&name=react&version=18.3.1" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/depsdev/dependencies

The resolved dependency graph of one version, direct and indirect, without the version itself.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `system` | string | yes | Ecosystem: npm, pypi, cargo, go, maven or nuget. (one of npm, pypi, cargo, go, maven, nuget; e.g. npm) |
| `name` | string | yes | Package name, such as react. (e.g. react) |
| `version` | string | yes | Version, such as 18.3.1. (e.g. 18.3.1) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `items` (Dependency[]), `items[].bundled` (boolean), `items[].name` (string), `items[].relation` (string), `items[].system` (string), `items[].version` (string), `name` (string), `system` (string), `version` (string)

```bash
curl "https://api.hoshime.com/v1/depsdev/dependencies?system=npm&name=react&version=18.3.1" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/depsdev/project

A source repository that deps.dev tracks: stars, license, and its OpenSSF Scorecard.

Scope: `social:read` · Units: 1 · Cached: 360 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Repository id, such as github.com/expressjs/express. (e.g. github.com/expressjs/express) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `description` (string), `forks` (integer (int64)), `homepage` (string), `id` (string), `license` (string), `openIssues` (integer (int64)), `scorecard` (Scorecard | null), `scorecard.checks` (Check[]), `scorecard.overallScore` (number (double)), `scorecard.scoredAt` (string), `stars` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/depsdev/project?id=github.com%2Fexpressjs%2Fexpress" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/depsdev/advisory

One security advisory from deps.dev: its title, aliases and CVSS 3 score.

Scope: `social:read` · Units: 1 · Cached: 1440 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Advisory id, such as GHSA-rv95-896h-c2vc. (e.g. GHSA-rv95-896h-c2vc) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `aliases` (string[]), `cvss3Score` (number (double)), `cvss3Vector` (string), `id` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/depsdev/advisory?id=GHSA-rv95-896h-c2vc" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/depsdev/dependents

How many packages depend on one version: direct, indirect and in total.

Scope: `social:read` · Units: 1 · Cached: 360 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `system` | string | yes | Ecosystem: npm, pypi, cargo, go, maven or nuget. (one of npm, pypi, cargo, go, maven, nuget; e.g. npm) |
| `name` | string | yes | Package name, such as express. (e.g. express) |
| `version` | string | yes | Version, such as 4.19.2. (e.g. 4.19.2) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `direct` (integer (int64)), `indirect` (integer (int64)), `name` (string), `system` (string), `total` (integer (int64)), `version` (string)

```bash
curl "https://api.hoshime.com/v1/depsdev/dependents?system=npm&name=express&version=4.19.2" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/depsdev/purl

One version looked up by its package URL (purl), such as pkg:npm/express@4.19.2.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `purl` | string | yes | Package URL, such as pkg:npm/express@4.19.2. (e.g. pkg:npm/express@4.19.2) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `advisories` (string[]), `deprecatedReason` (string), `isDefault` (boolean), `isDeprecated` (boolean), `licenses` (string[]), `name` (string), `publishedAt` (string), `system` (string), `version` (string)

```bash
curl "https://api.hoshime.com/v1/depsdev/purl?purl=pkg%3Anpm%2Fexpress%404.19.2" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
