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

# NPM Registry Integration for AI Agents & Workflows

> Access the npm registry to search packages, get package information, versions, dependencies, and download statistics

{/* Self-hosted logo — build-time vendored from modulex.json / Iconify (see scripts/lib/logo.js). */}

<img src="https://mintcdn.com/modulexaillc/df8MOr-hXotYLTh5/logos/npm.svg?fit=max&auto=format&n=df8MOr-hXotYLTh5&q=85&s=1fd420fa458db3c1402faa9ea5365912" alt="NPM Registry logo" width="72" height="72" data-path="logos/npm.svg" />

## Overview

Add **NPM Registry** to any ModuleX agent or workflow. Read-only access to the public npm registry: package info, search, popular packages, version history, dependency graphs, and download statistics.

<Info>
  **Categories**: Developer Tools & Infrastructure · Coding · Package Management · Developer Tools · **Auth**: API Key · **Actions**: 6
</Info>

## Authentication

### API Key Authentication

Optional authentication for private npm registries. Leave empty for public npm registry access.

#### Required Credentials

| Field       | Description                                                  | Required | Format |
| ----------- | ------------------------------------------------------------ | -------- | ------ |
| NPM API Key | Your npm authentication token (optional for public registry) | No       | `-`    |

## Available Actions

<AccordionGroup>
  <Accordion title="get_package_info — Get detailed information about an npm package including name, version, description, author, homepage, repository, and dependencies">
    ### Parameters

    <ResponseField name="package_name" type="string" required>
      The name of the npm package to look up
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Version"
        },
        "description": {
          "default": "",
          "title": "Description",
          "type": "string"
        },
        "author": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Author"
        },
        "homepage": {
          "default": "",
          "title": "Homepage",
          "type": "string"
        },
        "repository": {
          "default": "",
          "title": "Repository",
          "type": "string"
        },
        "license": {
          "default": "",
          "title": "License",
          "type": "string"
        },
        "keywords": {
          "items": {
            "type": "string"
          },
          "title": "Keywords",
          "type": "array"
        },
        "dependencies": {
          "additionalProperties": {
            "type": "string"
          },
          "title": "Dependencies",
          "type": "object"
        },
        "devDependencies": {
          "additionalProperties": {
            "type": "string"
          },
          "title": "Devdependencies",
          "type": "object"
        },
        "peerDependencies": {
          "additionalProperties": {
            "type": "string"
          },
          "title": "Peerdependencies",
          "type": "object"
        }
      },
      "required": [
        "success"
      ],
      "title": "GetPackageInfoOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="search_packages — Search for npm packages by keyword or name">
    ### Parameters

    <ResponseField name="query" type="string" required>
      Search query text
    </ResponseField>

    <ResponseField name="size" type="integer">
      Number of results to return (1-250) (Default: `10`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "total": {
          "default": 0,
          "title": "Total",
          "type": "integer"
        },
        "packages": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "Packages",
          "type": "array"
        }
      },
      "required": [
        "success"
      ],
      "title": "SearchPackagesOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_popular_packages — Get a list of popular npm packages sorted by popularity score">
    ### Parameters

    <ResponseField name="size" type="integer">
      Number of popular packages to return (1-250) (Default: `10`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "packages": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "Packages",
          "type": "array"
        }
      },
      "required": [
        "success"
      ],
      "title": "GetPopularPackagesOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_package_versions — Get all available versions of an npm package with publication dates and dist-tags">
    ### Parameters

    <ResponseField name="package_name" type="string" required>
      The name of the npm package
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "dist_tags": {
          "additionalProperties": {
            "type": "string"
          },
          "title": "Dist Tags",
          "type": "object"
        },
        "versions": {
          "items": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "title": "Versions",
          "type": "array"
        },
        "total_versions": {
          "default": 0,
          "title": "Total Versions",
          "type": "integer"
        }
      },
      "required": [
        "success"
      ],
      "title": "GetPackageVersionsOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_package_dependencies — Get the dependencies, devDependencies, and peerDependencies of an npm package">
    ### Parameters

    <ResponseField name="package_name" type="string" required>
      The name of the npm package
    </ResponseField>

    <ResponseField name="version" type="string">
      Specific version (defaults to latest)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Version"
        },
        "dependencies": {
          "additionalProperties": {
            "type": "string"
          },
          "title": "Dependencies",
          "type": "object"
        },
        "devDependencies": {
          "additionalProperties": {
            "type": "string"
          },
          "title": "Devdependencies",
          "type": "object"
        },
        "peerDependencies": {
          "additionalProperties": {
            "type": "string"
          },
          "title": "Peerdependencies",
          "type": "object"
        },
        "optionalDependencies": {
          "additionalProperties": {
            "type": "string"
          },
          "title": "Optionaldependencies",
          "type": "object"
        }
      },
      "required": [
        "success"
      ],
      "title": "GetPackageDependenciesOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_package_download_stats — Get download statistics for an npm package including total and daily download counts">
    ### Parameters

    <ResponseField name="package_name" type="string" required>
      The name of the npm package
    </ResponseField>

    <ResponseField name="period" type="string">
      Time period for download statistics (Default: `last-week`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "package": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Package"
        },
        "period": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Period"
        },
        "start": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Start"
        },
        "end": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "End"
        },
        "total_downloads": {
          "default": 0,
          "title": "Total Downloads",
          "type": "integer"
        },
        "daily_downloads": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "Daily Downloads",
          "type": "array"
        }
      },
      "required": [
        "success"
      ],
      "title": "GetPackageDownloadStatsOutput",
      "type": "object"
    }
    ```
  </Accordion>
</AccordionGroup>

## Limits & Quotas

* npm's public registry has loose, unenforced limits — be reasonable.
  Two API hosts are involved: `registry.npmjs.org` (metadata) and
  `api.npmjs.org` (downloads).
* `period` must be one of `last-day`, `last-week`, `last-month`,
  `last-year` (validated client-side; otherwise `success=False`).
* Search `size` is clamped to \[1, 250].

## Related integrations

<CardGroup cols={3}>
  <Card title="Algolia" href="/integrations/tools/algolia" />

  <Card title="Amazon Web Services" href="/integrations/tools/aws" />

  <Card title="Apify" href="/integrations/tools/apify" />
</CardGroup>

## Links
