Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

npm-downloads-example

Example install for the NPM Downloads Badge — part of the FeedPulse free widget suite.

What it does

Renders a download-count badge for any public npm package. Looks like this:

⬇ 1.2M weekly downloads

Counts come from npm's public download stats API (the same source npmjs.com/package/ uses internally), refreshed hourly and cached server-side so embedding the badge on 50 pages won't slow your site down.

Install

<script async src="https://feed-pulse.com/api/npm_downloads?pkg=PACKAGE_NAME"></script>

Replace PACKAGE_NAME with any public npm package — e.g. react, lodash, express, or your own @scope/your-package.

Customization params

Param Default Description
pkg (required) npm package name (supports scoped packages: @vue/cli, @nestjs/core)
period weekly weekly, monthly, or total (all-time)
theme obsidian Visual theme — obsidian, mint, sand, light, dark
format compact compact (1.2M) or full (1,234,567)
lang auto Label language — see the main org README for the full 12-language list

Use cases

  • Package landing pages — embed on your project's marketing site to show traction live
  • GitHub READMEs (rendered HTML) — for repos that publish to npm, the badge auto-updates per release
  • Developer portfolios — show download counts for libraries you maintain
  • Docs sites — Docusaurus, MkDocs, GitBook — give first-time visitors instant credibility
  • Blog posts comparing libraries — embed both badges side-by-side for live A-vs-B context

Examples

<!-- React weekly downloads -->
<script async src="https://feed-pulse.com/api/npm_downloads?pkg=react&period=weekly"></script>

<!-- Lodash monthly downloads, sand theme -->
<script async src="https://feed-pulse.com/api/npm_downloads?pkg=lodash&period=monthly&theme=sand"></script>

<!-- Express all-time downloads, full format -->
<script async src="https://feed-pulse.com/api/npm_downloads?pkg=express&period=total&format=full"></script>

Generate your own

Customize and copy your snippet at feed-pulse.com/free-npm-downloads-badge.

License

MIT

More widgets

19 free embeddable widgets at feed-pulse.com/widgets — including GitHub stars, Discord members, live traffic, weather, crypto/stock tickers, and more.

About

NPM Downloads badge — live weekly, monthly, or all-time download counts for any npm package as an embeddable HTML badge. No API key, no signup. A FeedPulse example repo.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors