Instagram Profile Super Scraper
Pricing
$7.00 / 1,000 results
Instagram Profile Super Scraper
The Instagram Profile Super Scraper is a powerful and efficient tool built with Apify and Crawlee that allows you to extract comprehensive data from Instagram profiles. It scrapes public information such as username, bio, followers, following, posts, IGTV videos, and related profiles.
0.0 (0)
Pricing
$7.00 / 1,000 results
0
2
1
Last modified
a day ago
Instagram Profile Scraper
A powerful Instagram profile scraper that extracts comprehensive profile data including bio, followers, posts, IGTV videos, and related profiles. This scraper mimics the functionality of Apify's apify/instagram-profile-scraper.
Features
✅ Complete Profile Data Extraction
- Profile information (username, ID, full name, bio)
- Follower and following counts
- Post counts and statistics
- Verification status
- Business account information
- Profile pictures (standard and HD)
- External URLs from bio
✅ Latest Posts & Media
- Extract up to 12 latest posts per profile
- Post captions with hashtags and mentions
- Image and video URLs
- Engagement metrics (likes, comments)
- Post types (Image, Video, Carousel/Sidecar)
- Tagged users
- Timestamp information
✅ IGTV Videos
- Extract up to 12 latest IGTV videos
- Video metadata and statistics
- Video URLs and thumbnails
✅ Related Profiles
- Discover related accounts
- Profile suggestions based on Instagram's algorithm
✅ Optional About Section (Paid Add-on)
- Account join date
- Country information (if available)
- Verification date
- Username change history
Output Format
The scraper outputs data in the exact same format as Apify's Instagram Profile Scraper:
{"inputUrl": "https://www.instagram.com/ahmdasofficial","id": "55079635587","username": "ahmdasofficial","url": "https://www.instagram.com/ahmdasofficial","fullName": "احمد - Ahmed","biography": "𝗙𝗼𝘂𝗻𝗱𝗲𝗿 @labshkw...","externalUrls": [...],"externalUrl": "https://reach.link/ahmedabsofficial","externalUrlShimmed": "https://l.instagram.com/?u=...","followersCount": 40657,"followsCount": 617,"hasChannel": false,"highlightReelCount": 80,"isBusinessAccount": false,"joinedRecently": false,"businessCategoryName": "Digital creator","private": false,"verified": true,"profilePicUrl": "https://...","profilePicUrlHD": "https://...","igtvVideoCount": 0,"relatedProfiles": [...],"latestIgtvVideos": [...],"postsCount": 921,"latestPosts": [...]}
Installation
-
Clone the repository:
git clone <repository-url>cd instagram_profile_scraper -
Install dependencies:
$npm install -
Configure cookies:
- Edit
cookies.jsonand add your Instagram session cookies - You can add multiple sessions for rotation
- Edit
Configuration
cookies.json
{"sessions": ["sessionid=YOUR_SESSION_ID; csrftoken=YOUR_CSRF_TOKEN; ...","sessionid=ANOTHER_SESSION; csrftoken=ANOTHER_TOKEN; ..."]}
test_input.json
{"usernames": ["username1", "username2", "https://www.instagram.com/username3/"],"includeAboutSection": false}
Input Schema
The scraper accepts the following input parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
usernames | Array | Yes | List of Instagram usernames, profile URLs, or profile IDs |
includeAboutSection | Boolean | No | Extract about account information (default: false) |
Input Examples
Single username:
{"usernames": ["nasa"]}
Multiple usernames:
{"usernames": ["nasa", "spacex", "elonmusk"]}
Profile URLs:
{"usernames": ["https://www.instagram.com/nasa/","https://www.instagram.com/spacex/"]}
With about section:
{"usernames": ["nasa"],"includeAboutSection": true}
Usage
Local Development
Run the scraper with test input:
$npm start
Custom Input
- Modify
test_input.jsonwith your desired usernames - Run
npm start
Programmatic Usage
import { Actor } from 'apify';await Actor.init();const input = {usernames: ['nasa', 'spacex'],includeAboutSection: false};await Actor.setInput(input);// Run your scraper logic hereawait Actor.exit();
Output Data
The scraper saves data to the default dataset. You can access it:
- In storage folder:
./storage/datasets/default/ - Via Apify API: If running on Apify platform
- Programmatically: Using
Dataset.getData()
Export Formats
The data can be exported in various formats:
- JSON
- CSV
- Excel
- XML
- RSS
- HTML Table
How It Works
-
Session Management:
- Uses rotating session cookies to avoid rate limits
- Supports multiple sessions for better performance
-
API Calls:
- Fetches profile data from Instagram's web API
- Retrieves posts using GraphQL queries
- Gets related profiles and IGTV videos
-
Data Transformation:
- Converts raw API data to standardized format
- Extracts hashtags and mentions from captions
- Processes media URLs and metadata
-
Rate Limiting:
- Implements delays between requests
- Rotates sessions to distribute load
- Handles rate limit responses gracefully
Features Comparison with Apify Actor
| Feature | This Scraper | Apify Actor |
|---|---|---|
| Profile Information | ✅ | ✅ |
| Latest Posts (12) | ✅ | ✅ |
| IGTV Videos (12) | ✅ | ✅ |
| Related Profiles | ✅ | ✅ |
| External URLs | ✅ | ✅ |
| About Section | ✅ | ✅ |
| Multiple Profiles | ✅ | ✅ |
| Session Rotation | ✅ | ✅ |
Troubleshooting
No data returned
- Check cookies: Ensure your session cookies are valid
- Verify username: Make sure the username exists
- Check rate limits: You may be rate-limited, try using more sessions
Rate limiting
- Add more sessions to
cookies.json - Increase delays in the code
- Reduce number of profiles scraped at once
Missing data fields
- Some profiles may have privacy settings
- IGTV videos only available if account has them
- Related profiles depend on Instagram's algorithm
Getting Instagram Session Cookies
- Open Instagram in your browser
- Log in to your account
- Open Developer Tools (F12)
- Go to Application/Storage → Cookies → instagram.com
- Copy the entire cookie string
- Paste into
cookies.json
Important cookies:
sessionid- Your session IDcsrftoken- CSRF tokends_user_id- Your user ID
Best Practices
- Use multiple sessions for better performance
- Don't scrape too fast to avoid rate limits
- Rotate sessions between requests
- Monitor for errors and adjust delays
- Respect Instagram's ToS and privacy policies
Legal & Ethical Considerations
- Only scrape public data
- Respect user privacy
- Follow Instagram's Terms of Service
- Don't use for spam or harassment
- Comply with GDPR and data protection laws
Dependencies
apify- Apify SDK for web scrapingcrawlee- Web crawling and scraping librarycheerio- HTML parsing (for fallback)node-fetch- HTTP client
License
Apache-2.0
Author
Nomanriaz786
Support
For issues and questions:
- Create an issue in the repository
- Check existing issues for solutions
- Review the code documentation
Changelog
Version 1.0.0
- Initial release
- Profile data extraction
- Latest posts extraction
- IGTV videos extraction
- Related profiles extraction
- Session rotation
- Multiple input formats support
Roadmap
- Add support for stories
- Add support for highlights
- Add follower/following list extraction
- Add post comments extraction
- Improve error handling
- Add proxy support
- Add more detailed logging
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Acknowledgments
- Inspired by Apify's Instagram Profile Scraper
- Built with Apify SDK and Crawlee
- Thanks to the open-source community
On this page
Share Actor:
