Instagram data extraction CLI with anti-detection features. Fetch profiles, posts, stories, reels, and followers. No API key required.
- ๐ Profile extraction - Bio, stats, links, metadata
- ๐ธ Posts scraping - Images, videos, captions, engagement
- ๐ Stories - Download stories with metadata
- ๐ฌ Reels - Fetch reels with view counts
- ๐ Hashtag search - Top and recent posts
- ๐ฅ Followers/Following - List extraction (auth required)
- ๐ก๏ธ Anti-detection - Rotating user agents, rate limiting
- ๐ Multiple formats - JSON, JSONL, CSV, table
npm install -g insta-fetch-cli
# Get profile info insta-fetch profile username # Fetch posts insta-fetch posts username -n 50 -o json # Fetch stories (requires auth) insta-fetch stories username --download ./media # Fetch reels insta-fetch reels username -n 20 # Search hashtag insta-fetch hashtag travel --top -n 100
Some features require authentication:
# Set session ID from browser insta-fetch auth --session-id "your-session-id" # Check auth status insta-fetch auth --status # Clear credentials insta-fetch auth --clear
- Open Instagram in your browser
- Open DevTools (F12) โ Application โ Cookies
- Find
sessionidcookie - Copy the value
Get profile information.
insta-fetch profile mkbhd insta-fetch profile username --json insta-fetch profile username --save profile.json
Returns: Bio, followers, following, posts count, profile pic, external links.
Fetch user's posts.
insta-fetch posts username insta-fetch posts username -n 100 # Limit to 100 posts insta-fetch posts username --all # Fetch all posts insta-fetch posts username -o csv # CSV output
Options:
-n, --limit <number>- Number of posts (default: 12)--all- Fetch all available posts-o, --output <format>- json, jsonl, csv, table--save <file>- Save to file
Fetch current stories.
insta-fetch stories username insta-fetch stories username --download ./media
Options:
--download <dir>- Download media to directory-o, --output <format>- Output format
Fetch user's reels.
insta-fetch reels username insta-fetch reels username -n 50
Search posts by hashtag.
insta-fetch hashtag travel insta-fetch hashtag coding --top -n 100 insta-fetch hashtag food --recent
Options:
--top- Top posts only--recent- Recent posts-n, --limit <number>- Number of posts
Get followers list (requires auth).
insta-fetch followers username -n 500 insta-fetch followers username --all
Get following list (requires auth).
insta-fetch following username -n 500
# JSON (default) insta-fetch profile username # JSONL (one object per line) insta-fetch posts username -o jsonl # CSV (spreadsheet-friendly) insta-fetch posts username -o csv # Table (terminal display) insta-fetch profile username -o table # Save to file insta-fetch posts username --save posts.json
{
"username": "mkbhd",
"fullName": "Marques Brownlee",
"bio": "MKBHD | Quality Tech Videos | YouTuber",
"followers": 4500000,
"following": 350,
"postsCount": 2800,
"isVerified": true,
"profilePic": "https://...",
"externalUrl": "https://youtube.com/MKBHD"
}Built-in protections to avoid rate limits:
- Random delays - 1-3s between requests (configurable)
- User agent rotation - Mimics real browsers
- Rate limiting - 100 req/min default
- Session management - Persistent cookie storage
# Adjust rate limiting insta-fetch config --rate-limit 50 # Set custom delay insta-fetch posts username --delay 5000
# Multiple usernames echo "user1 user2 user3" | xargs -I {} insta-fetch profile {} # Export to single file for user in user1 user2 user3; do insta-fetch posts $user --save "${user}-posts.json" done
- Market research - Track competitor content
- Influencer analysis - Engagement metrics
- Content backup - Archive your posts
- Trend monitoring - Hashtag tracking
- OSINT research - Profile investigation
- Credentials stored locally (never transmitted)
- No data sent to third parties
- Rate limiting respects platform guidelines
- For research/personal use only
| Feature | insta-fetch | Official API |
|---|---|---|
| API Key Required | โ No | โ Yes |
| Stories Access | โ Yes | โ Limited |
| Reels Support | โ Yes | โ Limited |
| Rate Limits | Built-in | Strict |
| Setup Time | 1 minute | Hours |
This tool is for educational and research purposes. Respect Instagram's Terms of Service and use responsibly. The authors are not responsible for misuse.
Built by LXGIC Studios