/v1/compare
Compare packages by downloads
Live testen
10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.
Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.
API-Key holenCode-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_..."}
)
Beispiel-Response
Echte Antwort dieses Endpoints, erfasst beim letzten 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
}