npm download counts (paid: 0.001 RLUSD / 0.001 USDC on Base / 0.001 RLUSD on Base via x402)
npm_downloadsPaid: 0.001 RLUSD per call via x402 on XRPL mainnet (xrpl:0), or 0.001 USDC on Base (eip155:8453). Pay per call, solves one question: How many npm downloads did this package have in this period? npm's own published download count for one package and period (last-day, last-week, last-month, last-year, or a date range of up to 18 months) from npm's documented public API, with source and observed_at. Counts only; not unique users or popularity. Without payment this returns isError with the x402 PaymentRequired object (fresh invoiceId); retry with the signed payload in _meta["x402/payment"] or the payment_signature argument. Unpaid calls cost nothing.
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": "<package>"
},
"name": "npm_downloads"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | last-day|last-week|last-month|last-year|YYYY-MM-DD|YYYY-MM-DD:YYYY-MM-DD (default last-week) | |
| package | Yes | npm package name, e.g. express or @scope/name | |
| payment_signature | No | Optional. Base64 x402 PAYMENT-SIGNATURE value (signed RLUSD or USDC PaymentPayload) for hosts that cannot set _meta["x402/payment"]. Omit on the first call to receive the payment requirements. |