Bundlephobia npm Package Size Scraper avatar

Bundlephobia npm Package Size Scraper

Pricing

from $7.69 / 1,000 results

Go to Apify Store
Bundlephobia npm Package Size Scraper

Bundlephobia npm Package Size Scraper

Scrapes minified, gzipped, and tree-shaken bundle sizes plus dependency counts for npm packages from Bundlephobia. Returns each package as a flat row.

Pricing

from $7.69 / 1,000 results

Rating

0.0

(0)

Developer

ParseForge

ParseForge

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 days ago

Last modified

Share

ParseForge

Bundlephobia npm Package Size Scraper

Scrape npm package bundle sizes, gzip sizes, and dependency counts from Bundlephobia, up to a million packages per run. Every package comes with its minified, gzipped, and tree-shaken sizes. No API key required. Export to JSON, CSV, Excel, or XML.

Bundlephobia's website gives you one package at a time, which is slow when you need to audit dozens of dependencies or compare alternatives. This reads the public size data directly for any list of npm packages and returns each result in a flat row. No browser, no manual lookups, and no API registration.

Who uses itWhat they scrape Bundlephobia for
Frontend performance engineersAudit every dependency in a package.json to find the heaviest bundles.
Open source maintainersCompare bundle size impact before adding a new dependency.
DevOps and platform teamsEnforce bundle-size budgets in CI pipelines with automated checks.

What it does

This Actor collects minified, gzipped, and tree-shaken bundle sizes plus dependency counts for npm packages from Bundlephobia and returns each one as a flat row.

  • ๐Ÿ“ฆ Batch package measurement: feed a list of npm package names, with optional version pins like react@18.2.0, and get all sizes in one run.
  • ๐Ÿ“Š Three size metrics: minified size, gzipped size, and tree-shaken size for every package.
  • ๐Ÿ”ข Dependency counts: each row includes the total number of direct dependencies for the package.
  • โšก No API key needed: reads the public Bundlephobia pages, so you can start scraping immediately without registration.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

What you can do with Bundlephobia data

๐Ÿ“ˆ Audit a full dependency tree.

A frontend lead pastes their entire package.json dependency list into the Actor to identify the three largest packages slowing down their app's initial load.

๐Ÿ” Compare alternative packages.

A developer feeds five date-picker library names into the Actor and picks the one with the smallest gzipped size for a mobile-first project.

๐Ÿšฆ Enforce size budgets in CI.

A platform team runs the Actor nightly against their allowed-dependencies list and blocks any PR that introduces a package over a 10 kB gzip threshold.

Why choose this scraper

What you get
Batch measurementMeasure hundreds of packages in one run instead of looking them up one by one.
Fixed schemaEvery package returns the same flat fields, ready for spreadsheets or databases.
Version pinningRequest exact versions like lodash@4.17.21 to track size changes over releases.

How it compares

This Actor focuses on batch measurement of npm package sizes from Bundlephobia, while the other Bundlephobia scraper on Apify also targets the same source with a similar feature set.

FeatureParseForgeBundlephobia Scraper - npm Bundle Size & Dependencies
Batch package measurementYes, feed a list of package namesYes
Minified sizeYesYes
Gzipped sizeYesYes
Tree-shaken sizeYesNot listed
Dependency countYesYes
Version pinningYes, package@version formatNot listed

Configure the run

Drive the Actor from a list of npm package names, with optional version pins, and set a maximum number of packages to cap the run. The Input tab lists every parameter.

A first run with the defaults:

{
"packages": [
"react",
"lodash",
"axios"
],
"maxItems": 10
}

A larger pull:

{
"packages": [
"react",
"lodash",
"axios"
],
"maxItems": 200
}

Pricing

Pay-per-result: $0.0085 per result collected. You pay only for the results written to your dataset.

Results collectedApproximate cost
100 results$0.85
1,000 results$8.50
10,000 results$85.00

New Apify accounts start with $5 in free credit.

Free users

Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.

Run it

  1. Create a free Apify account with $5 in credit.
  2. Open the Bundlephobia npm Package Size Scraper.
  3. Set your inputs and any filters, then click Start.
  4. Export the results as CSV, Excel, JSON, or XML from the Dataset tab.

Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.

Use with AI agents (MCP)

Give an AI agent live access to Bundlephobia through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

$claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/bundlephobia-scraper"

Then prompt it in plain language to run the scraper and read back the results.

Troubleshooting

Why am I getting no results?

Check that your package names are spelled correctly and do not include extra whitespace. Also verify that the maximum packages setting is not set to zero.

Why does a package show zero for all sizes?

Bundlephobia may not have data for that exact version or the package name may be invalid. Try without a version pin or check the name on npm.

The run is taking too long with a large package list.

The Actor reads one package at a time from Bundlephobia. Reduce the maximum packages setting or split your list across multiple runs.

Can I get the sizes for scoped packages like @angular/core?

Yes. Include the full scoped name exactly as it appears on npm, for example @angular/core@15.0.0.

FAQ

QuestionAnswer
Do I need a Bundlephobia API key?No. The Actor reads the public Bundlephobia result pages, so no API key or registration is required.
Can I pin a specific version of a package?Yes. Use the format package@version, for example react@18.2.0, in your packages list.
What sizes does the Actor return?It returns the minified size, the gzipped size, and the tree-shaken size for each package, as shown on Bundlephobia.
Does it also return dependency counts?Yes. Each row includes the total number of direct dependencies the package lists.
How many packages can I scrape in one run?You can set the maximum up to 1,000,000 packages. The default prefill is 10.
What output formats are supported?You can export your dataset as JSON, CSV, Excel, or XML from the Apify platform.
Can I run this on a schedule?Yes. Use Apify's scheduler to run the Actor daily or weekly and track size changes over time.
What happens if I leave the packages list empty?The Actor will measure a small sample set of react, lodash, and axios so you can see the output shape.

Browse the full ParseForge collection for more scrapers.

๐Ÿ†˜ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.

โš ๏ธ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Bundlephobia. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.