npm

npm Downloads API

Package tarball downloads.

Operations 1

GET /{package}/-/{tarball} Download a package tarball #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/npm-downloads-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

npm-downloads-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: npm Hooks Downloads API
  description: The npm Hooks API allows developers to subscribe to notifications about changes in the npm registry.
  version: 1.0.0
  contact:
    name: npm Support
    url: https://www.npmjs.com/support
  termsOfService: https://docs.npmjs.com/policies/terms
servers:
- url: https://registry.npmjs.org
  description: npm Public Registry
security:
- bearerAuth: []
tags:
- name: Downloads
  description: Package tarball downloads.
paths:
  /{package}/-/{tarball}:
    get:
      operationId: downloadPackageTarball
      summary: Download a package tarball
      description: Downloads the tarball archive for a specific version of a package. The tarball filename is typically in the format {package}-{version}.tgz. This endpoint is used by the npm CLI during package installation.
      tags:
      - Downloads
      parameters:
      - $ref: '#/components/parameters/packageName'
      - name: tarball
        in: path
        description: The tarball filename, typically in the format {package}-{version}.tgz.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Tarball file returned successfully.
          content:
            application/gzip:
              schema:
                type: string
                format: binary
        '404':
          description: Tarball not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      description: An error response from the registry.
      properties:
        error:
          type: string
          description: The error type or code.
        reason:
          type: string
          description: A human-readable explanation of the error.
  parameters:
    packageName:
      name: package
      in: path
      description: The name of the package. For scoped packages, use URL encoding (e.g., @scope%2Fpackage).
      required: true
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: npm access token provided as a Bearer token.
externalDocs:
  description: npm Hooks Documentation
  url: https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm