⚠️ Compliance Warning: This toolkit interfaces directly with Meta's Private API surface. It is engineered strictly for educational research, security emulation, and authorized AI infrastructure design. Violation of the primary Instagram Terms Of Service (e.g. unsolicited spam, fake account orchestration) via this library may result in severe account penalties or legal Cease & Desist orders. You assume all operational liabilities.
🚀 Quick Start
Or add to your Cargo.toml:
[]
= "0.1"
= { = "1", = ["full"] }
use InstagramClient;
use LoginConfig;
async
Selective features:
cargo add qinstagram --no-default-features --features realtime,media
✨ Features
- 4 distinct workflow modules cleanly organized reflecting Instagram's domain architecture.
- Enterprise GraphQL Parity — Drops cleanly into external architectural ecosystems like Qicro matching 100% of endpoints via Schema definition logic.
- WebSocket Push Capabilities — Bridge MQTT direct into React/Svelte5 frontends via Tokio sync broadcasts.
- Panic-free Library — robust error handling wrapping and propagating
InstagramErrorinstances. - Two-Factor and Challenge Flows — seamlessly navigate verification checkpoint gates.
- MQTT Event Capabilities — unified fallback messaging and real-time syncing.
- Ruploado Media Configuration — highly complex custom media routing built manually into Rust.
📦 Module Overview
🔐 Authentication & Session
| Module | Description | Docs |
|---|---|---|
| auth | Stateful Password login, 2FA challenge responses, Session lifecycle & persistent multi-user credentials | 📖 |
| transport | Payload signing, deterministic device ID generation, request header synthesis, and Android emulation | 📖 |
💬 Direct Communication
| Module | Description | Docs |
|---|---|---|
| unified_direct | Direct message fetching, fuzzy inbox search, message parser engine, un-sending | 📖 |
| media_upload | Two-step direct media configuration and rupload data injection | 📖 |
| broadcast | Liking, reacting, responding with URL parsing and state tracking | 📖 |
🎞️ Experiences
| Module | Description | Docs |
|---|---|---|
| stories | Story and reels gathering, tray parsing, real-time media seen tracking capabilities | 📖 |
| feed | News inbox analysis, timeline extraction and pagination | 📖 |
| realtime | MQTT Skywalker integration behind --features realtime |
📖 |
🔌 Ecosystem Integrations
| Module | Description | Docs |
|---|---|---|
| graphql | 100% declarative schema mapping (Qicro Standard) securely mapping query/mutation contexts on auth environments | 📖 |
| ws | Native axum drop-in logic exposing underlying MQTT binaries to high-speed JSON web sockets via tokio-broadcaster |
📖 |
📚 Full documentation index: docs/readme.md
🚀 Usage
Session Injection & Media Tracking
use InstagramClient;
async
⚙️ Feature Flags
Include only what you need:
[]
= { = "0.1.0", = ["realtime", "graphql", "websocket"] }
# Subsystem Engines
= []
= []
# Architectural Frameworks
= ["async-graphql"]
= ["axum", "futures-util"]
# Development Mocks
= []
🏗️ Build
# Core framework
# All experimental modules
# Release compilation
# Run rigorous unit tests and offline mock parsers
📁 Project Structure
Qinstagram/
├── Cargo.toml # Dependencies & architectural flags
├── README.md # This file
├── src/
│ ├── lib.rs # API facade and Module exports
│ │
│ │── auth/ # Sessions, Challenges & Verification
│ │── direct/ # Thread logic, Search, Broadcast, Parser
│ │── feed/ # Core API Timelines
│ │── media/ # Downloads & Complex Upload Protocols
│ │── realtime/ # Under heavy development MQTT
│ │── stories/ # Trays & state persistence
│ │── transport/ # Emulation context and networking
│ └── types/ # Struct parity wrappers
│
├── docs/ # Component Reference Documentation
│ ├── readme.md # Documentation index
│ └── [module_name].md
│
├── examples/ # Real-world usage scenarios
└── tests/ # Offline JSON structural integrity testing
📊 Stats
| Metric | Value |
|---|---|
| Total modules | 9 |
| Extracted Data Types | ~60 |
| Real-time MQTT endpoints | 2 |
| HTTP Message Builders | 14 |
| Supported Media Upload | Photo + Video + Link |