{"api":{"id":"api_76f55290801df895428c16fc","slug":"js-bundle-size","name":"JavaScript Bundle Size API","description":"Bundle size of npm packages and versions as bundlephobia.com measures them: minified and gzipped bytes, dependency count, what makes up the bundle, ES module, tree-shaking and side-effect flags, peer dependencies and the repository link. One record per package you list.","kind":"ready_made","visibility":"public","domain":"bundlephobia.com","source_url":"https://bundlephobia.com/","category":"developer","record_type":"generic","active_version":"1.0","units_per_1k":500,"health":"unknown","auto_repair":false,"last_checked_at":null,"last_run_at":null,"fields_count":22,"created_at":"2026-12-06T03:33:09.225Z","updated_at":"2026-12-06T03:33:09.225Z","runnable":true},"version":"1.0","contract_hash":"0632e9b00459cbee1a3554b05cef9a3c5800831206202cc113a1f21785ea89f1","fields":[{"name":"requested_package","type":"string","description":"The package as you listed it, such as react@18.2.0 or lodash.","required":true,"coverage":1,"example":"r•••@18.2.0"},{"name":"name","type":"string","description":"Package name on npm, such as react or @reduxjs/toolkit.","required":true,"coverage":1,"example":"react"},{"name":"version","type":"string","description":"The version measured: the one you asked for, or the newest one matching your range or tag (latest when none is given).","required":false,"coverage":0.8,"example":"18.2.0"},{"name":"status","type":"string","description":"ok when sizes were measured; not_found, unsupported or failed otherwise (see error).","required":true,"coverage":1,"example":"ok"},{"name":"url","type":"url","description":"The package's result page on bundlephobia.com.","required":false,"coverage":0.8,"example":"https://bundlephobia.com/package/r•••@18.2.0"},{"name":"npm_url","type":"url","description":"The measured version's page on npmjs.com.","required":false,"coverage":1,"example":"https://www.npmjs.com/package/react/v/18.2.0"},{"name":"size_bytes","type":"integer","description":"Minified bundle size in bytes, dependencies included.","required":false,"coverage":0.8,"example":6618},{"name":"gzip_bytes","type":"integer","description":"Minified and gzipped bundle size in bytes: roughly what a browser downloads.","required":false,"coverage":0.8,"example":2608},{"name":"dependency_count","type":"integer","description":"Number of dependencies bundled with the package.","required":false,"coverage":0.8,"example":1},{"name":"composition","type":"object","description":"Approximate minified bytes each part adds to the bundle, by name: the package itself and its dependencies.","required":false,"coverage":0.4,"example":{"redux":18078,"immer":31282,"reselect":14612,"redux-thunk":288}},{"name":"peer_dependencies","type":"array","description":"Peer dependencies the package expects the app to install, such as react.","required":false,"coverage":0.4,"example":["react","react-redux"]},{"name":"has_js_module","type":"boolean","description":"True when the package ships an ES module build (a module entry).","required":false,"coverage":0.8,"example":false},{"name":"module_entry","type":"string","description":"Path of that ES module entry inside the package, when bundlephobia gives it.","required":false,"coverage":0.6,"example":"dist/redux-toolkit.legacy-esm.js"},{"name":"is_module_type","type":"boolean","description":"True when the package declares itself an ES module package (type module).","required":false,"coverage":0.8,"example":false},{"name":"is_tree_shakeable","type":"boolean","description":"True when bundlers can drop unused exports: an ES module entry, a jsnext:main entry or type module.","required":false,"coverage":0.8,"example":false},{"name":"has_side_effects","type":"boolean","description":"False when the package declares itself free of side effects; true when it does not, or lists files that have them.","required":false,"coverage":0.8,"example":true},{"name":"side_effect_files","type":"array","description":"Files the package lists as having side effects, when it lists them.","required":false,"coverage":0.2,"example":["*.css"]},{"name":"asset_types","type":"array","description":"Kinds of files in the bundle, such as js and css.","required":false,"coverage":0.8,"example":["js"]},{"name":"is_scoped","type":"boolean","description":"True for a scoped package such as @types/node.","required":false,"coverage":1,"example":false},{"name":"repository_url","type":"url","description":"Code repository of the package, as a browser link.","required":false,"coverage":0.8,"example":"https://github.com/facebook/react"},{"name":"description","type":"string","description":"The package's own description.","required":false,"coverage":0.8,"example":"React is a JavaScript library for building user interfaces."},{"name":"error","type":"string","description":"Why there are no sizes, for records whose status is not ok.","required":false,"coverage":0.2,"example":"Type packages hold no code that runs in the browser, so bundlephobia does not measure them."}],"inputs":[{"name":"packages","type":"array","description":"npm packages, each optionally with a version, range or tag after @: react@18.2.0, lodash, @reduxjs/toolkit@^2, react@next. npmjs.com and bundlephobia.com package links work too.","example":["react@18.2.0","lodash"],"required":true}],"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":true,"properties":{"asset_types":{"description":"Kinds of files in the bundle, such as js and css.","type":"array"},"composition":{"description":"Approximate minified bytes each part adds to the bundle, by name: the package itself and its dependencies.","type":"object"},"dependency_count":{"description":"Number of dependencies bundled with the package.","type":"integer"},"description":{"description":"The package's own description.","type":"string"},"error":{"description":"Why there are no sizes, for records whose status is not ok.","type":"string"},"gzip_bytes":{"description":"Minified and gzipped bundle size in bytes: roughly what a browser downloads.","type":"integer"},"has_js_module":{"description":"True when the package ships an ES module build (a module entry).","type":"boolean"},"has_side_effects":{"description":"False when the package declares itself free of side effects; true when it does not, or lists files that have them.","type":"boolean"},"is_module_type":{"description":"True when the package declares itself an ES module package (type module).","type":"boolean"},"is_scoped":{"description":"True for a scoped package such as @types/node.","type":"boolean"},"is_tree_shakeable":{"description":"True when bundlers can drop unused exports: an ES module entry, a jsnext:main entry or type module.","type":"boolean"},"module_entry":{"description":"Path of that ES module entry inside the package, when bundlephobia gives it.","type":"string"},"name":{"description":"Package name on npm, such as react or @reduxjs/toolkit.","type":"string"},"npm_url":{"description":"The measured version's page on npmjs.com.","format":"uri","type":"string"},"peer_dependencies":{"description":"Peer dependencies the package expects the app to install, such as react.","type":"array"},"repository_url":{"description":"Code repository of the package, as a browser link.","format":"uri","type":"string"},"requested_package":{"description":"The package as you listed it, such as react@18.2.0 or lodash.","type":"string"},"side_effect_files":{"description":"Files the package lists as having side effects, when it lists them.","type":"array"},"size_bytes":{"description":"Minified bundle size in bytes, dependencies included.","type":"integer"},"status":{"description":"ok when sizes were measured; not_found, unsupported or failed otherwise (see error).","type":"string"},"url":{"description":"The package's result page on bundlephobia.com.","format":"uri","type":"string"},"version":{"description":"The version measured: the one you asked for, or the newest one matching your range or tag (latest when none is given).","type":"string"}},"required":["requested_package","name","status"],"title":"JavaScript Bundle Size API","type":"object"},"samples":[{"requested_package":"r•••@18.2.0","name":"react","version":"18.2.0","status":"ok","url":"https://bundlephobia.com/package/r•••@18.2.0","npm_url":"https://www.npmjs.com/package/react/v/18.2.0","size_bytes":6618,"gzip_bytes":2608,"dependency_count":1,"composition":null,"peer_dependencies":[],"has_js_module":false,"module_entry":null,"is_module_type":false,"is_tree_shakeable":false,"has_side_effects":true,"side_effect_files":[],"asset_types":["js"],"is_scoped":false,"repository_url":"https://github.com/facebook/react","description":"React is a JavaScript library for building user interfaces.","error":null},{"requested_package":"@reduxjs/t•••@2.2.1","name":"@reduxjs/toolkit","version":"2.2.1","status":"ok","url":"https://bundlephobia.com/package/@reduxjs/t•••@2.2.1","npm_url":"https://www.npmjs.com/package/@reduxjs/toolkit/v/2.2.1","size_bytes":37951,"gzip_bytes":13589,"dependency_count":4,"composition":{"redux":18078,"immer":31282,"reselect":14612,"redux-thunk":288},"peer_dependencies":["react","react-redux"],"has_js_module":true,"module_entry":"dist/redux-toolkit.legacy-esm.js","is_module_type":false,"is_tree_shakeable":true,"has_side_effects":false,"side_effect_files":[],"asset_types":["js"],"is_scoped":true,"repository_url":"https://github.com/reduxjs/redux-toolkit","description":"The official, opinionated, batteries-included toolset for efficient Redux development","error":null},{"requested_package":"a•••@5.15.0","name":"antd","version":"5.15.0","status":"ok","url":"https://bundlephobia.com/package/a•••@5.15.0","npm_url":"https://www.npmjs.com/package/antd/v/5.15.0","size_bytes":1401353,"gzip_bytes":432276,"dependency_count":48,"composition":{"rc-resize-observer":7792,"rc-util":47156,"@babel/runtime":23956,"@ant-design/cssinjs":68036,"@ant-design/icons":46982,"rc-motion":24710,"rc-field-form":74668,"rc-select":82360,"rc-tooltip":6374,"rc-menu":57106,"rc-picker":162592,"rc-tabs":41756,"@ant-design/react-slick":74188,"throttle-debounce":1288},"peer_dependencies":["react","react-dom"],"has_js_module":true,"module_entry":"es/index.js","is_module_type":false,"is_tree_shakeable":true,"has_side_effects":true,"side_effect_files":["*.css"],"asset_types":["js"],"is_scoped":false,"repository_url":"https://github.com/ant-design/ant-design","description":"An enterprise-class UI design language and React components implementation","error":null}],"validation":{"checked_at":"2026-12-06T03:33:09.177Z","field_coverage":{"asset_types":1,"composition":0.67,"dependency_count":1,"description":1,"error":0,"gzip_bytes":1,"has_js_module":1,"has_side_effects":1,"is_module_type":1,"is_scoped":1,"is_tree_shakeable":1,"module_entry":0.67,"name":1,"npm_url":1,"peer_dependencies":0.67,"repository_url":1,"requested_package":1,"side_effect_files":0.33,"size_bytes":1,"status":1,"url":1,"version":1},"fresh_read":false,"identity_unique":true,"issues":["Imported from a hand-built source. Field names and types come from its published schema; no live read was made for this check."],"level":"preview","pages_checked":0,"passed":true,"records_checked":3},"changelog":[{"version":"1.0","change_kind":"initial","note":"Imported from the ready-made source catalog.","created_at":"2026-12-06T03:33:09.225Z","activated_at":"2026-12-06T03:33:09.225Z","active":true,"contract_hash":"0632e9b00459cbee1a3554b05cef9a3c5800831206202cc113a1f21785ea89f1","fields_count":22}]}