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

socmed-miner

v1.0.5

Published

Social Media Scrapper for any platforms (now available for TikTok)

Readme

Human Like Web Scrapper - Social Media Miner ⛏️

npm version License: MIT

HLWB Social Media Miner is a high-speed, robust CLI (Command Line Interface) tool designed to extract content data and nested comments from social media platforms. Built with Playwright and Crawlee, it effortlessly bypasses Virtual DOM limitations to extract thousands of comments without data loss.


🚀 Prerequisites

Make sure you have Node.js (version 16 or higher) installed on your machine. No manual cloning or local installation is required—just run it directly via npx!

💻 Usage

Run the miner directly from your terminal using the following command pattern:

npx socmed-miner@latest <platform> <action> <keyword>

Arguments Breakdown:

| Argument | Description | Example Input | | :--------- | :----------------------------------------------- | :----------------------------------------------- | | platform | The target social media platform. | tiktok, instagram (coming soon) | | action | The type of data extraction to perform. | search, user, content | | keyword | The specific target URL or username. | "https://www.tiktok.com/@username/video/123" |

📌 Command Examples

1. Scraping TikTok Content & All Comments Extracts video/photo metrics along with all comment threads and deeply nested replies.

npx socmed-miner tiktok scrape "https://www.tiktok.com/@ado1024osenbei/video/7612645005282397461"

(Note: It is highly recommended to wrap the URL in quotes to prevent terminal parsing errors with special characters).


⚠️ Important Notes (Manual Intervention)

Social media platforms have strict anti-bot systems. While this tool heavily automates the extraction process, the browser runs in a visible mode allowing you to assist the bot when necessary:

  • 🧩 CAPTCHAs: If a CAPTCHA puzzle appears, the crawler might pause. Please solve the CAPTCHA manually in the opened browser window so the script can resume.
  • 🛑 Unexpected Pop-ups: If a blocking pop-up appears (e.g., "Login to continue" or "Accept Cookies") and halts the scrolling process, simply close it manually and the bot will continue its job.

📂 Output Structure

The extracted data will be automatically saved in the results/ directory within your current working folder. The tool dynamically organizes the output into specific subfolders or files based on the action performed.

📁 your-current-directory/
└── 📁 results/
    ├── 📁 tiktok-content-[url]-[timestamp]/      # Generated when scraping specific content
    │   ├── 📄 1_content_details.csv # Video metrics (likes, shares, caption, etc.)
    │   └── 📄 2_comments.csv        # Main comments and nested replies
    ├── 📁 tiktok-user-[username]-[timestamp]/   # Generated when scraping user profiles
    └── 📄 tiktok-search-[query].csv # Generated when scraping search results

✨ Key Features

  • 🚀 Vacuum Cleaner Mode: A specialized scrolling algorithm that prevents data loss caused by TikTok's Virtual DOM behavior.
  • 🌳 Deep Nested Extraction: Capable of expanding and extracting multi-level reply threads ("View 10 replies" -> "View 2 more") down to the very last reply.
  • 🧹 Auto-Sanitize: Automatically cleans up newline characters (\n) to prevent broken CSV formatting.
  • 🕰️ Universal Date Parser: Converts relative timestamps (e.g., "2d ago", "3j lalu") into absolute standard date formats.

🤝 Contributing

Pull requests are highly appreciated! For major changes, please open an issue first to discuss what you would like to change.