Instagram Stories Scraper
by deepanshusharm
A Scraper that downloads Instagram stories from multiple users with comprehensive metadata extraction.
Opens on Apify.com
About Instagram Stories Scraper
A Scraper that downloads Instagram stories from multiple users with comprehensive metadata extraction.
What does this actor do?
Instagram Stories Scraper is a web scraping and automation tool available on the Apify platform. It's designed to help you extract data and automate tasks efficiently in the cloud.
Key Features
- Cloud-based execution - no local setup required
- Scalable infrastructure for large-scale operations
- API access for integration with your applications
- Built-in proxy rotation and anti-blocking measures
- Scheduled runs and webhooks for automation
How to Use
- Click "Try This Actor" to open it on Apify
- Create a free Apify account if you don't have one
- Configure the input parameters as needed
- Run the actor and download your results
Documentation
Instagram Story Scraper A powerful Actor that scrapes Instagram stories from one or multiple users. Each story is downloaded and tracked as a separate record with comprehensive metadata including download status, URLs, and media information. ## Features - 🔐 Secure Authentication - Uses Instagram session ID for reliable access - 📱 Multi-User Support - Scrape stories from multiple Instagram accounts in one run - 📊 Individual Story Records - Each story gets its own detailed record in the output - 🎥 Media Support - Downloads both photos and videos - 📝 Rich Metadata - Captures posting time, media type, file size, URLs, and more - 🔄 Multiple Download Methods - Uses fallback methods to ensure successful downloads - ⚙️ Flexible Configuration - Control story limits, delays, and targeting - 📁 Organized Storage - Files saved with timestamps and indexed naming ## Input Configuration The actor accepts the following input parameters: json { "session_id": "YOUR_INSTAGRAM_SESSION_ID", "usernames": ["username1", "username2", "username3"], "delay_between_requests": 2, "story_limit": "all", "latest_only": false } ### Input Fields | Field | Type | Required | Description | |-------|------|----------|-------------| | session_id | String | ✅ Yes | Your Instagram session ID from browser cookies | | usernames | Array/String | ✅ Yes | Instagram username(s) to scrape. Can be a single string or array of usernames | | username | String | No | Alternative field for single username (backward compatibility) | | delay_between_requests | Number | No | Delay in seconds between requests (default: 2) | | story_limit | Number/String | No | Number of stories to download per user, or "all" (default: "all") | | latest_only | Boolean | No | Download only the latest story from each user (default: false) | ### Getting Your Session ID 1. Log into Instagram in your browser 2. Open Developer Tools (F12) 3. Go to Application/Storage → Cookies → instagram.com 4. Find and copy the value of sessionid cookie ⚠️ Important: Keep your session ID secure and don't share it publicly. ## Output Format The actor outputs one record for each story scraped. Each record contains: json { "username": "cryptodaily", "user_id": "60586511690", "scraping_timestamp": "2025-12-14T09:42:27.268488", "status": "completed", "story_index": 1, "story_id": "3786688183573256768", "media_type": "video", "posted_date": "2025-12-13", "posted_time": "12:20:28 UTC", "posted_datetime": "2025-12-13T12:20:28+00:00", "download_status": "success", "filename": "story_1_20251213_122028.mp4", "file_size": 262808, "photo_url": null, "photo_info": {}, "video_url": "https://...", "video_info": { "video_url": "https://...", "thumbnail_url": "https://...", "duration": 5.014999866485596, "resolution": null }, "error_message": null } ### Output Fields | Field | Type | Description | |-------|------|-------------| | username | String | Instagram username | | user_id | String | Instagram user ID | | scraping_timestamp | String | ISO timestamp when scraping occurred | | status | String | Overall status: "completed", "error", "processing", "no_stories", "user_not_found" | | story_index | Number | Index of story for this user (1-based) | | story_id | String | Instagram story ID | | media_type | String | Type of media: "photo" or "video" | | posted_date | String | Date story was posted (YYYY-MM-DD) | | posted_time | String | Time story was posted (HH:MM:SS UTC) | | posted_datetime | String | ISO datetime when story was posted | | download_status | String | Download status: "success", "failed", "no_stories" | | filename | String | Name of downloaded file | | file_size | Number | Size of downloaded file in bytes | | photo_url | String | Direct URL to photo (if photo) | | photo_info | Object | Additional photo metadata (resolution, thumbnail) | | video_url | String | Direct URL to video (if video) | | video_info | Object | Video metadata (duration, thumbnail, resolution) | | error_message | String | Error description if download failed | ## Usage Examples ### Single User - All Stories json { "session_id": "your_session_id_here", "usernames": ["cryptodaily"] } ### Multiple Users - Latest Story Only json { "session_id": "your_session_id_here", "usernames": ["user1", "user2", "user3"], "latest_only": true } ### Limited Stories with Custom Delay json { "session_id": "your_session_id_here", "usernames": ["techblogger"], "story_limit": 5, "delay_between_requests": 3 } ## Downloaded Files Files are organized in the following structure: downloads/ └── username/ └── stories/ ├── story_1_20251213_122028.mp4 ├── story_2_20251214_063947.mp4 └── ... File naming format: story_{index}_{YYYYMMDD_HHMMSS}.{ext} ## Rate Limiting To avoid Instagram rate limits: - Default delay of 2 seconds between requests - Configurable delay via delay_between_requests - Stories are processed sequentially - Delay applied between users when scraping multiple accounts ## Error Handling The actor handles various error scenarios: - User Not Found: Returns record with status: "user_not_found" - No Active Stories: Returns record with status: "no_stories" - Private Account: Records error if you don't follow the user - Download Failures: Uses multiple fallback methods - Authentication Issues: Fails gracefully with clear error messages ## Limitations - ⏰ Stories are only available for 24 hours on Instagram - 🔒 Can only scrape stories from public accounts or accounts you follow - 📊 Instagram API rate limits apply - 🔐 Session ID expires and needs to be refreshed periodically ## Support For issues or questions: - Check that your session ID is valid and not expired - Ensure usernames are correct (without @ symbol is fine) - Review the error messages in the output records - Increase delay_between_requests if hitting rate limits ## Privacy & Ethics - Only scrape content you have permission to access - Respect Instagram's Terms of Service - Don't use for harassment or unauthorized data collection - Keep session IDs secure
Categories
Common Use Cases
Market Research
Gather competitive intelligence and market data
Lead Generation
Extract contact information for sales outreach
Price Monitoring
Track competitor pricing and product changes
Content Aggregation
Collect and organize content from multiple sources
Ready to Get Started?
Try Instagram Stories Scraper now on Apify. Free tier available with no credit card required.
Start Free TrialActor Information
- Developer
- deepanshusharm
- Pricing
- Paid
- Total Runs
- 4
- Active Users
- 2
Related Actors
Video Transcript Scraper: Youtube, X, Facebook, Tiktok, etc.
by invideoiq
Linkedin Profile Details Scraper + EMAIL (No Cookies Required)
by apimaestro
Twitter (X.com) Scraper Unlimited: No Limits
by apidojo
Content Checker
by jakubbalada
Apify provides a cloud platform for web scraping, data extraction, and automation. Build and run web scrapers in the cloud.
Learn more about ApifyNeed Professional Help?
Couldn't solve your problem? Hire a verified specialist on Fiverr to get it done quickly and professionally.
Trusted by millions | Money-back guarantee | 24/7 Support