> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# npm registry

> Public npm registry: package metadata, single versions, full-text package search, and daily download counts.

![](https://mintcdn.com/webrouter/JBFYvcRI1PVnd4YX/logo/data-apis/npm.webp?fit=max\&auto=format\&n=JBFYvcRI1PVnd4YX\&q=85\&s=04748f6ba43197208ebab439dd2876d2)

[Web Catalog · Developer](https://docs.webrouter.net/data-apis.md?category=developer)

No key needed

Endpoints

5

Auth

None

[Vendor docs](https://github.com/npm/registry/blob/main/docs/REGISTRY-API.md) · Serves `npmjs.com`

## Notes

* Keyless for public packages.
* Download counts start on 2015-01-10. A bulk (comma-separated) query takes up to 128 unscoped packages and at most 365 days; other queries span at most 18 months.

## Endpoints

GET

Search packages

Packages matching a text query, with ranking scores.

[Open](#npm-packages-search)

GET

Get a package

The package document: every version, dist-tags, maintainers, times and readme.

[Open](#npm-packages-get)

GET

Get one package version

The manifest of one version (dependencies, dist tarball, integrity).

[Open](#npm-packages-version)

GET

Get total downloads for a period

Total downloads of one package (or comma-separated packages) over a period.

[Open](#npm-downloads-point)

GET

Get daily downloads for a period

Downloads per day of one package (or comma-separated packages) over a period.

[Open](#npm-downloads-range)

### Search packages

GET

`/-/v1/search`

`npm.packages.search`

Packages matching a text query, with ranking scores.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`text`</td><td>string</td><td>query</td><td>Full-text query; supports qualifiers author:, maintainer:, scope:, keywords:, not:unstable, not:insecure, is:unstable, is:insecure, boost-exact:false. Example `http client`</td></tr>

    <tr>
      <td>
        `size`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Results to return, default 20, max 250.
      </td>
    </tr>

    <tr>
      <td>
        `from`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Offset of the first result.
      </td>
    </tr>

    <tr>
      <td>
        `quality`
      </td>

      <td>
        number
      </td>

      <td>
        query
      </td>

      <td>
        Weight of quality in ranking, 0 to 1.
      </td>
    </tr>

    <tr>
      <td>
        `popularity`
      </td>

      <td>
        number
      </td>

      <td>
        query
      </td>

      <td>
        Weight of popularity in ranking, 0 to 1.
      </td>
    </tr>

    <tr>
      <td>
        `maintenance`
      </td>

      <td>
        number
      </td>

      <td>
        query
      </td>

      <td>
        Weight of maintenance in ranking, 0 to 1.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://github.com/npm/registry/blob/main/docs/REGISTRY-API.md) · Same job: [crates.io](https://docs.webrouter.net/data-apis/crates-io.md#crates-io-crates-search), [Libraries.io](https://docs.webrouter.net/data-apis/libraries-io.md#libraries-io-projects-search), [RubyGems.org](https://docs.webrouter.net/data-apis/rubygems.md#rubygems-gems-search)

```python Python theme={null}
router.call_data_api("npm.packages.search", {'text': 'http client'})
```

```text MCP theme={null}
call_data_api(endpoint="npm.packages.search", params={"text": "http client"})
```

> [!NOTE]
>
> * The three weights are normalised into a unit vector.

### Get a package

GET

`/{package}`

`npm.packages.get`

The package document: every version, dist-tags, maintainers, times and readme.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`package` required</td><td>string</td><td>path</td><td>Package name. Example `react`</td></tr>
  </tbody>
</table>

[Vendor docs](https://github.com/npm/registry/blob/main/docs/REGISTRY-API.md) · Same job: [crates.io](https://docs.webrouter.net/data-apis/crates-io.md#crates-io-crates-get), [Docker Hub](https://docs.webrouter.net/data-apis/docker-hub.md#docker-hub-repositories-get), [Libraries.io](https://docs.webrouter.net/data-apis/libraries-io.md#libraries-io-projects-get), [PyPI](https://docs.webrouter.net/data-apis/pypi.md#pypi-project-get), [RubyGems.org](https://docs.webrouter.net/data-apis/rubygems.md#rubygems-gems-get)

```python Python theme={null}
router.call_data_api("npm.packages.get", {'package': 'react'})
```

```text MCP theme={null}
call_data_api(endpoint="npm.packages.get", params={"package": "react"})
```

### Get one package version

GET

`/{package}/{version}`

`npm.packages.version`

The manifest of one version (dependencies, dist tarball, integrity).

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`package` required</td><td>string</td><td>path</td><td>Package name. Example `react`</td></tr>
    <tr><td>`version` required</td><td>string</td><td>path</td><td>Exact version, or latest. Example `latest`</td></tr>
  </tbody>
</table>

[Vendor docs](https://github.com/npm/registry/blob/main/docs/REGISTRY-API.md) · Same job: [crates.io](https://docs.webrouter.net/data-apis/crates-io.md#crates-io-crates-get), [Docker Hub](https://docs.webrouter.net/data-apis/docker-hub.md#docker-hub-repositories-get), [Libraries.io](https://docs.webrouter.net/data-apis/libraries-io.md#libraries-io-projects-get), [PyPI](https://docs.webrouter.net/data-apis/pypi.md#pypi-project-get), [RubyGems.org](https://docs.webrouter.net/data-apis/rubygems.md#rubygems-gems-get)

```python Python theme={null}
router.call_data_api("npm.packages.version", {'package': 'react', 'version': 'latest'})
```

```text MCP theme={null}
call_data_api(endpoint="npm.packages.version", params={"package": "react", "version": "latest"})
```

### Get total downloads for a period

GET

`/downloads/point/{period}/{package}`

`npm.downloads.point`

Total downloads of one package (or comma-separated packages) over a period.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`period` required</td><td>string</td><td>path</td><td>last-day, last-week, last-month, last-year, a date (2023-02-01) or a range start:end (2023-02-01:2023-02-08). Example `last-week`</td></tr>
    <tr><td>`package` required</td><td>string</td><td>path</td><td>Package name, or up to 128 comma-separated unscoped names. Example `react`</td></tr>
  </tbody>
</table>

[Vendor docs](https://github.com/npm/registry/blob/main/docs/download-counts.md) · Same job: [crates.io](https://docs.webrouter.net/data-apis/crates-io.md#crates-io-crates-downloads), [RubyGems.org](https://docs.webrouter.net/data-apis/rubygems.md#rubygems-downloads-version)

```python Python theme={null}
router.call_data_api("npm.downloads.point", {'period': 'last-week', 'package': 'react'})
```

```text MCP theme={null}
call_data_api(endpoint="npm.downloads.point", params={"period": "last-week", "package": "react"})
```

### Get daily downloads for a period

GET

`/downloads/range/{period}/{package}`

`npm.downloads.range`

Downloads per day of one package (or comma-separated packages) over a period.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`period` required</td><td>string</td><td>path</td><td>last-day, last-week, last-month, last-year, a date or a range start:end. Example `last-month`</td></tr>
    <tr><td>`package` required</td><td>string</td><td>path</td><td>Package name, or up to 128 comma-separated unscoped names. Example `react`</td></tr>
  </tbody>
</table>

[Vendor docs](https://github.com/npm/registry/blob/main/docs/download-counts.md) · Same job: [crates.io](https://docs.webrouter.net/data-apis/crates-io.md#crates-io-crates-downloads), [RubyGems.org](https://docs.webrouter.net/data-apis/rubygems.md#rubygems-downloads-version)

```python Python theme={null}
router.call_data_api("npm.downloads.range", {'period': 'last-month', 'package': 'react'})
```

```text MCP theme={null}
call_data_api(endpoint="npm.downloads.range", params={"period": "last-month", "package": "react"})
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.