/v1/size
Bundle size of a package
Provalo dal vivo
10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.
Funziona. Prendi una chiave API e usala nel tuo progetto.
Ottieni una chiave APIFrammenti di codice
curl "https://api.oanor.com/bundlephobia-api/v1/size" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/bundlephobia-api/v1/size", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/bundlephobia-api/v1/size");
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/bundlephobia-api/v1/size",
headers={"x-oanor-key": "oanor_test_..."}
)
Risposta di esempio
Una risposta reale di questo endpoint, acquisita dall'ultimo health check.
{
"data": {
"name": "react",
"assets": [
{
"gzip": 2909,
"name": "main",
"size": 7593,
"type": "js"
}
],
"gzip_kb": 2.84,
"size_kb": 7.42,
"version": "19.2.7",
"gzip_bytes": 2909,
"repository": "https://github.com/facebook/react.git",
"size_bytes": 7593,
"description": "React is a JavaScript library for building user interfaces.",
"has_js_module": false,
"dependency_count": 0,
"dependency_sizes": [
{
"name": "react",
"approximate_size_kb": 7.62,
"approximate_size_bytes": 7798
}
],
"has_side_effects": true,
"peer_dependencies": []
},
"meta": {
"timestamp": "2026-06-02T16:52:08.829Z",
"request_id": "904a613e-fd21-41d3-978a-76ae04cf03f9"
},
"status": "ok",
"message": "Bundle size of a package",
"success": true
}