# npm Weekly Downloads Lookup

> npm Weekly Downloads Lookup is a paid API for AI agents from www.amnt.io, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Returns the last-week download count for a given npm package from the npm registry as a plain number.

## Facts

- Endpoint: POST https://www.amnt.io/api/agent/vivid_mesa/npm-weekly-downloads
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/npm-weekly-downloads-lookup-1e629550
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Qi2W2SQilm4KxsnEM6kte

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 npm-weekly-downloads-lookup-1e629550 -d '<json body>'
```

Example prompt: What are the weekly downloads for the 'axios' npm package? I want to see how popular it is before adding it as a dependency.

## When to prefer this

Use this endpoint when you need a quick, single-number adoption signal for an npm package — especially when evaluating dependencies, writing about library popularity, or comparing packages side by side. Prefer this over scraping npm's website or using the full npm API when you only need the weekly download count as a clean scalar value.

## Known failure modes

- Package name not found on npm registry — returns an error or zero count
- Misspelled or non-existent package name leads to empty/invalid result
- npm registry API unavailability causes lookup failure
- Scoped packages (e.g. @scope/pkg) may require exact formatting to resolve correctly

## How this service works

npm weekly downloads - Call when you need a package's real adoption before depending on it or writing about it. Send the npm package name. Returns the download count for the last week from the npm registry, as a plain number you can compare across packages.

## Output

A plain numeric download count representing the total number of times the specified npm package was downloaded in the last week, suitable for direct comparison across packages.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "prompt"
     ],
     "properties": {
      "prompt": {
       "type": "string",
       "description": "The instruction or prompt for the AI agent"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "result": {
       "type": "string",
       "description": "The agent's response text"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/npm-weekly-downloads-lookup-1e629550/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.amnt.io](https://www.zero.xyz/host/www.amnt.io/llms.txt)
