InstaGrab
Copy
GRAB
Instagram Downloader for Termux

Download Everything.

Reels. Stories. Images. Share to Termux and let the magic happen. No root required.

Scroll
Reels Stories Images Videos
Reels Stories Images Videos

Built for power users. No compromises.

01

Background Downloads

Share and return to Instagram instantly. Downloads continue silently in the background with wake-lock protection. Get notified when complete.

02 🎯

Smart Detection

Automatically identifies content type. Reels use yt-dlp, stories use gallery-dl. The right tool for every job.

03 📸

Full Story Support

Images and videos. Both work perfectly.

04 🔒

Private Content

Use cookies to access private accounts you follow.

One-time setup. Five minutes.

termux
# Grant storage access
termux-setup-storage

# Update packages
pkg update && pkg upgrade -y

# Install dependencies
pkg install python ffmpeg termux-api -y

# Install downloaders
pip install yt-dlp gallery-dl

# Create bin directory
mkdir -p ~/bin

Three steps. That's it.

01

Share to Termux

Open any Reel or Story on Instagram. Tap the share button and select Termux from the share sheet.

02

Auto Download

The script detects content type and downloads using the optimal tool. Terminal closes instantly.

03

Get Notified

Receive a notification when complete. Files appear in your DCIM folder immediately.

04

Enjoy

Files are named with @username_timestamp format. Easy to find, easy to organize.

Copy. Paste. You're done.

~/bin/termux-url-opener
cat > ~/bin/termux-url-opener << 'EOF'
#!/data/data/com.termux/files/usr/bin/bash

URL="$1"
DOWNLOAD_DIR="/storage/emulated/0/DCIM/Instagram_Reels"
STORIES_DIR="/storage/emulated/0/DCIM/Instagram_Stories"

nohup bash -c '
mkdir -p "'"$DOWNLOAD_DIR"'"
mkdir -p "'"$STORIES_DIR"'"

URL="'"$URL"'"

if [[ "$URL" == *"/stories/"* ]]; then
    TARGET_DIR="'"$STORIES_DIR"'"
    TYPE="story"
else
    TARGET_DIR="'"$DOWNLOAD_DIR"'"
    TYPE="reel"
fi

TIMESTAMP=$(date +"%Y%m%d_%H%M%S")

cd "$TARGET_DIR"

termux-wake-lock
termux-toast "📥 Downloading..."

if [ "$TYPE" == "story" ]; then
    gallery-dl --cookies ~/cookie.txt \
        --filename "@{username}_$TIMESTAMP.{extension}" \
        --directory "." \
        "$URL"
    RESULT=$?
else
    yt-dlp --cookies ~/cookie.txt \
        -o "@%(uploader)s_$TIMESTAMP.%(ext)s" \
        --merge-output-format mp4 \
        "$URL"
    RESULT=$?
fi

if [ $RESULT -eq 0 ]; then
    termux-media-scan "$TARGET_DIR"
    termux-notification --title "✅ Downloaded!" \
        --content "$TYPE saved to DCIM" --id "insta"
else
    termux-notification --title "❌ Failed" \
        --content "Check ~/insta.log" --id "insta"
fi

termux-wake-unlock
' > ~/insta.log 2>&1 &

sleep 0.5
exit 0
EOF

chmod +x ~/bin/termux-url-opener