{"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,"egress":null,"repairs":[],"repairs_total":0,"how":"Runs on a reader we built and maintain by hand for this site.","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},"links":{"run":"https://pullrow.dev/v1/apis/api_76f55290801df895428c16fc/run","openapi":"https://pullrow.dev/v1/apis/api_76f55290801df895428c16fc/openapi.json","contract":"https://pullrow.dev/v1/apis/api_76f55290801df895428c16fc/contract.json","page":"https://pullrow.dev/catalog/js-bundle-size"},"runs_30d":0,"success_rate_30d":null,"price_per_1k_usd":0.5,"featured":false,"reliability":{"window_days":30,"runs":0,"completed":0,"succeeded":0,"failed":0,"success_rate":null,"last_run_at":null},"demo":{"available":false,"max_records":0,"reason":"Every run of this API costs us money, so it has no free live demo. The sample records on its page show what it returns.","code":"demo_not_available"},"meta":{"limitations":["Sizes are bundlephobia's own build of each package (minified, then gzipped, with its default settings), not your bundler's output; treat them as a fair comparison between packages and versions.","bundlephobia.com is a free community service with no published request limit. Packages are read one at a time, about one a second; a version it has never measured is built on first request, which can take up to a minute.","Up to 200 packages per run. Long lists of packages bundlephobia has never measured may not all finish within one run's time limit; ask again for the rest.","Packages bundlephobia cannot build (native modules, packages for one operating system such as fsevents) come back with status unsupported; unknown names or versions come back as not_found; a build that fails or takes too long comes back as failed.","composition and peer_dependencies are empty for some older measurements, where bundlephobia did not record them.","No licence is stated for the numbers; credit bundlephobia.com when you publish them."]},"plain":{"summary":null,"source":"rules","fields":[{"name":"requested_package","label":"Requested package","description":"The package as you listed it, such as react@18.2.0 or lodash.","group":"Basics","shown":true,"written":false},{"name":"name","label":"Name","description":"Package name on npm, such as react or @reduxjs/toolkit.","group":"Basics","shown":true,"written":false},{"name":"version","label":"Version","description":"The version measured: the one you asked for, or the newest one matching your range or tag (latest when none is given).","group":"Basics","shown":true,"written":false},{"name":"status","label":"Status","description":"ok when sizes were measured; not_found, unsupported or failed otherwise (see error).","group":"Basics","shown":true,"written":false},{"name":"url","label":"Link","description":"The package's result page on bundlephobia.com.","group":"Links","shown":true,"written":false},{"name":"npm_url","label":"Npm link","description":"The measured version's page on npmjs.com.","group":"Links","shown":true,"written":false},{"name":"size_bytes","label":"Size bytes","description":"Minified bundle size in bytes, dependencies included.","group":"Basics","shown":true,"written":false},{"name":"gzip_bytes","label":"Gzip bytes","description":"Minified and gzipped bundle size in bytes: roughly what a browser downloads.","group":"Basics","shown":true,"written":false},{"name":"dependency_count","label":"Dependency count","description":"Number of dependencies bundled with the package.","group":"Basics","shown":true,"written":false},{"name":"composition","label":"Composition","description":"Approximate minified bytes each part adds to the bundle, by name: the package itself and its dependencies.","group":"Basics","shown":true,"written":false},{"name":"peer_dependencies","label":"Peer dependencies","description":"Peer dependencies the package expects the app to install, such as react.","group":"Basics","shown":true,"written":false},{"name":"has_js_module","label":"Has js module","description":"Yes when the package ships an ES module build (a module entry).","group":"Basics","shown":true,"written":false},{"name":"module_entry","label":"Module entry","description":"Path of that ES module entry inside the package, when bundlephobia gives it.","group":"Basics","shown":true,"written":false},{"name":"is_module_type","label":"Module type","description":"Yes when the package declares itself an ES module package (type module).","group":"Basics","shown":true,"written":false},{"name":"is_tree_shakeable","label":"Tree shakeable","description":"Yes when bundlers can drop unused exports: an ES module entry, a jsnext:main entry or type module.","group":"Basics","shown":true,"written":false},{"name":"has_side_effects","label":"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.","group":"Basics","shown":true,"written":false},{"name":"side_effect_files","label":"Side effect files","description":"Files the package lists as having side effects, when it lists them.","group":"Basics","shown":true,"written":false},{"name":"asset_types","label":"Asset types","description":"Kinds of files in the bundle, such as js and css.","group":"Basics","shown":true,"written":false},{"name":"is_scoped","label":"Scoped","description":"True for a scoped package such as @types/node.","group":"Basics","shown":true,"written":false},{"name":"repository_url","label":"Repository link","description":"Code repository of the package, as a browser link.","group":"Links","shown":true,"written":false},{"name":"description","label":"Description","description":"The package's own description.","group":"Basics","shown":true,"written":false},{"name":"error","label":"Error","description":"Why there are no sizes, for records whose status is not ok.","group":"Technical","shown":false,"written":false}],"inputs":[{"name":"packages","label":"Packages","help":"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","written":false}]}},"incidents":[]}