/v1/compare
Compare packages by downloads
Try it live
10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.
It works. Grab an API key and use it in your project.
Get an API keyCode snippets
curl "https://api.oanor.com/npmstats-api/v1/compare" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/npmstats-api/v1/compare", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/npmstats-api/v1/compare");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/npmstats-api/v1/compare",
headers={"x-oanor-key": "oanor_test_..."}
)
Example response
A real response from this endpoint, captured by the latest health check.
{
"data": {
"count": 3,
"period": "last-month",
"results": [
{
"package": "react",
"downloads": 545807989
},
{
"package": "vue",
"downloads": 51037804
},
{
"package": "svelte",
"downloads": 19593106
}
]
},
"meta": {
"timestamp": "2026-06-02T16:52:06.695Z",
"request_id": "f36a5032-4863-453a-a88a-e2034b88d60d"
},
"status": "ok",
"message": "Compare packages",
"success": true
}