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

nexara

v3.0.1

Published

A lightweight Node.js module to fetch, parse web content, extract meta tags, and capture webpage screenshots efficiently.

Readme

Nexara

A highly efficient, lightweight Node.js module designed for robust web scraping, HTML parsing, asset extraction, and automated webpage screenshot capturing.

Unlike heavy headless browser solutions, Nexara is built on top of Axios and Cheerio, ensuring maximum performance, low memory footprint, and blisteringly fast execution.

🚀 Key Features

  • Smart Auto-Retry: Automatically handles failed requests (e.g., 500 errors, socket hang-ups) with intelligent retry logic.
  • Advanced Asset Extraction: Easily extract all hyperlinks and image sources from any webpage.
  • Memory-Efficient File Downloader: Download large files (images, videos, documents) directly to your disk using Node.js Streams without bloating RAM.
  • SEO Meta Extraction: Instantly fetch standard and OpenGraph meta tags (Title, Description, Images, Keywords).
  • Lightweight Screenshots: Capture high-quality webpage screenshots without the heavy overhead of Puppeteer or Playwright.
  • Proxy & Custom Header Support: Built-in support to bypass basic scraping blocks using custom User-Agents and HTTPS Agents.

📦 Installation

Install the package via npm:

npm install nexara

💻 Usage & Examples

1. Basic HTML Fetching & Parsing

Fetch raw HTML and parse it instantly using the built-in Cheerio wrapper.

const nexara = require('nexara');

async function scrapeTitle() {
    try {
        // Fetch and parse in one go
        const $ = await nexara.fetchHtml('https://example.com');
        console.log('Page Title:', $('title').text());
    } catch (error) {
        console.error('Scraping Error:', error);
    }
}
scrapeTitle();

2. Extracting Links and Images

Easily scrape all href and src attributes from a target URL.

const nexara = require('nexara');

async function getAssets() {
    const assets = await nexara.extractAssets('https://example.com');
    console.log(`Found ${assets.links.length} Links`);
    console.log(`Found ${assets.images.length} Images`);
}
getAssets();

3. Memory-Efficient File Downloading

Download files directly to your local storage securely and efficiently.

const nexara = require('nexara');

async function download() {
    const result = await nexara.downloadFile(
        'https://8upload.com/preview/1e6e38bf72022226/nexara-test.jpg', 
        './downloaded-image.png'
    );
    console.log(result); // "File successfully downloaded to ./downloaded-image.png"
}
download();

4. Extracting SEO Meta Data

Perfect for building link previews or SEO analysis tools.

const nexara = require('nexara');

async function getSeoData() {
    const meta = await nexara.getMeta('https://github.com/nimesh-piyumal');
    console.log('Title:', meta.title);
    console.log('Description:', meta.description);
}
getSeoData();

5. Capturing Webpage Screenshots

Capture remote webpage screenshots instantly via a lightweight, built-in engine.

const nexara = require('nexara');
const fs = require('fs');

async function takeScreenshot() {
    const screenshotBuffer = await nexara.ssweb('https://github.com');
    fs.writeFileSync('screenshot.png', screenshotBuffer);
    console.log('Screenshot saved as screenshot.png');
}
takeScreenshot();

6. Advanced Configuration (Auto-Retries & Proxies)

Make robust requests with automatic retries and custom Axios configurations.

const nexara = require('nexara');

async function robustRequest() {
    const options = {
        timeout: 5000,
        // Add proxy or custom headers here
    };
    
    // Will retry up to 3 times if the request fails
    const response = await nexara.get('https://example.com', options, 3);
    console.log('Status Code:', response.status);
}
robustRequest();

🛠️ API Reference

| Method | Description | Returns | | --- | --- | --- | | get(url, [options], [retries]) | Makes an HTTP GET request with auto-retry logic. | Promise<Object> | | fetchHtml(url) | Fetches a URL and returns a Cheerio instance. | Promise<Object> | | load(htmlString) | Parses raw HTML string using Cheerio. | Object (Cheerio) | | extractAssets(url) | Returns an object containing unique arrays of links and images. | Promise<Object> | | getMeta(url) | Extracts Title, Description, Image, and Keywords. | Promise<Object> | | downloadFile(url, dest) | Downloads a file efficiently to a specified path. | Promise<String> | | ssweb(url) | Captures a 1200px wide screenshot of the target URL. | Promise<Buffer> |

👨‍💻 Author

Created and maintained by Nimesh Piyumal.

📄 License

This project is licensed under the ISC License. Feel free to contribute or report issues on GitHub!