npm

npm Search API

Full-text search across the npm registry with weighted scoring.

Operations 1

GET /-/v1/search Search for packages on the registry #

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:npm-search-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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-search-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Npm Search API
  version: 1.0.0
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  x-logo:
    url: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAACyCAYAAAC0oD1PAAAAAXNSR0IArs4c6QAAAJZlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgExAAIAAAARAAAAWodpAAQAAAABAAAAbAAAAAAAAABIAAAAAQAAAEgAAAABQWRvYmUgSW1hZ2VSZWFkeQAAAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAfSgAwAEAAAAAQAAALIAAAAA7l/aDAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAi1pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9Ilh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BAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECByYwP8ABJX2MCfo+K4AAAAASUVORK5CYII=

      '
    altText: npm logo
  x-refined-note:
  - x-source differs across the merged source definitions and was not carried
  description: 'Operations tagged Search across 2 of this provider''s published API definitions: npm-registry-reference-openapi.json, npm-registry-reference-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://registry.npmjs.org
tags:
- name: Search
paths:
  /-/v1/search:
    get:
      parameters:
      - name: text
        in: query
        required: true
        schema:
          type: string
        description: The search query text
      - name: size
        in: query
        schema:
          type: number
        description: The number of search results to return
      - name: from
        in: query
        schema:
          type: number
        description: The starting index of the search results
      tags:
      - Search
      summary: Search for packages on the registry
      operationId: getsearch
      security: []
      responses:
        '200':
          $ref: '#/components/responses/SearchResults'
        '400':
          $ref: '#/components/responses/MissingField'
    servers:
    - url: https://registry.npmjs.org
components:
  responses:
    SearchResults:
      description: Search results
      content:
        application/json:
          schema:
            type: object
            properties:
              objects:
                type: array
                items:
                  type: object
                  properties:
                    downloads:
                      type: object
                      properties:
                        monthly:
                          type: number
                          description: Download count for this package in the last month
                        weekly:
                          type: number
                          description: Download count for this package in the last week
                    dependents:
                      type: number
                      description: The number of packages that list this package as a dependency
                    updated:
                      type: string
                      format: date-time
                      description: When the package was last updated
                    searchScore:
                      type: number
                      description: Search score of this result, same as score.final
                    package:
                      type: object
                      properties:
                        name:
                          type: string
                          description: The name of the package
                        keywords:
                          type: array
                          items:
                            type: string
                            description: A keyword associated with this package
                        version:
                          type: string
                          description: The latest version of this package.
                        description:
                          type: string
                          description: The description of this package from its package.json
                        sanitized_name:
                          type: string
                          description: The name of the package with some characters changed to help with indexing
                        publisher:
                          type: object
                          properties:
                            username:
                              type: string
                            email:
                              type: string
                          description: Information about the user that published the latest version of this package
                        maintainers:
                          type: array
                          items:
                            type: object
                            properties:
                              username:
                                type: string
                              email:
                                type: string
                          description: Information about the users who own this package
                        license:
                          type: string
                          description: SPDX license for this package
                        date:
                          type: string
                          format: date-time
                          description: Timestamp of when the latest version of this package was published
                        links:
                          type: object
                          properties:
                            homepage:
                              type: string
                              description: The main homepage for this package
                            repository:
                              type: string
                              description: The repository for this package's source code
                            bugs:
                              type: string
                              description: Where to report bugs for this package
                            npm:
                              type: string
                              description: This package's main page on the npm website
                    score:
                      type: object
                      properties:
                        final:
                          type: number
                          description: Search score of this result, same as searchScore
                        detail:
                          type: object
                          description: Legacy "pqm" values of this result.  These are hard coded and left in for legacy purposes, all set to "1"
                    flags:
                      type: object
                      properties:
                        insecure:
                          type: number
                          description: Legacy attribute. Always set to 0.
              total:
                type: number
                description: The total number of items in the search results
              time:
                type: string
                format: date-time
                description: The current time
          example:
            objects:
            - downloads:
                monthly: 412841
                weekly: 93602
              dependents: 20
              updated: '2026-03-24T07:35:20.725Z'
              searchScore: 1538.6487
              package:
                name: '@npm/types'
                keywords:
                - npm registry
                - types
                - typescript
                - definitions
                - typings
                version: 2.1.0
                description: Typescript definitions for npm registry content
                sanitized_name: '@npm/types'
                publisher:
                  email: npm-robot@github.com
                  username: npm-robot
                maintainers:
                - email: npm@npmjs.com
                  username: npm
                - email: ops@npmjs.com
                  username: npmci
                license: MIT
                date: '2025-04-28T20:18:14.734Z'
                links:
                  homepage: https://github.com/npm/types#readme
                  repository: git+https://github.com/npm/types.git
                  bugs: https://github.com/npm/types/issues
                  npm: https://www.npmjs.com/package/@npm/types
              score:
                final: 1538.6487
                detail:
                  popularity: 1
                  quality: 1
                  maintenance: 1
              flags:
                insecure: 0
            total: 1
            time: '2026-03-24T07:35:20.725Z'
    MissingField:
      description: A required parameter was missing
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                description: Message explaining what was missing from the request
              code:
                type: string
                description: Error code for this response
          example:
            error: '''text'' query parameter is required'
            code: ERR_TEXT_MISSING
  securitySchemes:
    oidcIdToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'OIDC id_token from a supported Identity Provider (IdP) such as GitHub Actions, GitLab CI, or CircleCI.

        The `aud` (audience) claim must be set to `npm:registry.npmjs.org`.


        **Supported Identity Providers:**

        - GitHub Actions

        - GitLab CI

        - CircleCI

        '
    npmSessionToken:
      type: http
      scheme: bearer
      description: 'Traditional npm session token created via `npm login`.

        These tokens are tied to a user account and inherit the user''s permissions.

        '
    npmAccessToken:
      type: http
      scheme: bearer
      description: 'Granular Access Token (GAT) with fine-grained permissions.

        These tokens can be scoped to specific packages and operations.


        GATs created with `bypass_2fa: true` cannot perform account,

        token, or org/team/package governance write operations — those

        requests are rejected with `403 Forbidden`. See the Authentication

        section above for the full list.

        '
    granularAccessToken:
      type: http
      scheme: bearer
      description: 'Granular Access Token (GAT) with fine-grained permissions.

        These tokens can be scoped to specific packages and operations.

        (Alias for npmAccessToken)


        GATs created with `bypass_2fa: true` cannot perform account,

        token, or org/team/package governance write operations — those

        requests are rejected with `403 Forbidden`.

        '
    oidcExchangeToken:
      type: http
      scheme: bearer
      description: 'Short-lived npm registry token obtained by exchanging an OIDC id_token

        via the `/oidc/token/exchange` endpoint. These tokens are package-scoped

        and have limited lifetime (typically 1 hour).

        '
x-refined-from:
- npm-registry-reference-openapi.json
- npm-registry-reference-openapi.yml