Get npm download statistics
get_download_statsRetrieve npm package download counts for a chosen period (day, week, month, year, or custom date range). Returns the total, daily average, and an optional per-day breakdown for trend analysis.
Instructions
Get npm download counts for a package over a period (last-day, last-week, last-month, last-year, or a custom YYYY-MM-DD:YYYY-MM-DD range). Returns the total, the average per day and, optionally, a per-day breakdown (limited to ranges of 92 days or fewer). Data comes from the npm downloads API and lags about one day.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"package_name": "<package_name>"
},
"name": "get_download_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | "last-day", "last-week", "last-month", "last-year" or a custom range "YYYY-MM-DD:YYYY-MM-DD". Default "last-week". | last-week |
| package_name | Yes | npm package name, e.g. "react" or "@types/node". | |
| include_daily | No | Include a per-day breakdown. Only allowed for periods of 92 days or fewer. Default false. |