Instagram Video Downloader
Pricing
Pay per usage
Instagram Video Downloader
The Instagram Video Downloader is a powerful Apify actor designed to download videos from Instagram with comprehensive metadata extraction. Whether you need to download single videos, multiple posts, reels, or entire profiles, this actor provides reliable extraction with direct download.
Pricing
Pay per usage
Rating
0.0
(0)
Developer

Shahid Irfan
Actor stats
0
Bookmarked
3
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
π Overview
The Instagram Video Downloader is a production-ready, high-performance Apify actor designed to download Instagram videos and reels at maximum speed. Featuring advanced optimizations, parallel processing, and intelligent error handling, this actor delivers enterprise-grade reliability for both single and bulk video downloads.
β¨ Key Features
- β‘ Ultra-Fast Downloads: Optimized to download videos at maximum speed without proxy bottlenecks
- π Parallel Processing: Process up to 3 URLs simultaneously with intelligent rate limiting
- π₯ Universal Instagram Support: Download videos from posts, reels, IGTV, and stories
- π Rich Metadata: Extract comprehensive video information including titles, descriptions, and engagement metrics
- π Direct Download Links: Generate API URLs for instant video access
- οΏ½οΈ Production-Grade Error Handling: Circuit breaker pattern, exponential backoff, and comprehensive retry logic
- οΏ½ Real-Time Progress Monitoring: Track download speed, progress, and ETA for each video
- π― Smart Format Selection: Automatically selects best format based on environment (with/without ffmpeg)
- π Cookie Authentication: Support for authenticated downloads of private content
- π± Stealth Mode: Anti-bot detection with rotating user agents and realistic headers
- οΏ½ Memory Optimized: Efficient processing for large videos in Apify environment
π― Use Cases
- Content Archiving: Preserve important Instagram videos for long-term storage
- Social Media Analysis: Collect video data for research and analytics
- Content Repurposing: Download videos for use in other marketing channels
- Backup Solutions: Create backups of valuable Instagram content
- Media Libraries: Build organized collections of Instagram videos
- Research Projects: Gather video data for academic or professional studies
π₯ Input Configuration
Required Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
urls | string | β | Instagram video URL(s). Supports multiple formats: single URL, comma-separated, or JSON array |
Optional Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
quality | string | best | Video quality preference: best, worst, or specific resolution |
download_mode | string | video | Download mode: video for video files, audio for audio extraction |
proxy_url | string | - | Custom proxy URL for enhanced privacy and access |
cookies | string | - | Instagram cookies for accessing private content or bypassing rate limits. Supports JSON format or Netscape format. |
Cookie Authentication
For content that requires login or to bypass rate limits, provide Instagram cookies:
Method 1: JSON Format (Recommended)
{"urls": "https://www.instagram.com/reel/ABC123/","cookies": [{"name": "sessionid","value": "your_session_id_here","domain": ".instagram.com"},{"name": "csrftoken","value": "your_csrf_token_here","domain": ".instagram.com"}]}
Method 2: Browser Export
- Log into Instagram in your browser
- Open Developer Tools (F12)
- Go to Application/Storage β Cookies β instagram.com
- Export cookies as JSON or copy individual values
- Provide the exported JSON in the cookies field
Required Cookies:
sessionid: Your Instagram session IDcsrftoken: CSRF protection tokends_user_id: Your user ID (optional but helpful)
How to Extract Instagram Cookies
Chrome/Edge Browser:
- Log into Instagram
- Press F12 to open Developer Tools
- Go to Application β Storage β Cookies β instagram.com
- Right-click and "Export as JSON"
- Copy the JSON content
Firefox Browser:
- Log into Instagram
- Press F12 to open Developer Tools
- Go to Storage β Cookies β instagram.com
- Select all cookies, right-click β "Export"
Cookie Editor Extensions:
- Install "Cookie Editor" extension
- Export cookies as JSON format
- Copy the exported JSON
|
max_items|integer|10| Maximum items to download from playlists/channels |
π€ Output Schema
The actor generates structured JSON output for each processed video with comprehensive metadata:
{"video_id": "C3v8HnK8JdL","title": "Amazing sunset timelapse πΉ","author": "@naturephotography","url": "https://www.instagram.com/p/C3v8HnK8JdL/","download_url": "https://api.apify.com/v2/key-value-stores/abc123/records/C3v8HnK8JdL.mp4?raw=1","duration": "00:00:45","file_size": 15728640,"quality": "1080p","format": "mp4","thumbnail_url": "https://example.com/thumbnail.jpg","description": "Captured this beautiful sunset timelapse from the mountain top π #sunset #timelapse #nature","hashtags": ["sunset", "timelapse", "nature"],"likes_count": 1250,"comments_count": 89,"shares_count": 23,"collected_at": "2025-11-13T10:30:00Z","success": true}
Output Fields Description
video_id: Unique Instagram video identifiertitle: Video title or captionauthor: Instagram username of the content creatorurl: Original Instagram URLdownload_url: Direct API download link for the video fileduration: Video length in HH:MM:SS formatfile_size: File size in bytesquality: Video resolution/qualityformat: File format (mp4, webm, etc.)thumbnail_url: URL to video thumbnail imagedescription: Full video description/captionhashtags: Array of hashtags used in the postlikes_count: Number of likes on the postcomments_count: Number of commentsshares_count: Number of sharescollected_at: ISO timestamp of data collectionsuccess: Processing status indicator
π Usage Examples
Download a Single Video
{"urls": "https://www.instagram.com/p/C3v8HnK8JdL/"}
Download Multiple Videos (Comma-separated)
{"urls": "https://www.instagram.com/p/C3v8HnK8JdL/,https://www.instagram.com/reel/C4d9IpL9KeM/"}
Download Multiple Videos (Array Format)
{"urls": ["https://www.instagram.com/p/C3v8HnK8JdL/","https://www.instagram.com/reel/C4d9IpL9KeM/","https://www.instagram.com/tv/C5e0JqM0LfN/"]}
Download with Custom Quality
{"urls": "https://www.instagram.com/p/C3v8HnK8JdL/","quality": "720p","download_mode": "video"}
Access Private Content with Cookies
{"urls": "https://www.instagram.com/reel/C3v8HnK8JdL/","cookies": [{"name": "sessionid","value": "your_session_id_here","domain": ".instagram.com"},{"name": "csrftoken","value": "your_csrf_token_here","domain": ".instagram.com"}]}
Bulk Download from Profile
{"urls": "https://www.instagram.com/username/","max_items": 50,"quality": "best"}
β‘ Performance Optimizations
This actor is built for maximum speed and reliability with enterprise-grade optimizations:
Speed Optimizations
- π Direct CDN Downloads: Videos download directly from Instagram CDN without proxy bottlenecks (10-50x faster)
- β‘ Parallel Fragment Downloads: Downloads 5 video fragments simultaneously for faster completion
- πΎ 16MB Buffer: Large buffer size ensures smooth, fast downloads
- π― 10MB Chunk Size: Optimized chunk size for maximum throughput
- β No SSL Verification: Skips certificate checks for faster connections (safe for CDN downloads)
Concurrency & Parallelism
- π¦ Batch Processing: Process up to 3 URLs concurrently with intelligent semaphore limiting
- π Async Operations: Fully asynchronous processing for maximum efficiency
- β±οΈ Smart Rate Limiting: Randomized delays between requests to avoid rate limits
Reliability Features
- π‘οΈ Circuit Breaker Pattern: Automatically stops processing when failure rate exceeds 70%
- π Exponential Backoff: Intelligent retry logic with increasing delays
- β Permanent Error Detection: Skips non-retryable errors (deleted content, private accounts)
- π Real-Time Progress Monitoring: Track download speed, ETA, and completion percentage
- β Success/Failure Tracking: Comprehensive metrics for monitoring performance
Memory & Resource Management
- ποΈ Temporary File Cleanup: Automatic cleanup of temporary files after each download
- πΎ Streaming Uploads: Memory-efficient processing for large videos
- π― Smart Format Selection: Adapts to environment (ffmpeg available/unavailable)
Expected Performance
- Single Video (20MB): ~5-10 seconds (vs 5 minutes with proxy)
- Batch (10 videos): ~30-60 seconds with parallel processing
- Large Videos (100MB+): ~30-60 seconds depending on network
βοΈ Advanced Configuration
Quality Options
best: Highest available quality (default)worst: Lowest available quality1080p,720p,480p: Specific resolutions
Download Modes
video: Download video files (default)audio: Extract audio track only
Proxy Configuration
Note: Proxy is ONLY used for metadata extraction, not video downloads (for maximum speed). For enhanced privacy or accessing geo-restricted content:
{"urls": "https://www.instagram.com/p/C3v8HnK8JdL/","proxy_url": "http://your-proxy-server:port"}
π° Cost & Limits
Pricing
- Free Tier: 1,000 videos per month
- Paid Plans: Starting from $49/month for unlimited downloads
- Pay-per-use: $0.001 per video for high-volume users
Rate Limits
- Concurrent Requests: Up to 10 simultaneous downloads
- Daily Limit: Based on your Apify plan
- File Size: Maximum 2GB per video
- Duration: Maximum 10 minutes per video
π§ Troubleshooting
Common Issues
β "Content not available, rate-limit reached or login required" error
- Most Common: Instagram requires authentication for this content
- Solution: Provide valid Instagram cookies in JSON format
- How to get cookies: Log into Instagram β Open Dev Tools β Export cookies from Application tab
- Required cookies:
sessionid,csrftoken,ds_user_id
β "Video not found" error
- Verify the Instagram URL is correct and public
- Check if the content requires authentication
- Ensure the video hasn't been deleted
β "Download failed" error
- Try different quality settings
- Check your internet connection
- Verify Apify platform status
β "Private content" error
- Provide valid Instagram cookies in JSON format
- Ensure you have access to the content
- Check account permissions and content visibility
β "Rate limit exceeded" error
- Instagram has detected automated access
- Provide cookies to appear more legitimate
- Reduce concurrent downloads
- Add delays between requests
- Consider using residential proxies
β "Authentication failed" error
- Cookies may be expired or invalid
- Re-export fresh cookies from your browser
- Ensure you're logged into the correct Instagram account
- Check that all required cookies are provided
Error Response Format
{"video_id": null,"url": "https://www.instagram.com/p/C3v8HnK8JdL/","error": "Video not available or private","success": false,"collected_at": "2025-11-13T10:30:00Z"}
οΏ½ Advanced Features
Enhanced Authentication
- Cookie Support: Full JSON cookie format support
- Session Management: Proper session handling with CSRF tokens
- Header Rotation: Dynamic headers to avoid detection
Robust Error Handling
- Smart Retry Logic: Detects retryable vs permanent errors
- Fallback Strategies: Multiple extraction methods
- Rate Limit Handling: Automatic backoff and retry
Instagram Optimization
- GraphQL Support: Uses Instagram's modern API when available
- Mobile Headers: Realistic mobile user agents for better compatibility
- Stealth Techniques: Advanced anti-detection measures
β οΈ Important Notes
Instagram Access Policies
- Rate Limiting: Instagram actively monitors and rate-limits automated access
- Authentication Required: Many videos now require login/authentication
- Policy Changes: Instagram frequently updates their API and access policies
- Legal Compliance: Ensure your usage complies with Instagram's Terms of Service
Best Practices
- Use Cookies: Provide valid Instagram cookies for best results
- Rate Limiting: Respect Instagram's rate limits to avoid blocks
- Fresh Cookies: Re-export cookies periodically as they expire
- Error Handling: Implement proper error handling for failed downloads
- Legal Usage: Only download content you have permission to access
π Support & Resources
Getting Help
- π Documentation: Apify Platform Docs
- π¬ Community: Discord Server
- π Bug Reports: GitHub Issues
- π§ Email Support: support@apify.com