# AgentServices NPM Package Stats

> AgentServices NPM Package Stats is a paid API for AI agents from agentservices.to, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-12).

Returns download statistics and metadata for a given npm package by package name

## Facts

- Endpoint: GET https://agentservices.to/v1/npm-stats/%7Bpackage%7D
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentservices-npm-package-stats-f2a29dd0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xbTax8XDvj1d9lzdsrAiB

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 agentservices-npm-package-stats-f2a29dd0
```

Example prompt: Can you look up the npm download stats for the 'lodash' package and tell me how popular it is?

## When to prefer this

Use this endpoint when an agent needs to programmatically fetch npm download statistics for a specific package, especially in workflows involving dependency vetting, open-source library research, competitive analysis of JavaScript packages, or automated reporting on package adoption trends. Prefer this over manual npm website lookups when the data needs to be machine-readable and integrated into a larger agent pipeline.

## Known failure modes

- Package name not found or misspelled — returns 404 or empty result
- Package name contains special characters that aren't URL-encoded — may cause routing errors
- Payment failure via x402 micropayment — call is rejected before data is returned
- Rate limiting or quota exceeded — returns 429 error
- Private or unlisted packages may not have public stats available

## How this service works

Paid data APIs for AI agents. Crypto market data, DeFi yields, IP geolocation, dispute resolution, marketing intelligence. Powered by x402 micropayments on Base.

## Output

Returns download statistics for the specified npm package, including total downloads, weekly and/or monthly download counts, and potentially package metadata such as version info and publication details — giving the agent a quantitative measure of a package's popularity and usage.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "DELETE",
      "GET",
      "HEAD"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "package"
     ],
     "properties": {
      "package": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  },
  "routeTemplate": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentservices-npm-package-stats-f2a29dd0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentservices.to](https://www.zero.xyz/host/agentservices.to/llms.txt)
