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 🙏

© 2025 – Pkg Stats / Ryan Hefner

ig-webs-api

v2.1.0

Published

Instagram Web API pentru autentificare, trimitere mesaje DM și automatizare prin Node.js

Readme

📦 ig-web-api: Instagram Direct Message Automation Toolkit

Send, manage, and monitor Instagram Direct Messages programmatically.
Secure session handling, group selection, restriction detection, and more — all packed into one flexible Node.js library.


🚀 Features

  • 🔐 Instagram Web Login with persistent session
  • 💬 Send Direct Messages (text, image, document, reaction)
  • 🧵 Discover and select existing DM threads
  • 📡 Auto-initialize new conversations if needed
  • 🛡️ Scan and detect account messaging restrictions
  • 💾 Save sessions to avoid logging in every time
  • 🎯 Interactive CLI ready for custom bot automation

🛠️ Installation

bash npm install ig-web-api

Or clone manually:

bash git clone https://github.com/gyovannyvpn123/ig-web-api cd ig-web-api npm install


📁 File Structure

| File | Description | |-----------------------|-------------------------------------------------------| | login.js | Logs in using username & password (web emulation) | | sessionStore.js | Saves and restores session with cookies & headers | | startDMWithUser.js | Starts a DM with any username if thread doesn't exist| | dm.js | Send messages to threads (text, image, reaction etc.)| | getDMGroups.js | Lists existing DM threads from your account | | selectDMGroups.js | Allows users to pick conversation(s) by number | | checkRestrictions.js| Verifies if account is restricted from messaging |


📦 Usage Example

`js import { loginWeb, sendTextDM, startDMWithUser, getDMGroups, selectDMGroups } from 'ig-web-api';

// 1. Log in with your Instagram credentials const session = await loginWeb('yourusername', 'yourpassword');

// 2. Get all conversations const groups = await getDMGroups(session); console.log(groups);

// 3. Send a message to a thread await sendTextDM(session, groups[0].id, 'Hello from the bot!'); `


💡 CLI Example

You can use node test.js to:

  • Log in or reuse saved credentials
  • Select which group(s) to message
  • Send text to all selected conversations
  • Auto-initialize threads if missing

🛡️ Account Restriction Checker

Scan your account status to detect Instagram blocks:

`js import { checkAccountRestrictions } from 'ig-web-api';

const result = await checkAccountRestrictions(session); console.log('Restricted:', result.restricted); console.log('Reason:', result.reason); `


📃 License

MIT © 2025 by Gyovanny & Contributors


📣 Created with love by Gyovanny to empower devs and automate Instagram messaging at scale.
Want to help expand it with TypeScript, CLI menus, or media support? PRs are welcome!