npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

flashcapture-node

v1.0.4

Published

Official Node.js wrapper for FlashCapture API (RapidAPI). Async website screenshots made easy.

Readme

📸 FlashCapture Node.js Client

npm version License: MIT RapidAPI

The official, high-performance Node.js wrapper for the FlashCapture API.

Stop fighting with Puppeteer. Generate pixel-perfect screenshots of modern websites, handle lazy-loading, block ads, and capture full pages without managing headless browsers or zombie processes.

🚀 Features

  • Zero-Config: No need to install Chrome, Puppeteer, or heavy binaries.
  • Smart Polling: The SDK handles the async job queue automatically. You just await the result.
  • Ad-Blocking: Built-in options to hide banners and cookie popups.
  • TypeScript Support: Includes type definitions (.d.ts) out of the box.

📦 Installation

npm install flashcapture-node

🔑 Prerequisites

You need an API Key from RapidAPI.

  1. Go to FlashCapture on RapidAPI.
  2. Subscribe to the Free Tier (10 shots/month).
  3. Copy your X-RapidAPI-Key.

🛠 Usage

1. Quick Start: Capture & Save to Disk

The easiest way to take a screenshot and save it locally.

const FlashCapture = require('flashcapture-node');

// Initialize with your API Key
const client = new FlashCapture('YOUR_RAPIDAPI_KEY_HERE');

(async () => {
    try {
        console.log('📸 Snapping Wikipedia...');
        
        const result = await client.captureAndSave(
            'https://www.wikipedia.org', 
            './wikipedia.png', 
            { 
                fullPage: true, 
                darkMode: true 
            }
        );

        console.log(`✅ Saved to: ${result.localPath}`);
    } catch (err) {
        console.error('❌ Error:', err.message);
    }
})();

2. Advanced: Get Image Buffer (Memory)

Useful if you want to upload the image directly to S3, send it to a Discord bot, or serve it via an API without saving it to disk.

const FlashCapture = require('flashcapture-node');
const client = new FlashCapture('YOUR_KEY');

(async () => {
    // 1. Submit job and wait for completion (Auto-polling)
    const job = await client.capture('https://www.wikipedia.org', {
        width: 1920,
        height: 1080,
        hideElements: ['.cookie-banner', '#ad-sidebar']
    });

    console.log(`Job Done! ID: ${job.id}`);

    // 2. Download the buffer
    const imageBuffer = await client.download(job.id);

    // ... Do whatever you want with the buffer
    // s3.putObject({ Body: imageBuffer ... })
})();

⚙️ Configuration Options

You can pass these options to capture() or captureAndSave().

| Option | Type | Default | Description | | --- | --- | --- | --- | | fullPage | boolean | false | Capture the full scrollable height of the page. | | width | number | 1920 | Viewport width in pixels. | | height | number | 1080 | Viewport height in pixels. | | darkMode | boolean | false | Force the website to render in dark mode. | | delay | number | 0 | Wait time in seconds before capturing (for animations). | | hideElements | string[] | [] | Array of CSS selectors to hide (e.g. ['.ads', '#popup']). | | userAgent | string | null | Spoof a custom user agent. | | type | string | 'png' | Output format: 'png' or 'jpeg'. |


❓ FAQ

Why use this instead of puppeteer directly? Running Puppeteer in production (Docker/Lambda) is hard. You have to deal with fonts, memory leaks, crashing processes, and IP bans. FlashCapture handles all that infrastructure for you via a simple API.

Is it free? Yes, there is a free tier on RapidAPI for development and testing.


📄 License

MIT © [FlashCapture Team]