Package Safety Check API - npm and PyPI before you install
package_safety_checkCall before npm install or pip install: one verdict (ok / caution / avoid) with plain reasons and a 0-100 risk score. Checks that the package exists (catches hallucinated names), typosquats of popular packages, brand-new releases (72 h supply-chain cooldown), install scripts, deprecated or yanked versions, licence, repository, weekly downloads and known vulnerabilities of that exact version (OSV) with the fixed version. Up to 25 packages per call, live registry data, ~0.3-1.5 s. Built for AI coding agents and CI. Free: 5 calls/day per IP. Paid: Radar API key (from €9/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.003/call via x402 at https://radarbg.com/x402/package-safety-check.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"packages": [
"npm:lodash@4.17.4",
"npm:express",
"pypi:reqeusts"
]
},
"name": "package_safety_check"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Package name, e.g. express, @types/node, requests | |
| version | No | Exact version or npm dist-tag (default: latest) | |
| packages | No | Instead of name: up to 25 items like 'npm:lodash@4.17.4', 'pypi:requests==2.19.0', 'express' | |
| ecosystem | No | npm or pypi (default npm) | npm |