# Saylor Innovations npm Package Search

> Saylor Innovations npm Package Search is a paid API for AI agents from saylorinnovations.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-30).

Search the npm registry and return up to five packages with names, versions, descriptions, registry ranking scores, and source links.

## Facts

- Endpoint: GET https://saylorinnovations.com/api/package/search?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/saylor-innovations-npm-package-search-42c7f82f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5i9FNP6KBQhPB_hS9OP7m

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability saylor-innovations-npm-package-search-42c7f82f
```

Example prompt: Search npm for packages related to 'date formatting' and show me the top results with their versions, descriptions, and ranking scores.

## When to prefer this

Choose this endpoint when you need quick npm package discovery with ranking signals without building your own npm registry client. It's ideal for agents that need to recommend libraries, audit dependencies, or explore package options for a given task — especially in agentic workflows where a $0.003/call cost is acceptable for structured, pre-ranked results without scraping the npm website directly.

## Known failure modes

- Query string shorter than 2 or longer than 160 characters returns a validation error
- No matching packages found returns an empty results array with totalResults of 0
- npm registry unavailable causes upstream timeout or error response
- Malformed or missing 'q' query parameter returns a 400-level error
- Payment not provided or insufficient USDC balance returns a 402 Payment Required response

## How this service works

Find up to five npm packages with versions, descriptions, registry ranking scores and source links for package discovery.

## Output

Returns a JSON object containing the original search query, total result count, and an array of up to five npm packages — each with name, latest version, description, registry ranking score (number), and a URL to the package page. Also includes metadata about the service and retrieval timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "POST",
      "PUT",
      "PATCH",
      "DELETE",
      "HEAD"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "q"
     ],
     "properties": {
      "q": {
       "type": "string",
       "description": "Search terms, 2–160 characters."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "service",
      "subject",
      "retrievedAt",
      "source",
      "report"
     ],
     "properties": {
      "report": {
       "type": "object",
       "required": [
        "query",
        "totalResults",
        "results"
       ],
       "properties": {
        "query": {
         "type": "string"
        },
        "results": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "url": {
            "type": [
             "string",
             "null"
            ]
           },
           "name": {
            "type": "string"
           },
           "score": {
            "type": [
             "number",
             "null"
            ]
           },
           "version": {
            "type": "string"
           },
           "description": {
            "type": [
             "string",
             "null"
            ]
           }
          }
         }
        },
        "totalResults": {
         "type": "integer"
        }
       }
      },
      "source": {
       "type": "object",
       "required": [
        "name",
        "url"
       ],
       "properties": {
        "url": {
         "type": "string",
         "format": "uri"
        },
        "name": {
         "type": "string"
        }
       }
      },
      "service": {
       "type": "string"
      },
      "subject": {
       "type": "string"
      },
      "retrievedAt": {
       "type": "string",
       "format": "date-time"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/saylor-innovations-npm-package-search-42c7f82f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from saylorinnovations.com](https://www.zero.xyz/host/saylorinnovations.com/llms.txt)
